SWAG (Secure Web Application Gateway) is an open-source and docker-based application developed and maintained by Linuxserver Community. In this tutorial, we will walk through the steps to install the SWAG docker image from Linuxserver on MXLinux Latest (v19.x).
Before we start, a few prerequisites are required for the installation process:
If Docker Engine is not installed on your MXLinux system, you can run the following commands in the terminal to install it:
$ sudo apt-get update
$ sudo apt-get install docker.io
Once the installation is complete, verify the Docker Engine installation by running:
$ sudo systemctl status docker
You should see the status of the Docker service as 'active (running)'.
Docker Compose is required to manage the SWAG container, and if it is not installed on your system, follow these steps to install it:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version
You should see the version of Docker Compose installed on your system.
To install the SWAG docker image, we need to clone the SWAG repository from GitHub. Here are the steps to clone the repository:
Open the terminal and navigate to the directory where you want to clone the repository.
Run the following command to clone the SWAG repository:
$ git clone https://github.com/linuxserver/docker-swag.git
Before we can start the SWAG container, we need to configure some settings. Follow these steps to configure SWAG:
$ cd docker-swag
$ nano docker-compose.yml
After the configuration is complete, we can start the SWAG container by running the following command inside the docker-swag directory:
$ docker-compose up -d
This command will download the necessary images and start the SWAG container in the background. By default, the SWAG container will listen on port 443 and redirect HTTP requests to HTTPS.
After the container starts successfully, you can verify that it's running by running:
$ docker ps
You should see the SWAG container listed in the output.
Congratulations, you have successfully installed and configured SWAG on MXLinux Latest using Docker. You can now add your applications and services to the container for secure access over the internet.
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!