In this tutorial, we will learn how to install SWAG (Secure Web Application Gateway) on Alpine Linux Latest. SWAG is an open-source Docker image that helps to provide a secure reverse proxy to web services running on your machine.
Before we begin with the installation, make sure that you have the following requirements:
To install Docker on Alpine Linux, execute the following command:
sudo apk add docker
To start Docker, execute the following command:
sudo service docker start
To install Docker Compose, execute the following command:
sudo apk add docker-compose
To clone SWAG from the GitHub repository, execute the following command:
git clone https://github.com/linuxserver/docker-swag.git
Before running SWAG, you need to configure it according to your requirements. Go to the SWAG directory and edit the .env
file as per your needs:
cd docker-swag
nano .env
In the .env
file, you can configure the following variables:
URL
- your domain name or IP addressTZ
- your timezonePUID
- user ID (defaults to 911
)PGID
- group ID (defaults to 911
)EMAIL
- your email address for SSL certificatesSTAGING
- set to 0
for production, 1
for testing.To start SWAG, execute the following command from the SWAG directory:
docker-compose up -d
This command will start the SWAG container in the background.
To verify SWAG, go to your web browser and type the following URL:
https://<your_domain_name>/admin/
If everything is set up correctly, you should see the SWAG admin panel.
Congratulations! You have successfully installed SWAG on Alpine Linux Latest. Now you can use the secure reverse proxy for your web applications.
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!