Add a Linux tips section and move Docker stacks to /srv/docker
This commit is contained in:
@@ -60,12 +60,13 @@ __Warning:__ This guide uses version `14` of **wg-easy**. Version `15` introduce
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
- srv:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
::
|
||||
|
||||
@@ -98,7 +99,7 @@ services:
|
||||
image: ghcr.io/wg-easy/wg-easy:14
|
||||
container_name: wg-easy
|
||||
volumes:
|
||||
- /docker/wg_easy/config/etc_wireguard:/etc/wireguard
|
||||
- /srv/docker/wg_easy/config/etc_wireguard:/etc/wireguard
|
||||
restart: unless-stopped
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -175,25 +176,26 @@ Assumes the client is a Linux server with Docker installed
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- docker:
|
||||
- wireguard:
|
||||
- config:
|
||||
- wg_confs/
|
||||
- compose.yaml
|
||||
- srv:
|
||||
- docker:
|
||||
- wireguard:
|
||||
- config:
|
||||
- wg_confs/
|
||||
- compose.yaml
|
||||
---
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Create the config folder
|
||||
|
||||
Create the folder `/docker/wireguard/config/wg_confs`:
|
||||
Create the folder `/srv/docker/wireguard/config/wg_confs`:
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ Use **File Browser** to browse and edit files without terminal
|
||||
::
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir -p /docker/wireguard/config/wg_confs
|
||||
sudo mkdir -p /srv/docker/wireguard/config/wg_confs
|
||||
```
|
||||
|
||||
### Copy the configuration file
|
||||
@@ -204,16 +206,16 @@ Copy the `wg0.conf` file downloaded earlier:
|
||||
✨ __Tip:__ Easiest way is to transfer the file via SFTP to `/home/youruser`, then move it:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo cp ~/wg0.conf /docker/wireguard/config/wg_confs
|
||||
sudo cp ~/wg0.conf /srv/docker/wireguard/config/wg_confs
|
||||
```
|
||||
::
|
||||
|
||||
### Deploy the container
|
||||
|
||||
Create `compose.yaml` in `/docker/wireguard`:
|
||||
Create `compose.yaml` in `/srv/docker/wireguard`:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/wireguard/compose.yaml
|
||||
sudo nano /srv/docker/wireguard/compose.yaml
|
||||
```
|
||||
|
||||
Paste:
|
||||
@@ -231,7 +233,7 @@ services:
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /docker/wireguard/config:/config
|
||||
- /srv/docker/wireguard/config:/config
|
||||
- /lib/modules:/lib/modules #optional
|
||||
restart: unless-stopped
|
||||
```
|
||||
@@ -241,7 +243,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
Start the container:
|
||||
|
||||
```bash [Terminal]
|
||||
cd /docker/wireguard
|
||||
cd /srv/docker/wireguard
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user