Label terminal commands and directory trees in code blocks
This commit is contained in:
@@ -20,15 +20,15 @@ description: Step-by-step guide to install Debian 13 on a home server and set up
|
||||
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:
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
su -
|
||||
```
|
||||
Enter your password, then type:
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
apt install sudo
|
||||
```
|
||||
Add the user to the sudo group:
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
adduser <username> sudo
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ description: Step-by-step guide to install Debian 13 on a home server and set up
|
||||
|
||||
## Must-Have CLI Apps
|
||||
Some essential apps you’ll likely need at some point, so might as well install them early:
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt install nano btop ranger git duf neofetch samba cifs-utils tree unzip
|
||||
@@ -64,7 +64,7 @@ Additionally:
|
||||
|
||||
### File Transfer via rsync
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo rsync -avhHSP /source /destination
|
||||
```
|
||||
::note
|
||||
|
||||
@@ -22,7 +22,7 @@ Docker, to install deployable services in seconds and manage them with just a fe
|
||||
## Install Docker
|
||||
Add the Docker repositories and GPG key:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
# 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:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ That's it!
|
||||
::note
|
||||
|
||||
From here on, we assume the stacks are installed in the `/docker` folder, created using the command:
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo mkdir /docker
|
||||
```
|
||||
::
|
||||
@@ -62,7 +62,7 @@ From here on, we assume the stacks are installed in the `/docker` folder, create
|
||||
|
||||
File structure we will create:
|
||||
|
||||
```sh
|
||||
```text [Directory tree]
|
||||
root
|
||||
└── docker
|
||||
└── dockge
|
||||
@@ -71,14 +71,14 @@ root
|
||||
|
||||
Create the stack folder:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
cd /docker
|
||||
sudo mkdir dockge
|
||||
```
|
||||
|
||||
Then create the `compose.yml` file in this folder using `nano`:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
cd /docker/dockge
|
||||
sudo nano compose.yml
|
||||
```
|
||||
@@ -109,7 +109,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
|
||||
To launch the container:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
cd /docker/dockge
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ This tutorial assumes you have a domain name pointing to your server, and that y
|
||||
|
||||
File structure to be modified:
|
||||
|
||||
```sh
|
||||
```text [Directory tree]
|
||||
root
|
||||
└── docker
|
||||
└── swag
|
||||
@@ -138,7 +138,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.
|
||||
::
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/dns-conf/ovh.ini
|
||||
```
|
||||
|
||||
@@ -168,7 +168,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:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/nginx.conf
|
||||
```
|
||||
|
||||
@@ -195,7 +195,7 @@ This configuration can be enabled or disabled per service (see the Dockge exampl
|
||||
|
||||
Open `dbip.conf`:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/dbip.conf
|
||||
```
|
||||
|
||||
@@ -278,7 +278,7 @@ Dockge does not support multi-factor authentication. Exposing it online could co
|
||||
|
||||
Open the `dockge.subdomain.conf` file:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
sudo nano /docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
|
||||
```
|
||||
|
||||
@@ -361,7 +361,7 @@ Wait a moment, then visit `https://dockge.mydomain.com` in your browser — you
|
||||
## Exposing Another Service with SWAG
|
||||
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:
|
||||
|
||||
```sh
|
||||
```bash [Terminal]
|
||||
cd /docker/swag/config/proxy-confs
|
||||
sudo cp servicename.subdomain.conf.sample servicename.subdomain.conf
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user