Add a Linux tips section and move Docker stacks to /srv/docker
This commit is contained in:
@@ -57,12 +57,13 @@ __Warning__: If your IP is not static, use a Dynamic DNS service ([DynDNS](https
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
- srv:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
::
|
||||
|
||||
@@ -191,11 +192,12 @@ We assume the client server runs Linux with Docker installed.
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- wireguard:
|
||||
- config:
|
||||
- wg_confs/
|
||||
- compose.yaml
|
||||
- srv:
|
||||
- docker:
|
||||
- wireguard:
|
||||
- config:
|
||||
- wg_confs/
|
||||
- compose.yaml
|
||||
---
|
||||
::
|
||||
|
||||
@@ -203,7 +205,7 @@ tree:
|
||||
### Create the folder
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir -p /docker/wireguard/config/wg_confs
|
||||
sudo mkdir -p /srv/docker/wireguard/config/wg_confs
|
||||
```
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
@@ -213,7 +215,7 @@ sudo mkdir -p /docker/wireguard/config/wg_confs
|
||||
### Create the wg0.conf file
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/wireguard/config/wg_confs/wg0.conf
|
||||
sudo nano /srv/docker/wireguard/config/wg_confs/wg0.conf
|
||||
```
|
||||
|
||||
Paste the downloaded configuration, then save with :kbd{value="Ctrl+O"}, :kbd{value="Enter"}, and exit with :kbd{value="Ctrl+X"}.
|
||||
@@ -221,13 +223,13 @@ Paste the downloaded configuration, then save with :kbd{value="Ctrl+O"}, :kbd{va
|
||||
::tip{icon=""}
|
||||
✨ **Alternative method:** Transfer the file via SFTP and move it:
|
||||
```bash [Terminal]
|
||||
sudo cp ~/wg0.conf /docker/wireguard/config/wg_confs
|
||||
sudo cp ~/wg0.conf /srv/docker/wireguard/config/wg_confs
|
||||
```
|
||||
::
|
||||
|
||||
### Create the compose file
|
||||
|
||||
Create the `compose.yaml` file in `/docker/wireguard`:
|
||||
Create the `compose.yaml` file in `/srv/docker/wireguard`:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
@@ -242,7 +244,7 @@ services:
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /docker/wireguard/config:/config
|
||||
- /srv/docker/wireguard/config:/config
|
||||
- /lib/modules:/lib/modules
|
||||
restart: unless-stopped
|
||||
```
|
||||
@@ -250,7 +252,7 @@ services:
|
||||
### Start the container
|
||||
|
||||
```bash [Terminal]
|
||||
cd /docker/wireguard
|
||||
cd /srv/docker/wireguard
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user