espressostreamdocs
On this page

Configuration

espresso-server serve reads flags and environment variables. Every flag has a matching variable, and the flag wins when both are set. Durations use Go syntax (90s, 10m, 720h). Sizes take K, M, G. espresso-server serve --help prints the same list.

Flag Env Default Meaning
--listen ESPRESSO_LISTEN 0.0.0.0:24870 listen address
--data ESPRESSO_DATA /data data dir (db.sqlite, casts/)
--base-url ESPRESSO_BASE_URL (from request) public URL for absolute links; https:// also forces Secure cookies
--trusted-proxies ESPRESSO_TRUSTED_PROXIES (none) reverse proxies whose X-Forwarded-Proto/-Host/-For are used: IPs or CIDR prefixes, comma-separated, e.g. 127.0.0.1/32,172.30.0.1/32. See Self-hosting
--trust-proxy ESPRESSO_TRUST_PROXY=1 off older shorthand for --trusted-proxies 127.0.0.1/32,::1/128 (loopback only); ignored when the list is set
--signup ESPRESSO_SIGNUP closed closed, invite or open
--session-ttl ESPRESSO_SESSION_TTL 720h browser sign-in lifetime
--login-rate ESPRESSO_LOGIN_RATE 5 sign-in attempts per username per minute (per IP: 2×); -1 off
--embed-ancestors ESPRESSO_EMBED_ANCESTORS * CSP frame-ancestors for /e/<id> (who may embed), e.g. 'self' https://blog.example
--quota ESPRESSO_QUOTA 0 (unlimited) stored bytes per user (casts + traces), e.g. 500M, 2G; over it uploads and new streams get 413 and ended streams aren't saved
--max-events ESPRESSO_MAX_EVENTS 5000000 max events per recording (422 above)
--unlisted-ttl ESPRESSO_UNLISTED_TTL 0 (keep) delete unlisted recordings older than this (e.g. 720h); hourly sweep, each deletion logged
--upload-rate ESPRESSO_UPLOAD_RATE 120 uploads per user per hour (per IP: 2×); 429 + Retry-After; -1 off
--stream-rate ESPRESSO_STREAM_RATE 30 live streams started per user per hour (per IP: 2×); -1 off
--search-rate ESPRESSO_SEARCH_RATE 60 searches per IP per minute (page and API); -1 off
--no-streams ESPRESSO_STREAMS=0 on disable live streaming
--stream-max-per-user ESPRESSO_STREAM_MAX_PER_USER 3 concurrent live streams per user
--stream-max-duration ESPRESSO_STREAM_MAX_DURATION 6h max live stream length
--stream-max-bytes ESPRESSO_STREAM_MAX_BYTES 52428800 max raw bytes of a live stream
--stream-idle-timeout ESPRESSO_STREAM_IDLE_TIMEOUT 10m end a stream after this long without data
--stream-no-save ESPRESSO_STREAM_SAVE=0 save don't save ended streams as recordings

The hourly sweep that applies --unlisted-ttl also removes expired sign-in sessions, and invites that expired more than 30 days ago.

Fixed limits

These are not configurable:

Limit Value
upload body 50 MB uncompressed; 10 MB on the wire with Content-Encoding: gzip (and 50 MB after decompressing)
recording duration 6 hours
terminal size 1–1000 columns × 1–500 rows
one line in a .cast file 1 MB
exec trace sidecar 50 MB
title 200 characters (control characters removed)
description 5000 characters
live stream message 1 MiB
late-joiner replay buffer 2 MiB

Other commands

Command Options
backup FILE.tar.zst - writes to standard output
restore FILE.tar.zst - reads standard input; --force to restore into a non-empty data directory
healthcheck --url URL (default http://127.0.0.1:24870/healthz)
admin … see Self-hosting → Accounts
version prints the version

All of them take --data DIR.