Calvin Hobbes dfe71e3917
Modify SQL query to use 'bips' table instead of bans for the count
Use bips as it has the list of all persisted banned IPs. This should fix the incorrect count of banned IPs in the dashboard

Signed-off-by: Calvin Hobbes <5r91nrqo@duck.com>
2025-11-11 15:44:06 +00:00
2022-01-15 22:59:09 +02:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2023-05-18 14:52:29 -04:00
2019-05-30 20:35:20 +01:00
2025-04-29 15:57:33 +03:00

Dashboard Docker mod for SWAG

This mod adds a dashboard to SWAG powered by Goaccess.

Currently only works with a subdomain, not a subfolder.

Enable

In the container's docker arguments, set an environment variable DOCKER_MODS=linuxserver/mods:swag-dashboard.

If adding multiple mods, enter them in an array separated by |, such as DOCKER_MODS=linuxserver/mods:swag-dashboard|linuxserver/mods:swag-mod2.

Internal access using <server-ip>:81

Add a mapping of 81:81 to swag's docker run command or compose.

Internal access using dashboard.domain.com

Requires an internal DNS, add a rewrite of dashboard.domain.com to your server's IP address.

External access using dashboard.domain.com

Remove the allow/deny lines in /config/nginx/proxy-confs/dashboard.subdomain.com, and instead secure it some other way (like Authelia for example).

Usage

  • The application discovery scans for a list of known services, as well as enabled custom proxy confs that contain the following format:
      set $upstream_app <container/address>;
      set $upstream_port <port>;
      set $upstream_proto <protocol>;
      proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    
  • Either Swag Maxmind mod or Swag DBIP mod are required to enable the geo location graph.
  • Either Maxmind's or DB-IP's ASN mmdb are required under /config/geoip2db/asn.mmdb to enable the ASN graph.
  • To clear the dashboard stats, you must remove the logs (/config/log/nginx) and recreate the container.

Dashboard Support

There's a stats endpoint for integration with dashboards under https://dashboard.domain.com/?stats=true.

External Support

  • External fail2ban (not required when using swag's fail2ban) can be supported by mounting it to swag - /path/to/host/fail2ban.sqlite3:/dashboard/fail2ban.sqlite3:ro.
  • External logs (not required when using swag's logs) can be supported by mounting it to swag - /path/to/host/logs:/dashboard/logs:ro.

Example

Example

Description
No description provided
Readme GPL-3.0 6.5 MiB
Languages
Text 100%