How to Install SWAG on Linux Mint Latest

In this tutorial, we will be installing SWAG (Secure Web Application Gateway) on Linux Mint. SWAG is a reverse proxy that provides secure services for various applications. It is a Docker-based container that allows you to quickly and easily set up HTTPS for your web applications.

Prerequisites

Before we start, we need to make sure that the following packages are installed:

If you don't have them yet, you can easily install them on your system. Execute the following commands:

sudo apt-get update
sudo apt-get install docker.io docker-compose -y

Once you have installed Docker and Docker Compose, you can start with the SWAG installation process.

Install SWAG

Follow the steps below to install SWAG on Linux Mint Latest:

  1. First, clone the SWAG repository from Github:
git clone https://github.com/linuxserver/docker-swag.git
  1. Next, navigate to the docker-swag directory:
cd docker-swag
  1. Now, we need to create a .env file to store all of our environment variables for the SWAG container. To create a new .env file, execute the following command:
nano .env
  1. In the .env file, enter the following environment variables:
# General Settings
TZ=yourtimezone
URL=yourdomain.com
SUBDOMAINS=www,
VALIDATION=http
DNSPLUGIN=cloudflare
EMAIL=youremail@gmail.com

# Cloudflare Settings
CF_API_EMAIL=youremail@gmail.com
CF_API_KEY=yourapikey

# Portainer Settings
USERDIR=/path/to/data
PGID=gid
PUID=uid

Make sure to replace the environment variables with your own values.

  1. Once you have entered your environment variables, save and close the .env file.

  2. Run the following command to start the SWAG container:

docker-compose up -d
  1. Wait for the container to start up. You can check the status by running the following command:
docker-compose ps

Once the container status is Up, you can access your web applications securely via HTTPS.

Congratulations! You have successfully installed SWAG on Linux Mint Latest using Docker.

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!