SWAG, or Secure Web Application Gateway, is a popular web server and reverse proxy solution that helps to securely expose your web applications to the internet. This tutorial will guide you through the installation process of SWAG on EndeavourOS Latest.
Before getting started, you will need:
Begin by updating the package lists on your system:
sudo pacman -Syy
Install Git if not already installed by running:
sudo pacman -S git
Clone the SWAG repository from GitHub to your system:
git clone https://github.com/linuxserver/docker-swag.git
Change the working directory to the cloned repository:
cd docker-swag
Now create a .env file to define some environment variables which will be used in the docker-compose.yml file:
cp .env.sample .env
nano .env
Replace the following variables with your details:
# Your email address
EMAIL=your-email@example.com
# Your domain name
URL=example.com
Next, start the SWAG container:
docker-compose up -d
This may take a few minutes to complete depending on your internet connection.
Verify that the SWAG container is running by checking the container logs:
docker-compose logs -f
Once the container has successfully started, you should see output similar to the following:
Generating DH parameters, 2048 bit long safe prime, generator 2
This may take a long time
...
Created DHPARAMS
MAXMIND DATABASE CHECK:
Database is FTPing...done.
Starting nginx ... done
Starting swag ... done
After the installation, you can configure SWAG by modifying the docker-compose.yml
file located in the SWAG installation directory. For example, you can add additional web applications by adding new services to the docker-compose
file.
To update the configuration of an existing web application, you can modify the respective webroot
and proxy_pass
directives in the nginx.conf
file which can be found in the config/nginx
subdirectory.
In this tutorial, we have shown you how to install SWAG on EndeavourOS Latest. You are now ready to start serving your web applications securely with SWAG. Enjoy!
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!