Add a Linux tips section and move Docker stacks to /srv/docker

This commit is contained in:
Djeex
2026-09-05 12:28:05 +02:00
parent 11d6c275c8
commit 142788d740
40 changed files with 894 additions and 330 deletions
@@ -14,8 +14,8 @@ The other reason is that it stays out of your way. Appliance systems like Unraid
## Installation
::note{icon="" to="https://www.iamtimsmith.com/blog/getting-started-with-the-linux-cli" target="_blank"}
📋 __Prerequisite:__ everything past this point happens in a terminal, so you should be comfortable with the basics: moving around with `cd`, listing with `ls`, editing a file with `nano`, and reading what a command tells you when it fails. If any of that is new, **start with the Linux CLI** and come back.
::note{icon="" to="/general/linux/cli-basics"}
📋 __Prerequisite:__ everything past this point happens in a terminal, so you should be comfortable with the basics: moving around with `cd`, listing with `ls`, editing a file with `nano`, and reading what a command tells you when it fails. If any of that is new, **start with the command line basics** and come back.
::
### BIOS setup
@@ -342,13 +342,12 @@ Some essential apps youll likely need at some point, so might as well install
```bash [Terminal]
sudo apt update
sudo apt upgrade
sudo apt install nano btop ranger git duf neofetch samba cifs-utils tree unzip
sudo apt install nano btop ranger git duf samba cifs-utils tree unzip
```
Additionally:
- [gping](https://www.linode.com/docs/guides/how-to-use-gping-on-linux/) - Graphical ping tool
- [lazydocker](https://github.com/jesseduffield/lazydocker) - CLI Docker container manager
::note{to="/general/linux/handy-tools"}
What each of these does, plus a few more worth adding like `ncdu` and `lazydocker`, is detailed in **handy CLI tools**.
::
## Useful Features
### Firewall
+12 -11
View File
@@ -49,9 +49,9 @@ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
::note
From here on, we assume the stacks are installed in the `/docker` folder, created using the command:
From here on, we assume the stacks are installed in the `/srv/docker` folder, created using the command:
```bash [Terminal]
sudo mkdir /docker
sudo mkdir /srv/docker
```
::
@@ -67,9 +67,10 @@ sudo mkdir /docker
label: File structure we will create
tree:
/:
- docker:
- dockge:
- compose.yml
- srv:
- docker:
- dockge:
- compose.yml
---
::
@@ -77,14 +78,14 @@ tree:
#### Create the stack folder
```bash [Terminal]
cd /docker
cd /srv/docker
sudo mkdir dockge
```
#### Create the compose file
```bash [Terminal]
cd /docker/dockge
cd /srv/docker/dockge
sudo nano compose.yml
```
Paste the following:
@@ -101,10 +102,10 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /docker/dockge/data:/app/data
- /docker:/docker
- /srv/docker/dockge/data:/app/data
- /srv/docker:/srv/docker
environment:
- DOCKGE_STACKS_DIR=/docker
- DOCKGE_STACKS_DIR=/srv/docker
```
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
@@ -112,7 +113,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
#### Launch the container
```bash [Terminal]
cd /docker/dockge
cd /srv/docker/dockge
sudo docker compose up -d
```
+19 -17
View File
@@ -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
```
+20 -19
View File
@@ -31,18 +31,19 @@ This tutorial assumes you have a domain name pointing to your server, and that y
label: File structure to modify
tree:
/:
- docker:
- swag:
- config:
- dns-conf:
- ovh.ini
- nginx:
- dbip.conf
- nginx.conf
- proxy-confs:
- dockge.subdomain.conf
- compose.yml
- .env
- srv:
- docker:
- swag:
- config:
- dns-conf:
- ovh.ini
- nginx:
- dbip.conf
- nginx.conf
- proxy-confs:
- dockge.subdomain.conf
- compose.yml
- .env
---
::
@@ -71,7 +72,7 @@ services:
- EMAIL=${EMAIL}
- DOCKER_MODS=linuxserver/mods:swag-dbip|linuxserver/mods:swag-dashboard|linuxserver/mods:swag-auto-reload
volumes:
- /docker/swag/config:/config
- /srv/docker/swag/config:/config
ports:
- 80:80
- 443:443
@@ -131,7 +132,7 @@ You can use **File Browser Quantum** to browse and edit files instead of using t
::
```bash [Terminal]
sudo nano /docker/swag/config/dns-conf/ovh.ini
sudo nano /srv/docker/swag/config/dns-conf/ovh.ini
```
You should see:
@@ -163,7 +164,7 @@ Save with :kbd{value="Ctrl+O"}, then :kbd{value="Enter"}, and exit with :kbd{val
Now configure swag to access DBIP, the geolocation-based access control module. Open the `nginx.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/nginx.conf
sudo nano /srv/docker/swag/config/nginx/nginx.conf
```
Add the following line below the `http` section:
@@ -184,7 +185,7 @@ On the left, you'll see a list of currently "proxied" services (none yet). On th
![picture](https://www.linuxserver.io/user/pages/03.blog/introducing-swag-dashboard/example.png)
## DBIP
DBIP allows you to block connections based on countries. It relies on the configuration file named `dbip.conf` located in `/docker/swag/config/nginx`. [More info here](https://virtualize.link/secure/).
DBIP allows you to block connections based on countries. It relies on the configuration file named `dbip.conf` located in `/srv/docker/swag/config/nginx`. [More info here](https://virtualize.link/secure/).
In this example, well configure it to block a list of countries known to be the source of most malicious traffic. Well also configure a variable to allow internal server traffic, your boxs local network, and a potential VPN in the 10.x.x.x range to access your services, but not the open internet.
@@ -194,7 +195,7 @@ This configuration can be enabled or disabled per service (see the Dockge exampl
### Open dbip.conf
```bash [Terminal]
sudo nano /docker/swag/config/nginx/dbip.conf
sudo nano /srv/docker/swag/config/nginx/dbip.conf
```
### Make your changes
@@ -298,7 +299,7 @@ Dockge does not support multi-factor authentication. Exposing it online could co
Open the `dockge.subdomain.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
Configure it like this:
@@ -389,7 +390,7 @@ Wait a moment, then visit `https://dockge.mydomain.com` in your browser. You sho
SWAG includes templates for most known services, named `servicename.subdomain.conf.sample`. Just create the subdomain in your registrar's DNS zone (like OVH), point it to your main domain via a CNAME, then copy and rename the sample file:
```bash [Terminal]
cd /docker/swag/config/proxy-confs
cd /srv/docker/swag/config/proxy-confs
sudo cp servicename.subdomain.conf.sample servicename.subdomain.conf
```
@@ -83,7 +83,7 @@ Create a file `tunnelconfig.yml` to reference in your SWAG `compose.yaml`.
::
```bash [Terminal]
sudo nano /docker/swag/config/tunnelconfig.yml
sudo nano /srv/docker/swag/config/tunnelconfig.yml
```
Paste:
@@ -108,7 +108,7 @@ Now configure _Cloudflare Real IP_.
Open the `nginx.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/nginx.conf
sudo nano /srv/docker/swag/config/nginx/nginx.conf
```
Add the following at the end of the `http` section:
@@ -157,8 +157,8 @@ services:
ports:
- 81:81
volumes:
- /docker/swag/config:/config
- /docker/swag/config/fail2ban/fail2ban.sqlite3:/dashboard/fail2ban.sqlite3:ro
- /srv/docker/swag/config:/config
- /srv/docker/swag/config/fail2ban/fail2ban.sqlite3:/dashboard/fail2ban.sqlite3:ro
restart: unless-stopped
```
+10 -9
View File
@@ -21,11 +21,12 @@ It supports a simple local username/password login out of the box, which is what
---
tree:
/:
- docker:
- tinyauth:
- compose.yaml
- .env
- data/
- srv:
- docker:
- tinyauth:
- compose.yaml
- .env
- data/
---
::
@@ -33,7 +34,7 @@ tree:
### Create the data folder
```bash [Terminal]
sudo mkdir -p /docker/tinyauth/data
sudo mkdir -p /srv/docker/tinyauth/data
```
### Generate a password hash
@@ -61,7 +62,7 @@ services:
env_file:
- .env
volumes:
- /docker/tinyauth/data:/data
- /srv/docker/tinyauth/data:/data
ports:
- 3000:3000
```
@@ -180,7 +181,7 @@ In the Swag folders, create the file `tinyauth.subdomain.conf`:
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/tinyauth.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/tinyauth.subdomain.conf
```
Paste the following configuration:
@@ -230,7 +231,7 @@ Swag doesn't ship a ready-made include file for TinyAuth, so we'll add the forwa
### Open the app's subdomain.conf file
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
### Add the forward-auth check
+10 -9
View File
@@ -21,11 +21,12 @@ This makes it a good fit if you just need a simple, fast SSO backend, for exampl
---
tree:
/:
- docker:
- pocket-id:
- compose.yaml
- .env
- data/
- srv:
- docker:
- pocket-id:
- compose.yaml
- .env
- data/
---
::
@@ -33,7 +34,7 @@ tree:
### Create the data folder
```bash [Terminal]
sudo mkdir -p /docker/pocket-id/data
sudo mkdir -p /srv/docker/pocket-id/data
```
### Generate an encryption key
@@ -58,7 +59,7 @@ services:
env_file:
- .env
volumes:
- /docker/pocket-id/data:/app/data
- /srv/docker/pocket-id/data:/app/data
ports:
- 1411:1411
healthcheck:
@@ -159,7 +160,7 @@ In the Swag folders, create the file `id.subdomain.conf`:
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/id.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/id.subdomain.conf
```
Paste the following configuration:
@@ -243,7 +244,7 @@ https://tinyauth.mydomain.com/api/oauth/callback/pocketid
Copy the __Client ID__ and __Client Secret__ Pocket ID gives you, then edit TinyAuth's `.env` file:
```bash [Terminal]
sudo nano /docker/tinyauth/.env
sudo nano /srv/docker/tinyauth/.env
```
Add the following:
@@ -14,10 +14,11 @@ description: Install Uptime-Kuma to monitor your self-hosted services uptime, se
---
tree:
/:
- docker:
- uptime-kuma:
- data/
- compose.yaml
- srv:
- docker:
- uptime-kuma:
- data/
- compose.yaml
---
::
@@ -33,7 +34,7 @@ services:
image: louislam/uptime-kuma:2-slim
container_name: uptime-kuma
volumes:
- /docker/uptime-kuma/uptime-kuma-data:/app/data
- /srv/docker/uptime-kuma/uptime-kuma-data:/app/data
ports:
- 3200:3001 # <Host Port>:<Container Port>
restart: always
@@ -87,7 +88,7 @@ you can use **File Browser Quantum** to browse and edit your files instead of us
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
```
Paste the following config:
@@ -184,7 +185,7 @@ That's it! Uptime-Kuma is now exposed, and you can access it via `https://stats.
### Open the subdomain.conf file
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
```
### Add the forward-auth check and public paths
@@ -17,11 +17,12 @@ description: Install Dozzle to monitor Docker container logs in real time from a
---
tree:
/:
- docker:
- dozzle:
- compose.yaml
- .env
- data/
- srv:
- docker:
- dozzle:
- compose.yaml
- .env
- data/
---
::
@@ -125,7 +126,7 @@ In the Swag folder, create the `dozzle.subdomain.conf` file.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/dozzle.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dozzle.subdomain.conf
```
Paste the configuration below:
@@ -20,12 +20,13 @@ We will use the Docker image maintained by **LinuxServer.io**
---
tree:
/:
- docker:
- speedtest-tracker:
- compose.yaml
- .env
- data:
- config/
- srv:
- docker:
- speedtest-tracker:
- compose.yaml
- .env
- data:
- config/
---
::
@@ -61,7 +62,7 @@ services:
- DB_CONNECTION=sqlite
- SPEEDTEST_SCHEDULE=${SCHEDULE}
volumes:
- /docker/speedtest-tracker/data/config:/config
- /srv/docker/speedtest-tracker/data/config:/config
```
### Set your environment variables
@@ -110,7 +111,7 @@ Speedtest Tracker does not use multi-factor authentication. Exposing it on the i
Open the `speedtest.subdomain.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/speedtest.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/speedtest.subdomain.conf
```
Configure it like this:
@@ -18,12 +18,13 @@ Beszel includes a hub with a web UI and an agent that collects data from your se
---
tree:
/:
- docker:
- beszel:
- compose.yaml
- .env
- data/
- socket/
- srv:
- docker:
- beszel:
- compose.yaml
- .env
- data/
- socket/
---
::
@@ -195,7 +196,7 @@ In Swags config folders, create `beszel.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/beszel.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/beszel.subdomain.conf
```
Paste:
@@ -16,11 +16,12 @@ description: Install UpSnap to remotely wake up machines on your local network v
---
tree:
/:
- docker:
- upsnap:
- compose.yaml
- .env
- data/
- srv:
- docker:
- upsnap:
- compose.yaml
- .env
- data/
---
::
@@ -38,7 +39,7 @@ services:
network_mode: host
restart: unless-stopped
volumes:
- /docker/upsnap/data:/app/pb_data
- /srv/docker/upsnap/data:/app/pb_data
environment:
- TZ=Europe/Paris
- UPSNAP_SCAN_RANGE=${SCAN_RANGE}
@@ -137,7 +138,7 @@ In the Swag folders, create the file `upsnap.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/upsnap.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/upsnap.subdomain.conf
```
And paste the following configuration:
+7 -6
View File
@@ -25,11 +25,12 @@ Unlike Plex, Jellyfin has no cloud relay: to access your server outside your loc
---
tree:
/:
- docker:
- jellyfin:
- compose.yaml
- .env
- config/
- srv:
- docker:
- jellyfin:
- compose.yaml
- .env
- config/
- media:
- tvseries/
- movies/
@@ -61,7 +62,7 @@ services:
- PGID=${GUID}
- TZ=Europe/Paris
volumes:
- /docker/jellyfin/config:/config
- /srv/docker/jellyfin/config:/config
- /media:/media
restart: unless-stopped
devices:
+14 -13
View File
@@ -26,13 +26,14 @@ Heres the system well set up:
---
tree:
/:
- docker:
- seedbox:
- qbittorrent:
- config/
- gluetun/
- compose.yaml
- .env
- srv:
- docker:
- seedbox:
- qbittorrent:
- config/
- gluetun/
- compose.yaml
- .env
- "media # linked to Jellyfin and Qbittorrent":
- "downloads/ # generic downloads, selected in settings"
- "movies/ # used for downloading movies"
@@ -72,7 +73,7 @@ services:
- GSP_QBT_USERNAME=${ID}
- GSP_QBT_PASSWORD=${PW}
volumes:
- /docker/seedbox/qbittorrent/config:/config
- /srv/docker/seedbox/qbittorrent/config:/config
- /media:/media
depends_on:
- gluetun
@@ -83,7 +84,7 @@ services:
restart: unless-stopped
mem_limit: 4g
volumes:
- /docker/gluetun/config.toml:/gluetun/auth/config.toml:ro
- /srv/docker/gluetun/config.toml:/gluetun/auth/config.toml:ro
devices:
- /dev/net/tun:/dev/net/tun
ports:
@@ -133,16 +134,16 @@ Open a terminal to generate the authentication key:
sudo docker run --rm qmcgaw/gluetun genkey
```
Note the key, then create the `/docker/gluetun` folder:
Note the key, then create the `/srv/docker/gluetun` folder:
```bash [Terminal]
sudo mkdir /docker/gluetun
sudo mkdir /srv/docker/gluetun
```
Create the `config.toml` file:
```bash [Terminal]
sudo nano /docker/gluetun/config.toml
sudo nano /srv/docker/gluetun/config.toml
```
Enter:
@@ -272,7 +273,7 @@ Now create/edit `seedbox.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/seedbox.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/seedbox.subdomain.conf
```
Paste the following config (check the port):
+25 -24
View File
@@ -23,21 +23,22 @@ Well start by deploying the stack and then proceed to configure each app and
---
tree:
/:
- docker:
- jellyfin:
- compose.yml
- .env
- config/
- sonarr:
- config/
- radarr:
- config/
- bazarr:
- config/
- prowlarr:
- config/
- seerr:
- config/
- srv:
- docker:
- jellyfin:
- compose.yml
- .env
- config/
- sonarr:
- config/
- radarr:
- config/
- bazarr:
- config/
- prowlarr:
- config/
- seerr:
- config/
- media:
- downloads/
- tvseries/
@@ -66,7 +67,7 @@ services:
- PGID=${PGID}
- TZ=Europe/Paris
volumes:
- /docker/jellyfin/config:/config
- /srv/docker/jellyfin/config:/config
- ${MEDIA_PATH}:/media
restart: unless-stopped
devices:
@@ -82,7 +83,7 @@ services:
- PGID=${PGID}
- TZ=Europe/Paris
volumes:
- /docker/sonarr/config:/config
- /srv/docker/sonarr/config:/config
- ${MEDIA_PATH}:/media
ports:
- 8989:8989
@@ -96,7 +97,7 @@ services:
- PGID=${PGID}
- TZ=Europe/Paris
volumes:
- /docker/radarr/config:/config
- /srv/docker/radarr/config:/config
- ${MEDIA_PATH}:/media
ports:
- 7878:7878
@@ -110,7 +111,7 @@ services:
- PGID=${PGID}
- TZ=Europe/Paris
volumes:
- /docker/prowlarr/data:/config
- /srv/docker/prowlarr/data:/config
ports:
- 9696:9696
restart: unless-stopped
@@ -122,7 +123,7 @@ services:
- LOG_LEVEL=info
- TZ=Europe/Paris
volumes:
- /docker/seerr/config:/app/config
- /srv/docker/seerr/config:/app/config
ports:
- 5055:5055
restart: unless-stopped
@@ -136,7 +137,7 @@ services:
- PGID=1000
- TZ=Europe/Paris
volumes:
- /docker/bazarr/config:/config
- /srv/docker/bazarr/config:/config
- ${MEDIA_PATH}:/media
ports:
- 6767:6767
@@ -173,10 +174,10 @@ MEDIA_PATH=
::note
Unlike the other containers here, Seerr's image doesn't use `PUID`/`PGID`; it always runs as UID `1000`. Make sure `/docker/seerr/config` is owned by that user, or Seerr won't be able to write to it:
Unlike the other containers here, Seerr's image doesn't use `PUID`/`PGID`; it always runs as UID `1000`. Make sure `/srv/docker/seerr/config` is owned by that user, or Seerr won't be able to write to it:
```bash [Terminal]
sudo chown -R 1000:1000 /docker/seerr/config
sudo chown -R 1000:1000 /srv/docker/seerr/config
```
::
@@ -434,7 +435,7 @@ Create and edit the file `films.subdomain.conf`:
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/films.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/films.subdomain.conf
```
Paste the following:
+7 -6
View File
@@ -16,11 +16,12 @@ description: Install Immich, a self-hosted alternative to Google Photos and iClo
---
tree:
/:
- docker:
- immich:
- library/
- compose.yaml
- .env
- srv:
- docker:
- immich:
- library/
- compose.yaml
- .env
---
::
@@ -100,7 +101,7 @@ In the SWAG folders, create a file named `immich.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/immich.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/immich.subdomain.conf
```
Then paste the following configuration:
+12 -11
View File
@@ -20,12 +20,13 @@ We'll be using the Docker image maintained by **LinuxServer.io**
---
tree:
/:
- docker:
- nextcloud:
- config/
- data/
- compose.yaml
- .env
- srv:
- docker:
- nextcloud:
- config/
- data/
- compose.yaml
- .env
---
::
@@ -45,8 +46,8 @@ services:
- PGID=${GUID}
- TZ=Etc/UTC
volumes:
- /docker/nextcloud/config:/config
- /docker/nextcloud/data:/data
- /srv/docker/nextcloud/config:/config
- /srv/docker/nextcloud/data:/data
ports:
- ${PORT}:443
restart: unless-stopped
@@ -54,7 +55,7 @@ services:
::note{to="/general/networking/samba"}
If youre using a NAS or network-shared drive via **Samba**, replace `/docker/nextcloud/data` with the path to your shared folder.
If youre using a NAS or network-shared drive via **Samba**, replace `/srv/docker/nextcloud/data` with the path to your shared folder.
::
### Set your environment variables
@@ -129,7 +130,7 @@ In Nextclouds files, edit the `config.php` file:
::
```bash [Terminal]
sudo nano /docker/nextcloud/config/www/nextcloud/config/config.php
sudo nano /srv/docker/nextcloud/config/www/nextcloud/config/config.php
```
Paste the following before the final `);`:
@@ -157,7 +158,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
In Swags folders, create the file `nextcloud.subdomain.conf`:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf
```
Paste the following:
@@ -16,12 +16,13 @@ description: Install File Browser Quantum, a modernized fork of File Browser, to
---
tree:
/:
- docker:
- filebrowser-quantum:
- compose.yaml
- data:
- config.yaml
- filebrowser.sqlite
- srv:
- docker:
- filebrowser-quantum:
- compose.yaml
- data:
- config.yaml
- filebrowser.sqlite
---
::
@@ -31,13 +32,13 @@ tree:
Create the data folder:
```bash [Terminal]
sudo mkdir -p /docker/filebrowser-quantum/data
sudo mkdir -p /srv/docker/filebrowser-quantum/data
```
Create the `config.yaml` file:
```bash [Terminal]
sudo nano /docker/filebrowser-quantum/data/config.yaml
sudo nano /srv/docker/filebrowser-quantum/data/config.yaml
```
Paste the following, adding one `sources` entry per folder you want to browse:
@@ -46,7 +47,7 @@ Paste the following, adding one `sources` entry per folder you want to browse:
server:
cacheDir: /home/filebrowser/data/tmp
sources:
- path: /docker
- path: /srv/docker
config:
defaultEnabled: true
- path: /media
@@ -68,16 +69,16 @@ services:
image: gtstef/filebrowser:beta
restart: unless-stopped
volumes:
- /docker:/docker
- /srv/docker:/srv/docker
- /media:/media
- /docker/filebrowser-quantum/data:/home/filebrowser/data
- /srv/docker/filebrowser-quantum/data:/home/filebrowser/data
ports:
- 8020:80
```
::note
Mount every folder you listed under `sources` in `config.yaml` at the same path inside the container (here `/docker` and `/media`), otherwise File Browser Quantum won't find them.
Mount every folder you listed under `sources` in `config.yaml` at the same path inside the container (here `/srv/docker` and `/media`), otherwise File Browser Quantum won't find them.
::
::tip{icon=""}
@@ -151,7 +152,7 @@ Restart the stack by clicking "deploy" and wait for SWAG to fully initialize.
In the Swag folders, create the file `fbq.subdomain.conf`.
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/fbq.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/fbq.subdomain.conf
```
And paste the following configuration:
+4 -4
View File
@@ -27,9 +27,9 @@ services:
ports:
- 3600:3000
volumes:
- /docker/pingvin/data:/opt/app/backend/data
- /docker/pingvin/data/img:/opt/app/frontend/public/img
- /docker/pingvin/uploads:/opt/app/backend/uploads # path to the folder where you want to store files uploaded to pingvin. Change to your preference.
- /srv/docker/pingvin/data:/opt/app/backend/data
- /srv/docker/pingvin/data/img:/opt/app/frontend/public/img
- /srv/docker/pingvin/uploads:/opt/app/backend/uploads # path to the folder where you want to store files uploaded to pingvin. Change to your preference.
depends_on:
clamav:
condition: service_healthy
@@ -121,7 +121,7 @@ In the Swag folders, create the `pingvin.subdomain.conf` file.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/pingvin.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/pingvin.subdomain.conf
```
Paste the configuration below:
@@ -29,11 +29,12 @@ For this setup, well use the **image maintained by LinuxServer.io**.
---
tree:
/:
- docker:
- code-server:
- compose.yaml
- .env
- config/
- srv:
- docker:
- code-server:
- compose.yaml
- .env
- config/
- (any folder you want to mount in VS Code)/
---
::
@@ -55,7 +56,7 @@ services:
- TZ=Etc/UTC
- HASHED_PASSWORD=${PW}
volumes:
- /docker/code-server/config:/config
- /srv/docker/code-server/config:/config
# add folders to mount in VS Code
# - /path/to/folder:/folder
ports:
@@ -172,7 +173,7 @@ Inside the Swag config folders, create the file `code.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/code.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/code.subdomain.conf
```
Paste the following configuration:
@@ -17,11 +17,12 @@ description: Install Forgejo, a lightweight self-hosted Git service to manage yo
---
tree:
/:
- docker:
- forgejo:
- compose.yaml
- .env
- data/
- srv:
- docker:
- forgejo:
- compose.yaml
- .env
- data/
---
::
@@ -118,7 +119,7 @@ Inside the Swag folders, create the file `forgejo.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/forgejo.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/forgejo.subdomain.conf
```
Paste the configuration below:
@@ -186,7 +187,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
Now open the `app.ini` file from the container's file system:
```bash [Terminal]
sudo nano /docker/forgejo/data/gitea/conf/app.ini
sudo nano /srv/docker/forgejo/data/gitea/conf/app.ini
```
Then modify the server section with your domain information:
@@ -102,7 +102,7 @@ Inside the Swag folders, create the file `tools.subdomain.conf`.
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/tools.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/tools.subdomain.conf
```
Paste the configuration below:
+12 -11
View File
@@ -35,18 +35,19 @@ This is how ads and malicious domains are blocked: Adguard blocks only the bad d
---
tree:
/:
- docker:
- adguard:
- confdir/
- workdir/
- compose.yaml
- .env
- srv:
- docker:
- adguard:
- confdir/
- workdir/
- compose.yaml
- .env
---
::
::note
We will also mount the `/docker/swag/config/etc/letsencrypt` folder to access Swag's SSL certificate.
We will also mount the `/srv/docker/swag/config/etc/letsencrypt` folder to access Swag's SSL certificate.
::
::steps{level="3"}
@@ -70,9 +71,9 @@ services:
- 853:853/tcp
- 3000:3000/tcp
volumes:
- /docker/adguardhome/confdir:/opt/adguardhome/conf
- /docker/adguardhome/workdir:/opt/adguardhome/work
- /docker/swag/config/etc/letsencrypt:/swag-ssl:ro
- /srv/docker/adguardhome/confdir:/opt/adguardhome/conf
- /srv/docker/adguardhome/workdir:/opt/adguardhome/work
- /srv/docker/swag/config/etc/letsencrypt:/swag-ssl:ro
```
::tip{icon=""}
@@ -149,7 +150,7 @@ You can use **File Browser Quantum** to browse and edit files instead of using t
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/adguard.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/adguard.subdomain.conf
```
Paste the configuration below:
+8 -7
View File
@@ -18,11 +18,12 @@ Vaultwarden is a fork of [Bitwarden](https://bitwarden.com/fr-fr/help/).
---
tree:
/:
- docker:
- vaultwarden:
- data/
- compose.yaml
- .env
- srv:
- docker:
- vaultwarden:
- data/
- compose.yaml
- .env
---
::
@@ -152,7 +153,7 @@ In SWAG's config folder, create the file `vault.subdomain.conf`:
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/vault.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/vault.subdomain.conf
```
And paste the following configuration:
@@ -267,7 +268,7 @@ https://vault.yourdomain.com/identity/connect/oidc-signin
Edit Vaultwarden's `.env` file:
```bash [Terminal]
sudo nano /docker/vaultwarden/.env
sudo nano /srv/docker/vaultwarden/.env
```
Add the following:
+23 -22
View File
@@ -39,14 +39,15 @@ Both modes can be configured on a per-application basis.
---
tree:
/:
- docker:
- authentik:
- .env
- compose.yml
- media/
- certs/
- custom-template/
- ssh/
- srv:
- docker:
- authentik:
- .env
- compose.yml
- media/
- certs/
- custom-template/
- ssh/
---
::
@@ -54,12 +55,12 @@ tree:
### Create the folders
```bash [Terminal]
sudo mkdir -p /docker/authentik/media /docker/authentik/certs /docker/authentik/custom-template /docker/authentik/ssh
sudo mkdir -p /srv/docker/authentik/media /srv/docker/authentik/certs /srv/docker/authentik/custom-template /srv/docker/authentik/ssh
```
### Generate secrets
Navigate to the `authentik` folder via `cd /docker/authentik` and generate a password and secret key to include in the `.env` file:
Navigate to the `authentik` folder via `cd /srv/docker/authentik` and generate a password and secret key to include in the `.env` file:
```bash [Terminal]
sudo echo "PG_PASS=$(openssl rand 36 | base64)" >> .env
@@ -70,7 +71,7 @@ sudo echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" >> .env
To generate the keys, we created the folders ahead of deployment using Dockge. Dockge will prevent you from creating a stack with the same name in these folders unless a `compose.yml` file exists. So, create an empty `compose.yml` so it appears as an inactive stack:
```bash [Terminal]
sudo nano /docker/authentik/compose.yml
sudo nano /srv/docker/authentik/compose.yml
```
::
@@ -216,7 +217,7 @@ You can use **File Browser Quantum** to navigate and edit files instead of using
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/authentik-server.conf
sudo nano /srv/docker/swag/config/nginx/authentik-server.conf
```
Verify that the following variables are set correctly:
@@ -233,7 +234,7 @@ If not, make the necessary changes, then save with :kbd{value="Ctrl+O"}, :kbd{va
Create the `auth.subdomain.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/auth.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/auth.subdomain.conf
```
Paste the following configuration:
@@ -356,7 +357,7 @@ Why do this when Dockge already has authentication? Because Dockge uses weak HTT
Edit the file `dockge.mydomain.com`:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
Uncomment the two lines `#include /config/nginx/authentik-server.conf;`
@@ -437,10 +438,10 @@ We assume youve already installed [Docker](/serveex/core/docker) and [SWAG](/
On your remote machine, use [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs) to create a stack named `authentik-outpost`.
If you havent installed [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), create a folder `/docker/authentik-outpost`, or directly via command line:
If you havent installed [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), create a folder `/srv/docker/authentik-outpost`, or directly via command line:
```bash [Terminal]
sudo mkdir -P /docker/authentik-outpost
sudo mkdir -P /srv/docker/authentik-outpost
```
::tip{icon="" to="/serveex/files/file-browser-quantum"}
@@ -455,7 +456,7 @@ Create the `compose.yaml` file or paste the configuration directly into Dockge i
Via command line:
```bash [Terminal]
sudo nano /docker/authentik-outpost/compose.yaml
sudo nano /srv/docker/authentik-outpost/compose.yaml
```
Paste the following configuration, updating the version in `{AUTHENTIK_TAG:proxy:2024.2.3}`{lang=properties} to match your Authentik server version.
@@ -485,7 +486,7 @@ services:
Go to the SWAG stack on the remote machine (or edit directly using Dockge) and add the authentik-outpost network in the configuration file like this (see `networks` section):
```bash [Terminal]
sudo nano /docker/swag/compose.yaml
sudo nano /srv/docker/swag/compose.yaml
```
```yaml [compose.yaml]
@@ -519,7 +520,7 @@ If using [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déploye
Otherwise, via terminal:
```bash [Terminal]
cd /docker/swag/
cd /srv/docker/swag/
sudo docker compose up -d
```
@@ -530,7 +531,7 @@ Create (or fill using Dockge) the `.env` file in the `authentik-outpost` directo
Via command line:
```bash [Terminal]
sudo nano /docker/authentik-outpost/.env
sudo nano /srv/docker/authentik-outpost/.env
```
Paste the following configuration:
@@ -556,7 +557,7 @@ If using Dockge, deploy the stack.
Otherwise, via terminal:
```bash [Terminal]
cd /docker/authentik-outpost/
cd /srv/docker/authentik-outpost/
sudo docker compose up -d
```
@@ -569,7 +570,7 @@ Now, lets configure SWAG.
Open the `authentik-server.conf` file:
```bash [Terminal]
sudo nano /docker/swag/config/nginx/authentik-server.conf
sudo nano /srv/docker/swag/config/nginx/authentik-server.conf
```
In the file, change `authentik-server` to `authentik-outpost` as shown:
+9 -8
View File
@@ -29,11 +29,12 @@ Arcane needs access to the Docker socket to manage containers, which is effectiv
---
tree:
/:
- docker:
- arcane:
- compose.yaml
- .env
- data/
- srv:
- docker:
- arcane:
- compose.yaml
- .env
- data/
---
::
@@ -61,7 +62,7 @@ services:
env_file:
- .env
volumes:
- /docker/arcane/data:/app/data
- /srv/docker/arcane/data:/app/data
networks:
- arcane-internal
ports:
@@ -200,7 +201,7 @@ In the Swag folders, create the file `arcane.subdomain.conf`:
::
```bash [Terminal]
sudo nano /docker/swag/config/nginx/proxy-confs/arcane.subdomain.conf
sudo nano /srv/docker/swag/config/nginx/proxy-confs/arcane.subdomain.conf
```
Paste the following configuration:
@@ -275,7 +276,7 @@ services:
- MANAGER_API_URL=http://10.8.0.3:3552
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /docker/arcane-agent/data:/app/data
- /srv/docker/arcane-agent/data:/app/data
```
::note