-
Notifications
You must be signed in to change notification settings - Fork 6
Exposing to the Internet
By default the web server binds 0.0.0.0:8080 over HTTP and is meant for a local/LAN network.
To put it on a domain with HTTPS, pick one of two approaches.
Run Caddy (or nginx) in front. Caddy gets and renews a Let's Encrypt certificate and redirects HTTP→HTTPS automatically.
Caddyfile:
your-domain.cz {
reverse_proxy localhost:8080
}
Then in config/config.json:
Provide a key + certificate (e.g. from win-acme for Let's Encrypt on Windows, or a Cloudflare Origin Certificate):
"web": {
"port": 443,
"cookieSecure": true,
"httpRedirectPort": 80, // 301-redirects HTTP → HTTPS
"publicUrl": "https://your-domain.cz",
"ssl": { "enabled": true, "keyFile": "./certs/key.pem", "certFile": "./certs/cert.pem" }
}The app serves TLS directly on port, and (if httpRedirectPort is set) runs a tiny HTTP listener
that redirects to HTTPS.
Let's Encrypt certs renew every ~90 days. Caddy renews automatically; with Option B you must renew yourself (win-acme can schedule it).
If you only want the public Field Console exposed and the admin dashboard private:
- Put admin behind your reverse proxy with an IP allowlist, and/or set
web.adminAllowlist(e.g.["192.168.1.0/24","10.8.0.0/24"]for LAN/VPN), and/or - bind to a private interface and reach
/adminonly over VPN.
The admin Socket.IO streams (logs/status) are already restricted to authenticated admins.
- Strong
WEB_ADMIN_PASSWORDandSESSION_SECRET(notchangeme). - HTTPS in front (Option A or B) and
web.cookieSecure: true. -
web.trustProxy: trueif behind a proxy (else rate-limit/allowlist see the proxy IP). - Firewall: only expose the needed ports (80/443, or your proxy's).
- Optional
web.adminAllowlistfor the admin surface. - Set
web.publicUrlso Discord embeds link to the right address.
- Admin login lockout (5 fails → 15 min).
- Per-IP rate limiting on
/api/public,/api/player,/api/auth/discord. - Parameterized SQL (no injection); escaped output (no XSS).
- Player profiles strip Steam IDs / IPs / member online-times.
Next: Discord Bot · FAQ