Better sh hl

This commit is contained in:
2025-08-10 22:59:47 +00:00
parent 6eaf8a5c94
commit 876d0a6ff5
28 changed files with 134 additions and 118 deletions

View File

@ -20,15 +20,15 @@ main:
4. [Install Debian and Set Up SSH](https://www.howtoforge.com/tutorial/debian-minimal-server/)
5. Install sudo and add a user to the sudo group for administrative privileges.
Log in as root:
```shell
```sh
su -
```
Enter your password, then type:
```shell
```sh
apt install sudo
```
Add the user to the sudo group:
```shell
```sh
adduser <username> sudo
```
@ -42,7 +42,7 @@ main:
## Must-Have CLI Apps
---
Some essential apps youll likely need at some point, so might as well install them early:
```shell
```sh
sudo apt update
sudo apt upgrade
sudo apt install vim btop ranger git duf neofetch samba cifs-utils tree unzip ufw
@ -65,7 +65,7 @@ Additionally:
### File Transfer via rsync
```shell
```sh
sudo rsync -avhHSP /source /destination
```
::alert{type="info" icon="exclamation-circle"}

View File

@ -22,7 +22,7 @@ Docker, to install deployable services in seconds and manage them with just a fe
---
Add the Docker repositories and GPG key:
```shell
```sh
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
@ -37,7 +37,7 @@ sudo apt-get update
Install the packages:
```shell
```sh
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
@ -49,7 +49,7 @@ That's it!
:::list{type="info"}
- From here on, we assume the stacks are installed in the `/docker` folder, created using the command:
:::
```shell
```sh
sudo mkdir /docker
::
@ -63,7 +63,7 @@ That's it!
File structure we will create:
```console
```sh
root
└── docker
└── dockge
@ -72,14 +72,14 @@ root
Create the stack folder:
```shell
```sh
cd /docker
sudo mkdir dockge
```
Then create the `compose.yml` file in this folder using `vim`:
```shell
```sh
cd /docker/dockge
sudo vi compose.yml
```
@ -107,7 +107,7 @@ Press `Esc` and type `:x` to save and exit.
To launch the container:
```shell
```sh
cd /docker/dockge
sudo docker compose up -d
```

View File

@ -41,7 +41,7 @@ Below is an example exposing Dockge. We will install SWAG along with the dbip mo
File structure to be modified:
```console
```sh
root
└── docker
└── swag
@ -133,7 +133,7 @@ In CLI, go to the dns-conf folder and edit the `ovh.ini` file:
You can use [File Browser](/serveex/files/file-browser) to browse and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/dns-conf/ovh.ini
```
@ -163,7 +163,7 @@ Save and exit the file.
Now configure swag to access DBIP, the geolocation-based access control module. Open the `nginx.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/nginx.conf
```
@ -193,7 +193,7 @@ This configuration can be enabled or disabled per service (see the Dockge exampl
Open `dbip.conf`:
```shell
```sh
sudo vi /docker/swag/config/nginx/dbip.conf
```
@ -278,7 +278,7 @@ Now it's time to expose Dockge on the internet so you can access and manage your
Open the `dockge.subdomain.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
@ -363,7 +363,7 @@ Wait a moment, then visit `https://dockge.mydomain.com` in your browser — you
---
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:
```shell
```sh
cd /docker/swag/config/proxy-confs
sudo cp servicename.subdomain.conf.sample servicename.subdomain.conf
```

View File

@ -63,7 +63,7 @@ So only VPN-connected devices can communicate with each other on the VPN, not wi
Folder structure:
```console
```sh
root
└── docker
└── wg-easy
@ -142,7 +142,7 @@ Deploy the stack.
To allow communication between VPN clients, enable:
```shell
```sh
sudo sysctl net.ipv4.ip_forward=1
sudo sysctl net.ipv4.conf.all.src_valid_mark=1
```
@ -172,7 +172,7 @@ To configure clients, download the config files from the server:
Folder structure:
```console
```sh
root
└── docker
└── wireguard
@ -187,7 +187,7 @@ Create the folder `/docker/wireguard/config/wg_confs`:
__Tip:__ Use [File Browser](/serveex/files/file-browser) to browse and edit files without terminal
::
```shell
```sh
sudo mkdir -p /docker/wireguard/config/wg_confs
```
@ -196,14 +196,14 @@ Copy the `wg0.conf` file downloaded earlier:
::alert{type="success"}
__Tip:__ Easiest way is to transfer the file via SFTP to `/home/youruser`, then move it:
```shell
```sh
sudo cp ~/wg0.conf /docker/wireguard/config/wg_confs
```
::
Create `compose.yaml` in `/docker/wireguard`:
```shell
```sh
sudo vi /docker/wireguard/compose.yaml
```
@ -230,7 +230,7 @@ Press `Esc` then type `:x` to save and exit.
Start the container:
```shell
```sh
cd /docker/wireguard
sudo docker compose up -d
```

View File

@ -39,7 +39,7 @@ Both modes can be configured on a per-application basis.
## Installation
---
Folder structure:
```console
```sh
root
└── docker
└── authentik
@ -53,13 +53,13 @@ root
Create the folders:
```shell
```sh
sudo mkdir -p /docker/authentik/media /docker/authentik/certs /docker/authentik/custom-template /docker/authentik/ssh
```
Navigate to the `authentik` folder and generate a password and secret key to include in the `.env` file:
```shell
```sh
sudo echo "PG_PASS=$(openssl rand 36 | base64)" >> .env
sudo echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" >> .env
```
@ -68,7 +68,7 @@ sudo echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" >> .env
:::list{type="info"}
- 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:
:::
```shell
```sh
sudo vi /docker/authentik/compose.yml
::
@ -205,7 +205,7 @@ Open the `authentik-server.conf` file:
You can use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/authentik-server.conf
```
@ -220,7 +220,7 @@ If not, press `i` to enter edit mode, make the necessary changes, then save and
Create the `auth.subdomain.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/auth.subdomain.conf
```
@ -335,7 +335,7 @@ Why do this when Dockge already has authentication? Because Dockge uses weak HTT
Edit the file `dockge.mydomain.com`:
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
@ -417,7 +417,7 @@ On your remote machine, use [Dockge](/serveex/core/docker/#installer-dockge-pour
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:
```shell
```sh
sudo mkdir -P /docker/authentik-outpost
```
@ -430,7 +430,7 @@ Create the `compose.yaml` file or paste the configuration directly into Dockge i
Via command line:
```shell
```sh
sudo vi /docker/authentik-outpost/compose.yaml
```
Enter edit mode by pressing `i` and paste the following configuration, updating the version in `{AUTHENTIK_TAG:proxy:2024.2.3}`{lang=properties} to match your Authentik server version.
@ -457,7 +457,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):
```shell
```sh
sudo vi /docker/swag/compose.yaml
```
@ -488,7 +488,7 @@ If using [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déploye
Otherwise, via terminal:
```shell
```sh
cd /docker/swag/
sudo docker compose up -d
```
@ -497,7 +497,7 @@ Create (or fill using Dockge) the `.env` file in the `authentik-outpost` directo
Via command line:
```shell
```sh
sudo vi /docker/authentik-outpost/.env
```
@ -521,7 +521,7 @@ If using Dockge, deploy the stack.
Otherwise, via terminal:
```shell
```sh
cd /docker/authentik-outpost/
sudo docker compose up -d
```
@ -532,7 +532,7 @@ Now, lets configure SWAG.
Open the `authentik-server.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/authentik-server.conf
```
@ -551,24 +551,24 @@ Then configure the applications to protect as you did on your main server, wheth
---
On the source machine, dump the database:
```shell
```sh
sudo docker exec authentik-postgres pg_dump -U authentik -F t authentik > /path/to/mydb.tar
```
Then transfer it to the target machine. On the target machine, copy the file into the Docker container:
```shell
```sh
cp /path/to/mydb.tar authentik-postgres:/path/to/wherever
```
(Optional) Purge existing tables:
```shell
```sh
sudo docker exec -i authentik-postgres psql -U authentik -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'authentik' AND pid <> pg_backend_pid();" && sudo docker exec -i authentik-postgres psql -U authentik -d postgres -c "DROP DATABASE IF EXISTS authentik;" && sudo docker exec -i authentik-postgres psql -U authentik -d postgres -c "CREATE DATABASE authentik;"
```
Restore the database:
```shell
```sh
sudo docker exec authentik-postgresql pg_restore -U authentik -d authentik /path/to/wherever/mydb.tar
```

View File

@ -97,7 +97,7 @@ Create a file `tunnelconfig.yml` to reference in your SWAG `compose.yaml`.
__Tip:__ Use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using the terminal.
::
```shell
```sh
sudo vi /docker/swag/config/tunnelconfig.yml
```
@ -120,7 +120,7 @@ Now configure _Cloudflare Real IP_.
Open the `nginx.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/nginx.conf
```

View File

@ -22,7 +22,7 @@ main:
---
Folder structure
```console
```sh
root
└── docker
└── uptime-kuma
@ -84,7 +84,7 @@ In the Swag folders, create the `stats.subdomain.conf` file.
you can use [File Browser](/serveex/files/file-browser) to browse and edit your files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
```
Enter insert mode with `i` and paste the following config:

View File

@ -21,7 +21,7 @@ main:
---
Folder structure
```console
```sh
root
└── docker
└── dozzle
@ -114,7 +114,7 @@ In the Swag folder, create the `dozzle.subdomain.conf` file.
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to browse and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/dozzle.subdomain.conf
```
Enter edit mode by pressing `i` and paste the configuration below:

View File

@ -27,7 +27,7 @@ main:
File structure:
```console
```sh
root
└── docker
└── speedtest-tracker
@ -37,7 +37,7 @@ root
In a terminal, generate a key using the following command:
```shell
```sh
echo -n 'base64:'; openssl rand -base64 32;
```
@ -67,7 +67,7 @@ services:
Find your `PUID` and `GUID` by running the following command:
```shell
```sh
id yourusername
```
@ -104,7 +104,7 @@ Now we want to expose Speedtest Tracker to the internet so you can access it rem
Open the `speedtest.subdomain.conf` file:
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/speedtest.subdomain.conf
```

View File

@ -26,7 +26,7 @@ Beszel includes a hub with a web UI and an agent that collects data from your se
Folder structure
```console
```sh
root
└── docker
└── beszel
@ -191,7 +191,7 @@ In Swags config folders, create `beszel.subdomain.conf`.
__Tip:__ Use [File Browser](/serveex/files/file-browser) to browse and edit files instead of terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/beszel.subdomain.conf
```

View File

@ -22,7 +22,7 @@ main:
Folder structure
```console
```sh
root
└── docker
└── upsnap
@ -129,7 +129,7 @@ In the Swag folders, create the file `upsnap.subdomain.conf`.
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate your files and edit documents instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/upsnap.subdomain.conf
```
Enter edit mode by pressing `i`, and paste the following configuration:

View File

@ -34,7 +34,7 @@ We'll also install [Tautulli](https://docs.linuxserver.io/images/docker-tautulli
## Install Plex
---
Folder structure:
```console
```sh
root
├── docker
│ ├── plex
@ -114,7 +114,7 @@ services:
Find your PUID and GUID by running:
```shell
```sh
id username
```
@ -211,7 +211,7 @@ Copy and rename the file `tautulli.subdomain.conf.sample` to `tautulli.subdomain
**Tip:** Use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using terminal commands.
::
```shell
```sh
sudo cp /docker/swag/config/nginx/proxy-confs/tautulli.subdomain.conf.sample /docker/swag/config/nginx/proxy-confs/tautulli.subdomain.conf
sudo vi /docker/swag/config/nginx/proxy-confs/tautulli.subdomain.conf
```

View File

@ -31,7 +31,7 @@ Heres the system well set up:
---
Folder structure
```console
```sh
root
├── docker
│ └── seedbox
@ -128,19 +128,19 @@ We now need to allow the mod to fetch info from Gluetun, which only allows encry
Open a terminal to generate the authentication key:
```shell
```sh
sudo docker run --rm qmcgaw/gluetun genkey
```
Note the key, then create the `/docker/gluetun` folder:
```shell
```sh
sudo mkdir /docker/gluetun
```
Create the `config.toml` file:
```shell
```sh
sudo vi /docker/gluetun/config.toml
```
@ -253,7 +253,7 @@ Now create/edit `seedbox.subdomain.conf`.
__Terminal-free tip:__ use [File Browser](/serveex/files/file-browser) to edit files instead of using the terminal.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/seedbox.subdomain.conf
```

View File

@ -29,7 +29,7 @@ Well start by deploying the stack and then proceed to configure each app and
Folder structure:
```console
```sh
root
├── docker
│ ├── plex
@ -430,7 +430,7 @@ Create and edit the file `films.subdomain.conf`:
__Tip:__ you can use [File Browser](/serveex/files/file-browser) to browse and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/films.subdomain.conf
```

View File

@ -19,7 +19,7 @@ main:
---
Folder structure
```console
```sh
root
└── docker
└── immich
@ -96,7 +96,7 @@ In the SWAG folders, create a file named `immich.subdomain.conf`.
:::
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/immich.subdomain.conf
```
Press `i` to enter insert mode, then paste the following configuration:

View File

@ -25,7 +25,7 @@ main:
File structure:
```console
```sh
root
└── docker
└── nextcloud
@ -63,7 +63,7 @@ services:
Find your `PUID` and `GUID` by running the following command:
```shell
```sh
id username
```
@ -125,7 +125,7 @@ In Nextclouds files, edit the `config.php` file:
__Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/nextcloud/config/www/nextcloud/config/config.php
```
@ -151,7 +151,7 @@ Press `Esc`, then save and exit by typing `:x` and hitting Enter.
In Swags folders, create the file `nextcloud.subdomain.conf`:
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf
```

View File

@ -98,7 +98,7 @@ Restart the stack by clicking "deploy" and wait for SWAG to fully initialize.
In the Swag folders, create the file `files.subdomain.conf`.
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/files.subdomain.conf
```

View File

@ -118,7 +118,7 @@ Dans les dossiers de Swag, créez le fichier `pingvin.subdomain.conf`.
:::
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/pingvin.subdomain.conf
```
Entrez en modification avec la touche `i` et collez la configuration ci-dessous :

View File

@ -28,7 +28,7 @@ main:
Folder structure
```console
```sh
root
├── docker
│ └── code-server
@ -71,13 +71,13 @@ services:
Choose a password and generate its hash:
```shell
```sh
echo -n "yourpassword" | npx argon2-cli -e
```
Save the result carefully. Find your PUID and GUID with:
```shell
```sh
id yourusername
```
@ -158,7 +158,7 @@ Inside the Swag config folders, create the file `code.subdomain.conf`.
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit your files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/code.subdomain.conf
```

View File

@ -21,7 +21,7 @@ main:
---
Folder structure
```console
```sh
root
└── docker
└── gitea
@ -110,7 +110,7 @@ Inside the Swag folders, create the file `gitea.subdomain.conf`.
__Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit your files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/gitea.subdomain.conf
```
Press `i` to enter edit mode and paste the configuration below:
@ -176,7 +176,7 @@ Press `Esc`, then save and exit by typing `:x` and hitting `Enter`.
Now open the `app.ini` file from the container's file system:
```shell
```sh
sudo vi /docker/gitea/data/gitea/conf/app.ini
```

View File

@ -100,7 +100,7 @@ Inside the Swag folders, create the file `tools.subdomain.conf`.
✨ __Tip:__ You can use [File Browser](/serveex/files/file-browser) to navigate and edit your files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/tools.subdomain.conf
```

View File

@ -40,7 +40,7 @@ This is how ads and malicious domains are blocked—Adguard blocks only the bad
---
Folder structure:
```console
```sh
root
└── docker
└── adguard
@ -147,7 +147,7 @@ Create and open the file `adguard.subdomain.conf`
You can use [File Browser](/serveex/files/file-browser) to browse and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/adguard.subdomain.conf
```

View File

@ -21,7 +21,7 @@ Vaultwarden is a fork of [Bitwarden](https://bitwarden.com/fr-fr/help/).
---
Folder structure:
```console
```sh
root
└── docker
└── vaultwarden
@ -75,7 +75,7 @@ services:
Next, generate a password hash to put in the `TOKEN` variable in `.env`:
```shell
```sh
echo -n 'yourpassword' | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4
```
@ -143,7 +143,7 @@ In SWAG's config folder, create the file `vault.subdomain.conf`:
__Tip:__ Use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using terminal commands.
::
```shell
```sh
sudo vi /docker/swag/config/nginx/proxy-confs/vault.subdomain.conf
```