This tutorial will guide you on how to install SWAG (Secure Web Application Gateway) on Elementary OS Latest. SWAG is a Docker container that provides SSL/TLS encryption, reverse proxy, and various web technologies to securely and easily host websites and applications. This tutorial will use the Docker container from linuxserver.io's Github repository.
Before installing SWAG, you need to make sure you have the following prerequisites installed:
If you haven't installed these prerequisites, follow the instructions from the Docker documentation.
git clone https://github.com/linuxserver/docker-swag.git
cd docker-swag
docker-compose.yml
file to docker-compose.override.yml
:cp docker-compose.sample.yml docker-compose.override.yml
docker-compose.override.yml
file to specify your email address and domain name:nano docker-compose.override.yml
# - EMAIL=me@example.com
and remove the #
to uncomment the line.me@example.com
with your email address, enclosed in quotes.# - URL=example.com
and remove the #
to uncomment the line.example.com
with your domain name, enclosed in quotes.Ctrl
+ X
, then Y
, then Enter
.docker-compose up -d
docker ps
You should see a container named docker-swag
.
To configure SWAG, you can edit the docker-compose.override.yml
file or create a new file called docker-compose.yml
. This file specifies the settings for the SWAG container, such as the ports to listen on and the SSL/TLS certificates to use.
You can also mount volumes to the container to provide data or configuration files to your web applications. For example, to mount a volume from your host system to the container, add the following lines to your docker-compose.yml
or docker-compose.override.yml
file:
volumes:
- /path/on/host:/path/on/container
Replace /path/on/host
with the path to the directory or file on your host system, and /path/on/container
with the path to the directory or file in the container.
In this tutorial, you learned how to install SWAG on Elementary OS Latest using Docker Compose. You also learned how to configure SWAG to listen on different ports and mount volumes to the container. With SWAG, you can host web applications securely and easily.
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!