Upload files to "/"
This commit is contained in:
37
README.md
Normal file
37
README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
Caddy is a reverse proxy that protects the self-hosted applications from being exposed directly to the internet. Caddy is the only application exposed, it accepts the network traffic and then passes that network traffic to the applications behind the firewall based on rules. Caddy also automatically generates SSL certificates that encrypts the network traffic between the client making the request and the application.
|
||||
|
||||
# Installation
|
||||
|
||||
Caddy is easy to install using Portainer using the following instructions.
|
||||
|
||||
> [!Note]
|
||||
> Both docker and Portainer must be installed, configured, and running first on the server.
|
||||
|
||||
1. Open Portainer and create a new Stack.
|
||||
2. Use "Caddy" for the name of the Stack
|
||||
3. In the "Web Editor" field paste docker-compose.yml
|
||||
4. Leave everything else as default and click the "Deploy the stack" button at the bottom of the page.
|
||||
|
||||
# Restore the Configuration
|
||||
|
||||
1. Create a page for how to connect to the server and link here, replacing steps 2-3
|
||||
2. Open a terminal window
|
||||
3. Connect to the server using the following ssh command
|
||||
``` bash
|
||||
ssh mattspeer@192.168.4.20
|
||||
```
|
||||
3. Now that you are connected to the terminal of the server, issue the following command to edit the Caddyfile. This is how you configure Caddy.
|
||||
``` bash
|
||||
sudo nano /home/mattspeer/docker/caddy/Caddyfile
|
||||
```
|
||||
4. Past the contents of the backup file.
|
||||
5. Save and exit nano.
|
||||
6. In order for the new configuration to be used, you must restart the Caddy container in Portainer.
|
||||
|
||||
# Backup Caddy Configuration
|
||||
|
||||
1. Connect to the server
|
||||
2. Issue the following command to create a backup of Caddyfile configuration in the backup share.
|
||||
``` bash
|
||||
cp /home/mattspeer/docker/caddy/Caddyfile /mnt/5TB-Disk1/backup/server/caddy/
|
||||
```
|
||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
container_name: caddy
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- /home/mattspeer/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||
- /home/mattspeer/docker/caddy/caddy_data:/data
|
||||
- /home/mattspeer/docker/caddy/caddy_config:/config
|
||||
Reference in New Issue
Block a user