Install SWAG (Secure Web Application Gateway) on Fedora CoreOS Latest
This tutorial will guide you through the installation of SWAG (Secure Web Application Gateway) from LinuxServer.io on Fedora CoreOS Latest using Docker.
Ingredients
To complete this tutorial, you will need:
- A machine running Fedora CoreOS Latest
- Docker installed on your Fedora CoreOS Latest machine
- Basic knowledge of Docker and Linux
Steps
1. Install Docker
Docker is a software platform for building and running applications in containers. To install Docker on your Fedora CoreOS Latest machine, follow these steps:
- Open a terminal window on your Fedora CoreOS Latest machine.
- Run the following command to install Docker:
sudo dnf install docker-ce
- Start the Docker service by running the following command:
sudo systemctl start docker
- Finally, enable the Docker service to start automatically at boot with the following command:
sudo systemctl enable docker
2. Pull SWAG Docker Container
To install SWAG, we will use the docker-compose.yml provided by the LinuxServer.io team.
- Create a new directory by running the following command:
mkdir swag
- Navigate to the newly created directory with the following command:
cd swag
- Download the docker-compose.yml file using the following command:
curl https://raw.githubusercontent.com/linuxserver/docker-swag/master/docker-compose.yml -o docker-compose.yml
3. Create Environment Variables
To get SWAG to work, you need to fill in a few sensitive environment variables. Replace the necessary variables with your information.
- Create a .env file by running the following command:
nano .env
- Fill in the necessary information in the .env file.
TZ=America/Los_Angeles
URL=<Your Domain Name>
SUBDOMAINS=<Your subdomains (comma separated)>
VALIDATION=http
- Save and close the file (CTRL+X, then Y, then ENTER).
4. Create Docker Containers
- Run the following command to create containers:
sudo docker-compose up -d
5. Verify
You can now visit your website using your browser, make sure you have correctly set up DNS records pointing to your server.
Congratulations, you have installed SWAG on Fedora CoreOS Latest using Docker!