SWAG (Secure Web Application Gateway) is a Docker-based reverse proxy and one of the easiest and simplest ways to access your web applications securely. In this tutorial, we will be installing SWAG on NixOS latest.
Before proceeding with this tutorial, you need to have the following prerequisites installed on your system:
The following steps will help you to install SWAG on NixOS latest:
git clone https://github.com/linuxserver/docker-swag
cd docker-swag
.env.sample
file to .env
:cp .env.sample .env
.env
file in your favorite text editor and configure the following settings:# Domain name for your SWAG server
DOMAIN=yourdomain.com
# Email address to register SSL certificate request
EMAIL=youremail@gmail.com
# Enable Let's Encrypt SSL verification
STAGING=false
# Path to your SWAG data folder
DATA_DIR=/path/to/swag/data
# Path to your Nginx configuration folder
NGINX_DIR=/path/to/swag/nginx/
# Path to your Nginx.conf file
NGINX_CONF=/path/to/swag/nginx/nginx.conf
# Path to your Apache SSL configuration
APACHE_SSL_DIR=/path/to/swag/apache/
# Path to your Caddyfile
CADDYFILE=/path/to/swag/caddy/Caddyfile
# Path to your PHP configuration file
PHP_INI=/path/to/swag/php/php.ini
# Path to your HTTP/HTTPS certification folder
CERT_DIR=/path/to/swag/certs/
docker network create swag
docker-compose up -d
docker ps
You should see the SWAG container listed in the output.
Congratulations! You have successfully installed SWAG on NixOS latest.
In this tutorial, we have shown you how to install SWAG (Secure Web Application Gateway) on NixOS latest. SWAG is a simple and efficient way to access your web applications securely. With SWAG, you can enjoy a secure and reliable web experience, with the confidence that your data is protected.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!