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
+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
```