Get the most out of your SWAG with a dashboard!

The LSIO team has released sometimes ago a dashboard to monitor what is happening on your SWAG, here is how to implement it!

Get the most out of your SWAG with a dashboard!

Few months ago, I've introduced to you SWAG!  

Setup SWAG to safely expose your self-hosted applications to the internet
SWAG is a rebirth of letsencrypt docker image, a full fledged web server and reverse proxy that includes Nginx, Php7, Certbot (Let’s Encrypt client) and Fail2ban.

The LSIO team has released sometimes ago a dashboard to monitor what is happening on your SWAG, here is how to implement it!

SWAG Dashboard is a mod powered by GoAccess that provides a comprehensive overview of SWAG's operation.

This dashboard is provided by LSIO through a powerful Docker mod so it's super easily to setup!

You just need to integrate this line in your environment variables:

- DOCKER_MODS=linuxserver/mods:swag-dashboard

Let's add it into the full SWAG docker compose example from the article above, it will look like this:

version: "2.1"
services:
  swag:
    image: lscr.io/linuxserver/swag:latest
    container_name: swag
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Zurich
      - URL=yourdomain.xyz
      - SUBDOMAINS=wildcard
      - VALIDATION=dns
      - DNSPLUGIN=cloudflare
      - EMAIL=youremailaddress@protonmail.com
      - DOCKER_MODS=linuxserver/mods:swag-dashboard
    volumes:
      - ./config:/config
    ports:
      - 443:443
      - 80:80
    labels:
      - com.centurylinklabs.watchtower.enable=true
      - deunhealth.restart.on.unhealthy=true

For security reasons, the dashboard can only be accessible through the URL dashboard.yourdomain.xyz but obviously it's not something we want to open to the world. To access it, you need to create a DNS rewrite.

On my side, I'm using AdGuard Home which grants the ability to do DNS rewriting for all devices on my network, it suits perfectly that need.

You can also use other solutions, feel free to share them with to complete this article😉.

AdGuard Home: A world without ads and trackers!
You might have heard about Ublock Origin or PiHole, let me introduce to you AdGuard, and especially AdGuard Home!

DNS rewrite with Adguard Home

If you are an Adguard Home user:

  1. Open AdGuard
  2. Go to Filters > DNS rewrites
  3. Click on Add DNS rewrite
  4. As domain name, enter dashboard.yourdomain.xyz (replace with your own domain)
  5. As IP address, enter the IP address of your host where SWAG is running
  6. Click on Save
DNS rewrites in AdGuard

DNS rewrite with PiHole

If you are a PiHole user:

  1. Open PiHole
  2. Go to Local DNS Records
  3. As domain name, enter dashboard.yourdomain.xyz (replace with your own domain)
  4. As IP address, enter the IP address of your host where SWAG is running
  5. Click on Add
DNS rewrites in PiHole

Here we go! 🚀

You can now enjoy and dig into the good looking dashboard by accessing dashboard.yourdomain.xyz (replace with your own domain) 🎉

If you are looking for more details, please visit the official blog post from LSIO.

SWAG Dashboard
Looking for help?
If you are looking for some help or want a quick chat, please head over to the Discord Community!