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