Skip to content

Environment reference ​

The appliance is configured entirely by environment variables. In the Home Assistant add-on, the options become these variables (see appliance/ha-options.mjs); the env option carries any extra NAME=value line.

Booleans are true/false. Values in a compose file are strings unless the file says otherwise.

Core ​

VariableDefaultMeaning
HAMSTR_AUTHrequirednone turns on home mode: no sign-in, plain HTTP, a port per crumb.
HAMSTR_CRUMB_PORTS20000-20999Home mode: the host ports crumbs may use.
HTTP_PORT8000The container's plain-HTTP port.
HTTPS_PORT8443The container's HTTPS port.
CELLD_LOGwarncelld's log level (RUST_LOG). info adds several routine lines a second.
TZUTCUsed for log timestamps and anything that schedules.

Everything else inside the container listens on loopback in ports 47101–47181, so host networking does not collide with other services. See Ports.

TLS and hostnames ​

VariableDefaultMeaning
TLS_MODEoffdomain, names or off.
DOMAIN—domain mode: the domain with a * record pointing here.
DNS_PROVIDER—domain mode: lego's provider id, e.g. cloudflare.
provider variables—The provider's own credentials (lego dnshelp).
ACME_SERVERLet's EncryptAnother ACME directory URL or lego shortcode.
ACME_EMAILnoneContact address for the ACME account.
NAME_SERVICE_URL—names mode: the names service, HTTPS only.
ADDRESS_IPV4, ADDRESS_IPV6host's Tailscale addressnames mode: what the name points at.
HAMSTR_HOSTthe TLS hostnameThe shell's hostname. Required with TLS_MODE=off.
HAMSTR_CRUMB_DOMAINthe TLS hostnameCrumbs are crumb-<id>.<this>. Required with TLS_MODE=off.
HAMSTR_SCHEMEhttpsWhat browsers use. http only for tests or plain proxies.

Sign-in ​

VariableDefaultMeaning
OIDC_NAME—The first provider's name; its id is the name lowercased.
OIDC_ISSUER—The issuer URL; must be HTTPS.
OIDC_CLIENT_ID—The client id registered at the provider.
OIDC_CLIENT_SECRET—The client secret. Required to seed the first provider.
AUTH_URL—Compose stack only: https://<HAMSTR_HOST>/auth, for site sign-in.
AUTH_KEYgeneratedCompose stack only: HMAC key shared by the router and Hamstr.

The OIDC_* variables seed the first provider on a fresh install and are ignored afterwards; manage providers in Settings → Sign-in. See Sign-in.

Apps ​

VariableDefaultMeaning
HAMSTR_STOREhttps://appcrumb.storeSeeds the first store on a fresh install. Afterwards admins manage stores under Settings → Stores.
HAMSTR_STORE_PUBLICHAMSTR_STOREPublic/link URL for that seed entry.
HAMSTR_PROXY_TOKENgeneratedAppliance internal: proves a crumb request came through Hamstr. Do not set by hand.

Limits ​

Per-site limits protect the node from one app taking everything. The defaults are fine for a small install.

VariableDefaultMeaning
SITE_TIMEOUT_SECS30Wall-clock limit for a response and for each Durable Object call. Above it: 504.
SITE_MAX_INFLIGHT128Concurrent requests per site per router isolate. Above it: 503.
SITE_MAX_OBJECTS1000Durable Objects (databases) one site may create.
SITE_MAX_SUBREQUESTS1000Object calls plus egress fetches one request may make.
CELLD_V8_HEAP_LIMIT_MB256Per-isolate V8 heap. celld's own default is 128; an EmDash site needs the headroom.
CELLD_LTX_RETENTION_SECS3600How long write-log epochs are kept for a restore.

Storage and runtime ​

VariableDefaultMeaning
S3_FSYNCtrueFlush each object to disk before acknowledging it. false is faster but a crash can lose the last writes.
HAMSTR_DATA/dataRoot of all state. Only useful for tests.
PORT3000Hamstr's own listener; internal.
CELLD_MEM_LIMIT—Compose stack only: the celld service's memory limit (the appliance has one limit for everything).

Setting them ​

In compose:

yaml
environment:
  - TLS_MODE=domain
  - DOMAIN=example.com

In the Home Assistant add-on, either the matching option (domain:, dns_provider:, oidc_issuer:) or the free-form env list:

yaml
env:
  - CF_DNS_API_TOKEN=...
  - CELLD_LOG=info

Secrets ​

  • The platform's own secrets (S3 keys, admin token, the Hamstr secret, the auth key) are generated from /dev/urandom on first start into /data/secrets.env. Do not set them by hand.
  • The OIDC client secret and DNS provider token are the only ones you supply. Keep them in .env (mode 600) rather than in compose.yaml.
  • Changing secrets.env after the bucket exists makes the existing data unreadable. Back it up with the data.

Work in progress. Formats and settings will change.