mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-13 23:17:43 +00:00
packaging/server/install.sh sets up Debian/Ubuntu behind Caddy: binary from its release archive, the source tree it sits in, the latest release or a clone (temporary swap under 2 GB of memory), user, dirs and config only when missing, systemd unit, Caddy site, nightly backup timer, ufw for 22/80/443; safe to re-run for upgrades. docs/server.md gains Running a public server (limits, expiry, moderation, operator responsibility, no end-to-end encryption, threat model) and an install.sh walk-through; protocol, MCP, CLI and parity docs updated.
19 lines
773 B
Caddyfile
19 lines
773 B
Caddyfile
# Caddy in front of figcraft-server; setup in docs/server.md ("Deploy on a Linux server").
|
|
# Replace the host name with yours (its DNS must point at this machine). Caddy obtains and renews
|
|
# the certificate and passes WebSocket upgrades through by itself. Put this in /etc/caddy/Caddyfile
|
|
# and run `sudo systemctl reload caddy` (install.sh does all this for you).
|
|
# Caddy tells the server who each client is (X-Forwarded-For): set trusted_proxy = "127.0.0.1" in
|
|
# server.toml so per-address limits and blocks count clients, not Caddy.
|
|
|
|
figcraft.example.com {
|
|
reverse_proxy 127.0.0.1:47900
|
|
}
|
|
|
|
# Under a path of an existing site instead (then public_url = "wss://example.com/figcraft/"):
|
|
#
|
|
# example.com {
|
|
# handle /figcraft/* {
|
|
# reverse_proxy 127.0.0.1:47900
|
|
# }
|
|
# }
|