Nginx reverse proxy manager with WireGuard VPN management, a topology map of the VPN, remote agents and a hardened host-based runtime.
FloppyGuard is a self-hosted platform for administrators who run web services and WireGuard-connected sites on their own Linux servers. It handles reverse proxy hosts and certificates, and shows VPN links, routes, gateways and remote agents in one place.
You can publish services, run a hub-and-spoke or site-to-site WireGuard network and keep the configuration of remote gateways in sync from the same interface. FloppyGuard assumes one trusted team of administrators. It is not built for multi-tenant SaaS use and does not try to replace a general network management suite.
Inherited from nginx-proxy-manager:
- Proxy hosts, redirection hosts, streams, 404/dead hosts
- Let's Encrypt certificates (HTTP and DNS challenge)
- Access lists, multiple users, audit log
Added by FloppyGuard:
- WireGuard interface, peer and link management with a topology map
- Create WireGuard tunnels from the UI: name, type, DNS, platform (desktop/mobile), full tunnel toggle
- Create, update and delete WireGuard peers live from the UI
- Peer config export with QR code for mobile devices
- DNS/nameserver configured automatically per interface or link, with AllowedIPs that depend on the platform
- Road warrior peers automatically get all remote site networks in AllowedIPs
- Planning layer: links go through the stages discover, shape, validate and ready
- Remote agents that receive WireGuard configs pushed from the hub
- Automatic MASQUERADE: NAT rules for LAN traffic between sites are generated and pushed to the agents
- Live bandwidth monitoring with sparklines and donut gauges per peer
- Platform dashboard with proxy stats, WireGuard summary, gateway overview and fail2ban status
- Fail2Ban UI: view jails and banned IPs, unban with one click
- nftables firewall hardening (strict INPUT policy, only required ports open)
- Strict CIDR/IP validation on all WireGuard network inputs. These values end up in routing rules executed as root, so anything that is not a clean address or CIDR is rejected.
- UI in English, German and French
- Dark mode with a compact glassmorphism header and theme toggle
- Advanced-config editor for proxy hosts with visible input, line numbers and label focus for accessibility
- Cloudflare connection under Settings: with one API token (the token link is pre-filled), A/AAAA records are created, updated and removed automatically per proxy host. Proxy mode can be set per host and passes on the real visitor IP. Manual and wildcard records are left alone.
FloppyGuard runs directly on the host. The application itself does not use a Docker container.
Internet -> nginx (80/443) -> proxy host configs in /data/nginx/
-> port 81 (admin UI)
Port 81 nginx serves frontend/dist (SPA) -> /api/ -> backend :3300
Port 3300 FloppyGuard backend (Node.js, systemd unit: floppyguard-backend)
- Backend: Express.js (
backend/index.js), managed by systemd - Frontend: React 19 + Vite, built to
frontend/dist, served by nginx on port 81 - Database: MySQL/MariaDB, PostgreSQL or SQLite (configured via environment variables; without MySQL or PostgreSQL settings the backend uses SQLite at
/data/database.sqlite) - Nginx configs: generated and written to
/data/nginx/, loaded by the system nginx - Certificates: Let's Encrypt via certbot, stored in
/opt/npm/letsencrypt/
- Debian 12/13 or Ubuntu 22.04+
- Node.js 22.22.2+ with npm 12.0.2 and Yarn 1.22.22 (the installer installs exactly these npm and Yarn versions)
- nginx (system package)
- WireGuard tools (
wireguard-tools) - nftables
- fail2ban (optional but recommended)
- Optional: MySQL/MariaDB or PostgreSQL. Without them the backend uses SQLite, which is also what the installer configures by default.
# Fresh Debian/Ubuntu images often ship without curl
apt-get update && apt-get install -y curl
curl -fsSL https://raw.githubusercontent.com/floppy007/floppyguard/master/scripts/install.sh | bashThe script:
- Checks for missing prerequisites and installs them
- Clones the repository to
/var/www/floppyguard - Installs the Node.js dependencies and builds the frontend
- Installs the application updater (
scripts/update.sh) - Creates the systemd unit
floppyguard-backend - Writes an nginx config for the admin UI (port 81)
- Sets up the environment variables for database access
# 1. Clone
git clone https://github.com/floppy007/floppyguard.git /var/www/floppyguard
cd /var/www/floppyguard
# 2. Install dependencies
corepack enable
npm install -g yarn@1.22.22
cd backend && yarn install --frozen-lockfile && cd ..
cd frontend && yarn install --frozen-lockfile && yarn build && cd ..
# 3. Create data directory
mkdir -p /data/nginx /opt/npm/letsencrypt
# 4. Install systemd service
cp docs/examples/floppyguard-backend.service /etc/systemd/system/
# Edit the service file - set DB_MYSQL_* environment variables
systemctl daemon-reload
systemctl enable --now floppyguard-backend
# 5. Configure nginx
cp docs/examples/floppyguard-nginx.conf /etc/nginx/conf.d/floppyguard.conf
nginx -t && nginx -s reloadThe installer writes these to /var/www/floppyguard/backend/.env, which the systemd unit loads via EnvironmentFile. With the manual installation, set them in the unit file (/etc/systemd/system/floppyguard-backend.service).
The backend picks the database in this order: MySQL if DB_MYSQL_HOST, DB_MYSQL_USER and DB_MYSQL_NAME are set, otherwise PostgreSQL if DB_POSTGRES_HOST, DB_POSTGRES_USER and DB_POSTGRES_NAME are set, otherwise SQLite.
| Variable | Default | Description |
|---|---|---|
DB_MYSQL_HOST |
- | MySQL host |
DB_MYSQL_PORT |
3306 |
MySQL port |
DB_MYSQL_USER |
- | MySQL user |
DB_MYSQL_PASSWORD |
- | MySQL password |
DB_MYSQL_NAME |
- | MySQL database name |
DB_MYSQL_SSL |
off | true = connect to MySQL over TLS |
DB_MYSQL_SSL_REJECT_UNAUTHORIZED |
true |
With TLS: reject server certificates that cannot be verified |
DB_MYSQL_SSL_VERIFY_IDENTITY |
true |
With TLS: check that the certificate matches the host name |
DB_POSTGRES_HOST |
- | PostgreSQL host |
DB_POSTGRES_PORT |
5432 |
PostgreSQL port |
DB_POSTGRES_USER |
- | PostgreSQL user |
DB_POSTGRES_PASSWORD |
- | PostgreSQL password |
DB_POSTGRES_NAME |
- | PostgreSQL database name |
DB_SQLITE_FILE |
/data/database.sqlite |
SQLite file, used when neither MySQL nor PostgreSQL is configured |
NODE_ENV |
- | Set to production. Otherwise the backend reads config/default.json (a development config) instead of these variables. |
WG_CONF_DIR |
/etc/wireguard |
WireGuard config directory |
WG_HUB_HOST |
OS hostname | Public domain or IP (IPv4, or bracketed/bare IPv6) used as the WireGuard endpoint in peer and agent configs. The hub is authoritative: if you change it, every agent picks up the new endpoint on its next poll. |
WG_DNS |
- | Default DNS for peer configs (comma-separated) |
CLOUDFLARE_API_TOKEN |
- | Optional fallback for the token under Settings -> Cloudflare (Zone:Read + DNS:Edit); a token saved there and a Cloudflare DNS-challenge certificate token take precedence. |
CLOUDFLARE_DNS_IPV4 |
detected public IPv4 | Optional A-record target; addresses entered under Settings -> Cloudflare take precedence. |
CLOUDFLARE_DNS_IPV6 |
detected public IPv6 | Optional AAAA-record target; addresses entered under Settings -> Cloudflare take precedence. |
PORT |
3300 |
Backend listen port |
SITE_ISOLATION_NFT_FILE |
/etc/nftables.d/floppyguard-sites.nft |
Boot copy of the site isolation table, rewritten after every apply |
SITE_ISOLATION_BOOT_CONF |
/etc/nftables.conf |
nftables boot config checked for the include of that file (warning boot-include-missing) |
SITE_ISOLATION_DISABLED |
- | true = the backend never touches the site isolation table |
Setting up the connection under Settings -> Cloudflare takes three steps:
- Open the token form at Cloudflare. The button opens Cloudflare's "Create API token" page with everything pre-filled (
DNS: EditandZone: Readfor all zones, name "FloppyGuard"). Click "Continue to summary" and "Create Token". To allow only some domains, choose them under "Zone Resources". A manual walkthrough is shown below the button. - Paste the token and click Check. FloppyGuard verifies it and lists the zones it can manage. The token is stored in
/data/cloudflare.json(0600) and never sent back to the browser. - Click Save. New proxy hosts then have Create DNS at Cloudflare preset on the Details tab, and Cloudflare proxy as an option.
After that, saving a host creates or updates its A and AAAA records (comment "Managed by FloppyGuard"). Removing a domain, switching the option off or deleting the host removes them again. FloppyGuard takes over an existing record that already points to this server; a record pointing elsewhere is never touched, and the host shows a notice. Wildcard domains are skipped.
- Addresses: if the field is empty, FloppyGuard uses the public addresses detected on the network interfaces. Once you enter an address, only the entered ones are used (enter only IPv4 to skip AAAA records). Behind NAT, enter the public address.
- Token access: admins by default; "Also for users without admin rights" opens it for everyone.
- Per-domain tokens: if a host's SSL tab uses a Let's Encrypt via DNS certificate with provider Cloudflare (
dns_cloudflare_api_token = ...in Credentials), that token takes precedence for the host, so separate certificates keep separate permissions. - Cloudflare proxy and real visitor IP: hosts behind the Cloudflare proxy take the visitor IP from
CF-Connecting-IP, but only for requests from Cloudflare's address ranges (conf.d/include/ip_ranges_cloudflare.conf, refreshed every 6 hours). The country filter, access lists and logs therefore see the visitor, and a forged header from anywhere else is ignored. Do not trust the CDN ranges globally forX-Real-IPin your own nginx config: anyone can send traffic through their own Cloudflare account with a forgedX-Real-IP.
In the proxy hosts list, a green "Cloudflare DNS" pill means the records are managed without the proxy, and an orange "Cloudflare Proxy" pill means traffic goes through Cloudflare.
# Status
systemctl status floppyguard-backend
# Restart
systemctl restart floppyguard-backend
# Logs (live)
journalctl -u floppyguard-backend -f
# nginx
nginx -t && nginx -s reload
# Check all routes
./scripts/check-production-routesSee docs/OPERATIONS.md for the full runbook.
Pairs of sites that must not reach each other are set on the Ingress rules page (German UI: Freigaben), in the section Separation between sites (on the hub). The hub enforces them in a dedicated nftables table inet floppyguard_sites (forward hook, priority filter - 10, policy accept, only drop rules). The backend replaces that table atomically (nft -c -f, then nft -f) on start-up, after every change and whenever the WireGuard links or networks change. It never touches any other table.
The table lives in the kernel, so it survives a backend restart. It does not survive a reboot or systemctl restart nftables, because /etc/nftables.conf starts with flush ruleset. For that reason the backend writes a boot copy to /etc/nftables.d/floppyguard-sites.nft. Add this line at the end of /etc/nftables.conf, after the existing tables:
include "/etc/nftables.d/floppyguard-sites.nft"
The file starts with table inet floppyguard_sites {} + delete table inet floppyguard_sites, so it is valid right after flush ruleset. Before adding the include, create the directory and a valid empty table, so the include cannot fail at boot even if the backend has not written the file yet:
mkdir -p /etc/nftables.d
[ -f /etc/nftables.d/floppyguard-sites.nft ] || printf 'table inet floppyguard_sites {}\n' > /etc/nftables.d/floppyguard-sites.nft
nft -c -f /etc/nftables.conf # check only; never `nft -f` it at runtime (flush ruleset drops the WireGuard NAT)Until the include is in place, the Ingress rules page shows the warning "After a hub restart the separation only takes effect again once FloppyGuard is running".
If the backend cannot read the links, it keeps every separation in place. Tunnel addresses fall back to the last known ones, a link that disappears keeps its last networks for one more apply, and if stored pairs exist but none of them matches a current site link, the previous table is kept and the page shows an error. IPv6 networks of a site are not covered (the table is IPv4 only) and are listed as a warning.
Manual drop rules with ip saddr/ip daddr in other forward chains (for example a hand-written ip saddr @site_x ip daddr @site_y drop in inet filter forward) are detected and shown as "separated by hand" with the warning "The hub has additional blocks set by hand outside FloppyGuard". The tester on the Ingress rules page reports them too. FloppyGuard cannot lift them: allowing the pair again only clears its own table.
To move from manual rules to FloppyGuard, follow these steps in order:
- Deploy: run the frontend production build and restart the backend. The migration creates the empty
site_isolationtable, and start-up creates the empty tableinet floppyguard_sites(policy accept, harmless). - On the Ingress rules page, use Take over into FloppyGuard in the warning about manual blocks, or separate the pair in the matrix.
- Check that the hub has the pair:
nft list table inet floppyguard_sitesshows twocounter droprules. - Only then remove the manual rules and sets from the live ruleset (
nft delete rule inet filter forward handle <n>,nft delete set inet filter <name>) and from/etc/nftables.conf, and add the include above. - Reload the page. The warning about manual blocks is gone, and the pair shows "separated".
Two site agents can talk to each other through their own WireGuard tunnel instead of through the hub. The hub remains the source of the configuration and the automatic fallback. Set up direct links on the Ingress rules page, section Direct links (German UI: Direktverbindungen): site A listens (fixed public IP, UDP port forward on its router to the agent's LAN address, configured on the router itself), and site B dials A's address. Agents from script 1.6.0 on generate the key themselves and report only the public key.
- Interface
fgd<id>, with its own private /30 as transfer network. - The partner's networks go into routing table
52000+id, whichip rule pref 31000looks up before the main table. The agent fills the table only while the link is healthy (handshake younger than 180 s and a ping to the partner's tunnel address every 10 s). After 3 failed checks it empties the table and the hub routes onwgNcarry the traffic; after 3 successful checks it switches back. The hub routes themselves are never changed. - Each side routes those networks over the direct link that it reaches through the hub today (same ACL) and that the partner exports. NAT stays as on the hub path; tick "masquerades outgoing" for a site that masquerades into the hub tunnel today.
- The ingress rules (
FG_IN) cover the direct interfaces too. A restricted gateway keeps a direct interface down while its filter does not cover it. Sites separated by the site isolation never get an active direct link. - Install
conntrackon the gateways so NATed flows survive a path switch. The health check needsping.
To go back, switch the link off or delete it. Both agents take the tunnel down on their next poll and all traffic goes through the hub again.
Administrators see an available FloppyGuard release on the dashboard and in Settings → Application update. An update only starts after an explicit confirmation. The updater fetches only the configured branch of the approved floppy007/floppyguard repository, does a fast-forward merge (never a reset), installs both committed Yarn lockfiles, builds the frontend, restarts the backend and checks its local health endpoint.
The Settings page shows the progress, which is also stored in /var/lib/floppyguard/update-status.json; the detailed log is /var/lib/floppyguard/update.log. If local Git changes prevent a safe fast-forward merge, the updater stops and leaves them in place.
- Node.js 22.22.2+ with npm 12.0.2 and Yarn 1.22.22
- MySQL, PostgreSQL or SQLite
cd backend
yarn install
node index.js # start backend (or use systemd)
npx biome lint . # Biome linting
node --test internal/*.test.js # unit testscd frontend
yarn install
yarn dev # Vite dev server -> http://localhost:5173
yarn build # TypeScript check + production build -> dist/
npx biome lint . # Biome linting
npx vitest run # unit testsbackend/ Express.js API (Node 22+, ES modules)
frontend/ React 19 + TypeScript + Vite
scripts/ Operational scripts (install, start, stop, check)
docs/ VitePress documentation + architecture notes
test/ Cypress E2E + Vacuum OpenAPI contract tests
See CHANGELOG.md.
AGPL-3.0, see LICENSE.
Additional term (§7 AGPL-3.0): any deployment of this software over a network must keep a visible "Powered by FloppyGuard" notice with a link to this repository in the UI footer.
FloppyGuard © Florian Hesse, Comnic-IT. Built on top of nginx-proxy-manager by Jamie Curnow (MIT).
