# LinkShell Gateway Environment Variables # Copy this file to .env and modify as needed. # # `docker compose up -d` reads PORT, LOG_LEVEL, AUTH_REQUIRED and the SUPABASE_* # values from .env (see docker-compose.yml). The others are for running the # gateway directly: # node --env-file=.env packages/gateway/dist/gateway/src/main.js # To use them under Docker, add them to `environment:` in docker-compose.yml # or pass them with `docker run -e`. # Gateway listen port PORT=8787 # Log level: debug, info, warn, error LOG_LEVEL=info # Where the gateway keeps its data (one SQLite file: public keys and pairings). # Losing it unpairs every phone. Default: ./data/relay.db # The Docker image sets /data/relay.db itself: mount a volume at /data. # RELAY_DATA_PATH=./data/relay.db # IPs of the reverse proxies in front of the gateway, comma separated, as the # gateway sees them connect. X-Forwarded-For is believed only from these, and # the connection limit below then counts each client's own address. Unset: # every connection counts as coming from the proxy (and one from 127.0.0.1 is # never limited). Leave unset when clients connect directly. # TRUSTED_PROXIES=127.0.0.1,::1 # Connections allowed per IP per window (loopback is never limited) # WS_CONNECT_RATE_LIMIT_MAX=20 # WS_CONNECT_RATE_LIMIT_WINDOW_MS=60000 # ── Accounts (the official gateway) ───────────────────────────── # A self-hosted gateway leaves all of these unset: phones are paired with a # QR code or a six-digit code, and no account is involved. # With both set, account tokens are verified and an account's phones reach its # computers without pairing. SUPABASE_URL= SUPABASE_ANON_KEY= # true: a computer must be signed in to an account with an active subscription # (the `profiles` table, read with the service-role key) to connect. AUTH_REQUIRED=false SUPABASE_SERVICE_ROLE_KEY=