How to Install SWAG on EndeavourOS Latest

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.

Prerequisites

Before getting started, you will need:

Steps for Installing SWAG

  1. Begin by updating the package lists on your system:

    sudo pacman -Syy
    
  2. Install Git if not already installed by running:

    sudo pacman -S git
    
  3. Clone the SWAG repository from GitHub to your system:

    git clone https://github.com/linuxserver/docker-swag.git
    
  4. Change the working directory to the cloned repository:

    cd docker-swag
    
  5. 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
    
  6. Next, start the SWAG container:

    docker-compose up -d
    

    This may take a few minutes to complete depending on your internet connection.

  7. 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
    

How to Configure SWAG

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.

Conclusion

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!