尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
SelfThreatMap — live CrowdSec attack map with 30+ switchable flight-path styles (Docker/Unraid). Part of the Self suite.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Live attack map straight from your local CrowdSec database. Live-Angriffskarte direkt aus deiner lokalen CrowdSec-Datenbank.
📰 What's new / Neuigkeiten → CHANGELOG.md
SelfThreatMap shows the attacks from your local CrowdSec database live on a world map — all attack points are visible on load, city names appear when you zoom in. It is a dashboard on top of an existing CrowdSec installation; it does not detect or block anything itself (that stays CrowdSec's job), but it can lift bans with one click.
Part of the Self family (SelfMailer, SelfStream, SelfArchiver, SelfDashboard …) — same design system, same deploy style (GHCR → Unraid). Built on the original CrowdSec Threat Map.
TL;DR — world map with 30+ flight-path styles · 50+ profiles · search, ban status & unban · dynamic self-IP whitelist · login + optional 2FA · 12 languages · works offline
Features · Flight-path styles · Architecture · Quick start · Unraid · Configuration · Security · Tech stack · Development · Roadmap
🌍 Map
📊 Feed & actions
🎨 Platform
The signature feature: how each attack travels from its origin to your server. Pick from 30+ animated styles under Settings → Flight-path style (default: Rocket), with a live preview. Implemented in assets/js/rocket-styles.js — easy to extend.
| Group | Styles |
|---|---|
| Rockets | Rocket · Twin rocket · Arrow · Data packet |
| Comets & trails | Comet · Comet + sparks · Meteor · Fading trail · Gradient trail · Mist trail · Spark trail |
| Beams & lasers | Laser pulse · Constant beam · Neon tube · Lightning · Plasma orb |
| Particles & dots | Particle stream · Tracer · Bead chain · Fireflies · Inward pull · Echo ghosts · Double helix |
| Lines & special | Clean arc · Twin line · Morse dash · Sine wave · Pulse ring · Impact ring · Hologram |
| Classic (legacy) | Classic · Console (dashed arcs) · Minimal |
Browser ──▶ nginx :8080 ──┬─ /auth/*, login, setup, settings ──▶ auth.py (/config/auth.json)
├─ / (dashboard, protected via auth_request)
└─ /metrics, /unban, /whitelist-status
│
▼
crowdsec_exporter.py (127.0.0.1:9456)
│ reads crowdsec.db + GeoLite2-City.mmdb (read-only)
│ writes whitelist YAML (postoverflows)
└─ CrowdSec Local API (HTTP, machine login) → unban
docker run -d \
--name selfthreatmap \
--restart unless-stopped \
-p 8080:8080 \
-v /path/to/selfthreatmap/config:/config \
-v /path/to/crowdsec/data:/crowdsec/data:ro \
-v /path/to/crowdsec/postoverflows:/crowdsec/postoverflows \
-e SERVER_LAT=52.5200 \
-e SERVER_LON=13.4050 \
-e SERVER_NAME=Berlin \
-e LANGUAGE=en \
-e CROWDSEC_LAPI_URL=http://crowdsec:8080 \
-e CROWDSEC_LAPI_MACHINE_ID=selfthreatmap \
-e CROWDSEC_LAPI_PASSWORD='long-password' \
ghcr.io/s3lfcod3r/selfthreatmap:latest
Open http://<host>:8080 → create your admin user + password. Two-factor (TOTP) is optional — enable it afterwards under Settings by scanning the QR code (Google Authenticator / SelfAuthenticator). Compose file: docker/docker-compose.yml.
🔑 Unban via CrowdSec LAPI (no Docker socket): create a dedicated machine inside the CrowdSec container and pass its credentials:
docker exec crowdsec cscli machines add selfthreatmap --password 'long-password' -f /dev/null(-f /dev/nullmatters — otherwise CrowdSec's ownlocal_api_credentials.yamlis overwritten.) Without these values the map works, but unban is disabled.
💡 Tip: coordinates — right-click in Google Maps → "What's here?". CrowdSec data path:
docker inspect crowdsec | grep -A5 "Mounts".
💡 GeoIP / city names: without a GeoIP database only country points are shown. Download MaxMind GeoLite2-City for free, put
GeoLite2-City.mmdbinto the CrowdSec data folder and restart the container.
Unraid → Apps → search selfthreatmap → install → fill in SERVER_LAT / SERVER_LON and the CrowdSec data path → Apply. Or add the template from
https://raw.githubusercontent.com/s3lfcod3r/selfthreatmap/main/unraid/selfthreatmap.xml.
Dashboard: http://YOUR-UNRAID-IP:8080.
⚠️ Mount
/config: account, 2FA and session key live in/config/auth.json— without this volume your user is gone after an update.
Environment variables (no common prefix).
| Variable | Required | Default | Purpose |
|---|---|---|---|
SERVER_LAT / SERVER_LON | ✅ | 0.0 | Your server coordinates (the map's home point) |
SERVER_NAME | – | MeinServer | Display name of the home marker |
LANGUAGE | – | de | Default UI language: de or en (12 languages in the app) |
CROWDSEC_LAPI_URL | – | http://crowdsec:8080 | CrowdSec Local API, e.g. http://192.168.1.7:8080 |
CROWDSEC_LAPI_MACHINE_ID / CROWDSEC_LAPI_PASSWORD | for unban | – | Credentials of a dedicated CrowdSec machine (cscli machines add) |
CROWDSEC_DB_PATH | – | /crowdsec/data/crowdsec.db | CrowdSec SQLite database |
CROWDSEC_MMDB_PATH | – | /crowdsec/data/GeoLite2-City.mmdb | GeoIP database (city names) |
CACHE_TTL / DAYS_BACK | – | 60 / 365 | Metric cache (s) and history window (days) |
WHITELIST_ENABLED | – | true | Dynamic self-IP whitelist |
WHITELIST_FILE | – | /crowdsec/postoverflows/s01-whitelist/my-whitelist.yaml | Whitelist file |
WHITELIST_INTERVAL | – | 900 | Whitelist check interval (s); each run also lifts a ban on your own IP via the LAPI. A changed whitelist file takes effect at the next CrowdSec restart |
AUTH_ENABLED | – | true | Login (+ optional 2FA) for the whole dashboard |
COOKIE_SECURE | – | false | true when served over HTTPS only |
auth_request; first account is created in the browser — no secrets in env varsHttpOnly, SameSite=Strict); login rate limit and lockout after 5 failures (15 min)127.0.0.1; no CORS *; CSP, Permissions-Policy, X-Frame-Options: DENYCOOKIE_SECURE=true) if reachable from outsideSecurity update history → CHANGELOG.md (entries marked 🔒).
| Part | Tech |
|---|---|
| Backend | Python 3.12 (stdlib) · crowdsec_exporter.py · auth.py · own MMDB reader |
| Web | HTML · JavaScript · D3.js · topojson (bundled) · Self brand tokens |
| Proxy | nginx (auth_request, rate limits, gzip) |
| Deploy | Docker (python:3.12-alpine) · GHCR · Unraid |
docker build -f docker/Dockerfile -t selfthreatmap .
docker compose -f docker/docker-compose.yml up -d
Style engine: assets/js/rocket-styles.js · profiles: assets/js/profiles.js · origins: assets/js/origins.js · translations: assets/i18n/.
SelfThreatMap zeigt Angriffe aus deiner lokalen CrowdSec-Datenbank live auf einer Weltkarte — beim Aufruf sind alle Angriffspunkte sichtbar, beim Reinzoomen erscheinen Stadtnamen. Es ist ein Dashboard auf einer bestehenden CrowdSec-Installation; selbst erkennt oder blockt es nichts (das bleibt Aufgabe von CrowdSec), es kann aber Bans per Klick aufheben.
Teil der Self-Familie (SelfMailer, SelfStream, SelfArchiver, SelfDashboard …) — gleiches Design-System, gleicher Deploy-Stil (GHCR → Unraid). Basiert auf der ursprünglichen CrowdSec Threat Map.
Kurz — Weltkarte mit 30+ Bahn-Stilen · 50+ Profile · Suche, Ban-Status & Unban · dynamische Whitelist der eigenen IP · Login + optionale 2FA · 12 Sprachen · läuft offline
Funktionen · Bahn-Stile · Architektur · Schnellstart · Unraid · Konfiguration · Sicherheit · Tech-Stack · Entwicklung · Roadmap
🌍 Karte
📊 Feed & Aktionen
🎨 Plattform
Das Herzstück: wie jeder Angriff von der Quelle zu deinem Server fliegt. Über 30 animierte Stile unter Einstellungen → Bahn-Stil (Standard: Rakete), mit Live-Vorschau. Code: assets/js/rocket-styles.js — leicht erweiterbar.
| Gruppe | Stile |
|---|---|
| Raketen | Rakete · Doppel-Rakete · Pfeil · Datenpaket |
| Kometen & Schweife | Komet · Komet + Funken · Meteor · Schweif-Fade · Verlauf-Trail · Nebel-Trail · Funken-Schweif |
| Strahlen & Laser | Laser-Puls · Laser konstant · Neon-Tube · Blitz · Plasma-Kugel |
| Partikel & Punkte | Partikel-Strom · Tracer (MG) · Punkt-Kette · Glühwürmchen · Sog / Implosion · Echo-Geister · Doppelhelix |
| Linien & Spezial | Reiner Bogen · Doppellinie · Morse-Strich · Sinus-Welle · Impuls-Welle · Einschlag-Ring · Hologramm |
| Klassisch (alt) | Klassisch · Console (gestrichelte Bögen) · Minimal |
Browser ──▶ nginx :8080 ──┬─ /auth/*, Login, Einrichtung, Einstellungen ──▶ auth.py (/config/auth.json)
├─ / (Dashboard, geschützt per auth_request)
└─ /metrics, /unban, /whitelist-status
│
▼
crowdsec_exporter.py (127.0.0.1:9456)
│ liest crowdsec.db + GeoLite2-City.mmdb (nur lesend)
│ schreibt Whitelist-YAML (postoverflows)
└─ CrowdSec Local API (HTTP, Maschinen-Login) → Unban
docker run -d \
--name selfthreatmap \
--restart unless-stopped \
-p 8080:8080 \
-v /pfad/zu/selfthreatmap/config:/config \
-v /pfad/zu/crowdsec/data:/crowdsec/data:ro \
-v /pfad/zu/crowdsec/postoverflows:/crowdsec/postoverflows \
-e SERVER_LAT=52.5200 \
-e SERVER_LON=13.4050 \
-e SERVER_NAME=Berlin \
-e LANGUAGE=de \
-e CROWDSEC_LAPI_URL=http://crowdsec:8080 \
-e CROWDSEC_LAPI_MACHINE_ID=selfthreatmap \
-e CROWDSEC_LAPI_PASSWORD='langes-passwort' \
ghcr.io/s3lfcod3r/selfthreatmap:latest
http://<host>:8080 öffnen → Admin-Benutzer + Passwort anlegen. Zwei-Faktor (TOTP) ist optional — danach unter Einstellungen per QR-Code aktivieren (Google Authenticator / SelfAuthenticator). Compose-Datei: docker/docker-compose.yml.
🔑 Unban über die CrowdSec-LAPI (kein Docker-Socket): im CrowdSec-Container eine eigene Maschine anlegen und deren Zugangsdaten übergeben:
docker exec crowdsec cscli machines add selfthreatmap --password 'langes-passwort' -f /dev/null(-f /dev/nullist wichtig — sonst wird CrowdSecs eigenelocal_api_credentials.yamlüberschrieben.) Ohne diese Werte läuft die Karte, Unban ist dann deaktiviert.
💡 Tipp: Koordinaten — Rechtsklick in Google Maps → „Was ist hier?“. CrowdSec-Datenpfad:
docker inspect crowdsec | grep -A5 "Mounts".
💡 GeoIP / Stadtnamen: Ohne GeoIP-Datenbank werden nur Länderpunkte angezeigt. MaxMind GeoLite2-City kostenlos laden,
GeoLite2-City.mmdbin den CrowdSec-Datenordner legen, Container neu starten.
Unraid → Apps → selfthreatmap suchen → installieren → SERVER_LAT / SERVER_LON und den CrowdSec-Datenpfad eintragen → Anwenden. Oder die Vorlage von
https://raw.githubusercontent.com/s3lfcod3r/selfthreatmap/main/unraid/selfthreatmap.xml
hinzufügen. Dashboard: http://DEINE-UNRAID-IP:8080.
⚠️
/configeinbinden: Konto, 2FA und Sitzungsschlüssel liegen in/config/auth.json— ohne dieses Volume ist dein Benutzer nach einem Update weg.
Umgebungsvariablen (ohne gemeinsames Präfix).
| Variable | Pflicht | Standard | Zweck |
|---|---|---|---|
SERVER_LAT / SERVER_LON | ✅ | 0.0 | Koordinaten deines Servers (Heimatpunkt der Karte) |
SERVER_NAME | – | MeinServer | Anzeigename des Heimat-Markers |
LANGUAGE | – | de | Standardsprache: de oder en (12 Sprachen in der App) |
CROWDSEC_LAPI_URL | – | http://crowdsec:8080 | CrowdSec Local API, z. B. http://192.168.1.7:8080 |
CROWDSEC_LAPI_MACHINE_ID / CROWDSEC_LAPI_PASSWORD | für Unban | – | Zugang einer eigenen CrowdSec-Maschine (cscli machines add) |
CROWDSEC_DB_PATH | – | /crowdsec/data/crowdsec.db | CrowdSec-SQLite-Datenbank |
CROWDSEC_MMDB_PATH | – | /crowdsec/data/GeoLite2-City.mmdb | GeoIP-Datenbank (Stadtnamen) |
CACHE_TTL / DAYS_BACK | – | 60 / 365 | Metrik-Cache (s) und Zeitraum (Tage) |
WHITELIST_ENABLED | – | true | Dynamische Whitelist der eigenen IP |
WHITELIST_FILE | – | /crowdsec/postoverflows/s01-whitelist/my-whitelist.yaml | Whitelist-Datei |
WHITELIST_INTERVAL | – | 900 | Prüfintervall der Whitelist (s); jeder Lauf hebt zusätzlich einen Ban auf die eigene IP per LAPI auf. Eine geänderte Whitelist-Datei greift beim nächsten CrowdSec-Neustart |
AUTH_ENABLED | – | true | Login (+ optionale 2FA) für das ganze Dashboard |
COOKIE_SECURE | – | false | , wenn nur über HTTPS erreichbar |
auth_request; das erste Konto wird im Browser angelegt — keine Geheimnisse in UmgebungsvariablenHttpOnly, SameSite=Strict); Begrenzung der Login-Versuche und Sperre nach 5 Fehlversuchen (15 min)127.0.0.1; kein CORS *; CSP, Permissions-Policy, X-Frame-Options: DENYCOOKIE_SECURE=true)Verlauf der Sicherheitsupdates → CHANGELOG.md (Einträge mit 🔒).
| Teil | Technik |
|---|---|
| Backend | Python 3.12 (Standardbibliothek) · crowdsec_exporter.py · auth.py · eigener MMDB-Leser |
| Web | HTML · JavaScript · D3.js · topojson (mitgeliefert) · Self-Marken-Tokens |
| Proxy | nginx (auth_request, Durchsatzgrenzen, gzip) |
| Deploy | Docker (python:3.12-alpine) · GHCR · Unraid |
docker build -f docker/Dockerfile -t selfthreatmap .
docker compose -f docker/docker-compose.yml up -d
Stil-Engine: assets/js/rocket-styles.js · Profile: assets/js/profiles.js · Herkünfte: assets/js/origins.js · Übersetzungen: assets/i18n/.
🇬🇧 This project is free for private use and built in my spare time. If it saves you time, a coffee keeps the next update coming. No pressure, a ⭐ on the repo helps too!
🇩🇪 Dieses Projekt ist für private Nutzung kostenlos und entsteht in meiner Freizeit. Wenn es dir Zeit spart, hält ein Kaffee das nächste Update am Laufen. Kein Muss, ein ⭐ auf dem Repo hilft auch!
🇩🇪 Alle Rechte vorbehalten. © 2026 s3lfcod3r / SelfCoder
Du darfst die Software privat und nicht-kommerziell installieren und benutzen (z. B. im Homelab, über Docker oder Unraid).
Ohne schriftliche Erlaubnis verboten: kommerzielle Nutzung · Kopieren · Verändern · Weitergeben · Einbauen in eigene Projekte (auch Closed Source) · Verkaufen.
Details: LICENSE
🇬🇧 All rights reserved. © 2026 s3lfcod3r / SelfCoder
You may install and use the software privately and non-commercially (e.g. in your home lab, via Docker or Unraid).
Not permitted without written permission: commercial use · copying · modifying · redistributing · incorporating into other projects (including closed source) · selling.
Details: LICENSE
SelfThreatMap · part of the Self family · Teil der Self-Familie made with 🗺️ for self-hosting
CONFIG_DIR | – | /config | Where account + 2FA data is stored |
SESSION_TTL | – | 86400 | Session lifetime (s) |
LOGIN_MAX_FAILS / LOGIN_LOCKOUT_SECONDS | – | 5 / 900 | Lockout after failed logins |
trueCONFIG_DIR | – | /config | Speicherort für Konto + 2FA |
SESSION_TTL | – | 86400 | Gültigkeit der Sitzung (s) |
LOGIN_MAX_FAILS / LOGIN_LOCKOUT_SECONDS | – | 5 / 900 | Sperre nach Fehl-Logins |