How to Install SWAG (Secure Web Application Gateway) on Fedora Server Latest

Introduction

Secure Web Application Gateway (SWAG) is an open-source reverse proxy server that provides an easy and secure access to web applications running on Docker containers. This tutorial will show you how to install SWAG on Fedora Server Latest.

Prerequisites

Before proceeding with the installation, make sure that you have the following prerequisites:

Step 1: Clone the SWAG repository

First, clone the SWAG repository from GitHub using the following command:

git clone https://github.com/linuxserver/docker-swag.git

This will download the latest version of the SWAG Docker image and the necessary configuration files.

Step 2: Configure SWAG

Once you have cloned the SWAG repository, navigate to the docker-swag directory and create a docker-compose.yml file for configuration purposes:

cd docker-swag
touch docker-compose.yml

In the docker-compose.yml file, define the services that you want to run with SWAG. Here is an example configuration file:

version: "3"
services:
  swag:
    image: ghcr.io/linuxserver/swag
    container_name: swag
    restart: unless-stopped
    ports:
      - "443:443"
      - "80:80"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - URL=your-domain.com
      - SUBDOMAINS=www,
      - VALIDATION=http
      - DNSPLUGIN=
      - EMAIL=your-email-address
      - DHLEVEL=2048
      - PROPAGATION=
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
    networks:
      - proxy-tier

networks:
  proxy-tier:
    driver: bridge

You can customize this file as per your requirements. Make sure to replace the placeholder values with your own values. Note that if you want to use HTTPS, you must provide valid SSL certificates.

Step 3: Start the SWAG container

Once you have configured SWAG, start the container with the following command:

docker-compose up -d

This will start the SWAG container in the background.

Step 4: Verify the SWAG installation

To verify that SWAG is working correctly, open your web browser and navigate to https://your-domain.com. You should see a "Welcome to our app" message.

Conclusion

In this tutorial, we have shown you how to install SWAG on Fedora Server Latest. SWAG is a powerful reverse proxy server that can be used to secure and streamline access to various web applications running on Docker containers.

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!