Production
HTTPS, mail, backups and fontego-server doctor, before other people use your Fontego.
Before other people use your Fontego, run:
fontego-server doctorIt checks, one by one, and says what to do about each: git, the data folder (and that nobody else can enter it), the
server admin, every workspace's repository, that the public URL answers as this server, its HTTPS certificate, that
the SMTP server connects and accepts the sign-in, and how old the last backup is. --mail-to EMAIL also sends a test
message. It exits with 1 when something fails, and with --strict, also when something needs attention.
HTTPS
The server speaks plain HTTP and is meant to sit behind a proxy with HTTPS: Caddy, nginx, a Cloudflare Tunnel or your load balancer. Then:
- set
FONTEGO_PUBLIC_URLto itshttps://address; - keep the server's own port on
127.0.0.1(FONTEGO_BINDin Docker), so everything goes through the proxy; - set
FONTEGO_CLIENT_IP_HEADERto the header where the proxy puts the caller's address (cf-connecting-ipbehind Cloudflare,x-real-ipfor nginx). Without it, every caller has the proxy's address and they all share its limits. Set it only if all traffic comes through the proxy, or a caller could choose their own address.
Fontego sends mail for invitations and new passwords. Set the SMTP settings (FONTEGO_SMTP_HOST, _PORT, _USER,
_PASSWORD_FILE, _FROM, or from the admin settings), then check it:
fontego admin mail test you@example.orgWithout SMTP nothing breaks: messages wait in fontego admin mail outbox, with their links, for a server admin to
pass on.
Backups
Backups are yours to run: copy the data folder (in Docker, the /data volume), which holds every workspace and the
database. Have your backup job touch a file when it succeeds and point FONTEGO_BACKUP_STAMP at it; doctor then
warns when the last backup is older than maxAgeHours in [backups] (36 by default).
Facing the internet
What the server already does, so you don't have to:
- Sign-ins can't exhaust the machine. Password checks wait in a queue, two at a time; beyond that the server answers 503.
- Limits per caller. Failed sign-ins count per address and per email, and anonymous calls have a budget per address (then 429). An IPv6 caller counts as its /64.
- Answers that never run in a browser. API answers carry
nosniffand a sandboxing Content Security Policy, so a file's content is never run as a page; the web app has its own strict policy. A form on another site can't post to the API. - Not indexed. Every page says
noindex, and/robots.txtdisallows everything. - Git imports through the API reach only the public internet, so nobody can make the server fetch from your
private network.
[import] privateNetworksallows it.
Accounts are only ever created by an admin; there is no sign-up page.