ALPHA โ Self-hosted logs, analysis, reports and safe configuration changes for UniFi firewalls.
1.1K
Unlock the full potential of your firewall.
Logs, analysis, reports and configuration changes for UniFi gateways, with the experience of an enterprise firewall. Self-hosted, ready in minutes with Docker. The interface is available in English and French.
โ ๏ธ ALPHA SOFTWARE (version 0.1-alpha) Features and the database format may still change, and bugs are expected. Unifarr can modify your UniFi console configuration: keep a backup of the console, review staged changes before applying them, and test it on a non-critical network first.
| ๐ Logs | Syslog UDP/TCP (iptables, CEF, Suricata IPS/IDS), live and history, FortiGate-style filters, saved and shared filters |
| ๐ Analysis | Dashboard, world map, live LAN map, flows, topology, rule usage, anomalies, WAN quality, IPFIX / NetFlow bandwidth |
| ๐ก๏ธ Policies | Zone-based rules, objects, NAT, VPN, network clients, โwhich rule applies?โ simulator |
| ๐ ๏ธ Changes | Rules, objects, NAT, VLANs and switch ports; reordering, batch push, history, rollback |
| ๐ซ Blocked IPs | Permanent or temporary blocking, with a configuration check (rules in every zone, correctly placed) |
| ๐ธ Snapshots | Daily encrypted snapshot of the UniFi configuration, comparison, immutable snapshots, adjustable retention |
| โ Best practices | Firewall policy score, findings by severity, guided fix rule by rule |
| ๐ Reports | PDF (executive summary, traffic, intrusions, compliance), scheduled reports by e-mail or ntfy |
| ๐ Alerts | ntfy, SMTP, Microsoft 365, Gmail: IPS threats, WAN down, new or offline device, anomalies |
| ๐ Security | Admin / editor / read-only roles, OIDC, TOTP two-factor authentication, API tokens, audit log |
| ๐พ Backup | Encrypted backup on demand or automatic (daily / weekly) to a mountable export folder |
| in test๐ Multi-console | Several UniFi consoles: view one, several or all of them |
| ๐ Integrations | Prometheus metrics, IP reputation (Spamhaus, FireHOL, Feodo, AbuseIPDB) |
/healthz)| Tag | Content |
|---|---|
latest | Latest build (alpha) |
<commit> | Build of a specific commit, to pin a version |
docker-compose.yml:
services:
db:
image: timescale/timescaledb:2.17.2-pg16
restart: unless-stopped
environment:
POSTGRES_DB: unifarr
POSTGRES_USER: unifarr
POSTGRES_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U unifarr -d unifarr"]
interval: 10s
timeout: 5s
retries: 10
app:
image: YOUR_NAMESPACE/unifarr:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql://unifarr:${DB_PASSWORD}@db:5432/unifarr
SNAPSHOT_KEY: ${SNAPSHOT_KEY:-}
TZ: ${TZ:-Europe/Paris}
volumes:
- app-data:/data
- app-export:/etc/export
ports:
- "8080:8080"
- "514:5514/udp"
- "514:5514/tcp"
- "2055:2055/udp"
volumes:
db-data:
app-data:
app-export:
.env:
DB_PASSWORD=change-me
SNAPSHOT_KEY=
TZ=Europe/Paris
Start it with docker compose up -d, then:
http://<server>:8080 and create the administrator account (the setup code is shown in docker compose logs app).If the interface is reachable from outside your local network, put it behind an HTTPS reverse proxy and set
PUBLIC_URLandFORWARDED_ALLOW_IPS.
| Container port | Use |
|---|---|
8080/tcp | Web interface and API |
5514/udp, 5514/tcp | Syslog (publish as 514 on the host) |
2055/udp | IPFIX / NetFlow v9 collector |
| Path | Content |
|---|---|
/data | Instance key (if SECRET_KEY is not set), GeoIP databases, cached device icons |
/etc/export | Automatic backups (backup/) and exports; can be a host folder or a NAS share writable by UID 10001 |
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | (required) | PostgreSQL connection string |
ADMIN_USER / ADMIN_PASSWORD | โ | Administrator created on first start (otherwise created from the web page) |
SECRET_KEY | generated in /data | Fernet key encrypting secrets (UniFi API, mail accounts, OIDC) |
SNAPSHOT_KEY | instance key | Fernet key encrypting configuration snapshots (a dedicated key is recommended) |
SNAPSHOT_KEY_PREVIOUS | โ | Previous snapshot key, used once to re-encrypt snapshots after a key change |
TZ | Europe/Paris | Time zone |
RETENTION_DAYS | 365 | Log retention in days (0 = unlimited) |
COMPRESS_AFTER_HOURS | 6 | Lossless TimescaleDB compression after N hours |
GEOIP_AUTO_DOWNLOAD | true | Monthly download of the DB-IP Lite GeoIP database |
ALLOWED_SENDERS | all | IPs / networks allowed to send syslog |
PUBLIC_URL, FORWARDED_ALLOW_IPS | โ / 127.0.0.1 | HTTPS reverse proxy settings |
OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_ADMIN_GROUP, OIDC_ALLOWED_GROUP, OIDC_LABEL | โ | OIDC sign-in (Entra ID, Google, Keycloak, Authentikโฆ) |
Generate a key for SECRET_KEY or SNAPSHOT_KEY (use two different keys) and keep it off the server:
openssl rand -base64 32 | tr '+/' '-_'
docker compose pull && docker compose up -d
Database migrations are applied automatically on start. As an alpha release, back up the database before updating.
MIT licence. GeoIP databases remain subject to their own licences. UniFi is a trademark of Ubiquiti Inc. and FortiGate a trademark of Fortinet, Inc.; Unifarr is not affiliated with either company.
Content type
Image
Digest
sha256:05b3b8c9aโฆ
Size
79.5 MB
Last updated
2 days ago
docker pull lexlex0/unifarr