Files
MeshTender/.env.example
T

54 lines
2.6 KiB
Bash

# Copy to .env and source it (e.g. `set -a; . ./.env; set +a`) before running.
MESHTENDER_ADDR=:8080
MESHTENDER_DATABASE_URL=postgres://meshtender:meshtender@localhost:5432/meshtender?sslmode=disable
# 32-byte AES key, hex-encoded (64 chars). Generate with:
# openssl rand -hex 32
MESHTENDER_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000
# WebAuthn relying-party settings. RP_ID is the bare domain (no scheme/port).
# Set it to the ROOT registrable domain (e.g. meshtender.com) so passkeys stay
# valid across every subdomain — this is permanent, so don't pin it to a
# subdomain. RP_ORIGIN is a comma-separated list of every origin a ceremony may
# run from (the auth and app hosts).
MESHTENDER_RP_ID=localhost
MESHTENDER_RP_NAME=MeshTender
MESHTENDER_RP_ORIGIN=http://localhost:8080
# Optional split-host topology, all served by one binary on one port (browsers
# route *.localhost to loopback). Roles:
# ROOT_HOST — public marketing + organization discovery (no session).
# WWW_HOST — redirects to ROOT_HOST (defaults to "www." + ROOT_HOST).
# AUTH_HOST — login/signup + WebAuthn ceremonies; hands off to the app host.
# PRIMARY_HOST — the product/app host (dashboard at /, authenticated area).
# Leave AUTH_HOST empty for single-host mode (everything on PRIMARY_HOST).
#
# NOTE: don't use *.localhost for the split — "localhost" is a public suffix, so
# browsers reject RP ID "localhost" from a subdomain and passkeys won't work. Use
# a real registrable dev domain with its subdomains pointed at 127.0.0.1, so RP
# ID can be the registrable parent. Example (leighthaus.dev):
# MESHTENDER_RP_ID=leighthaus.dev
# MESHTENDER_RP_ORIGIN=https://auth.leighthaus.dev:8080,https://app.leighthaus.dev:8080
# MESHTENDER_ROOT_HOST=leighthaus.dev
# MESHTENDER_AUTH_HOST=auth.leighthaus.dev
# MESHTENDER_PRIMARY_HOST=app.leighthaus.dev
# MESHTENDER_ROOT_HOST=
# MESHTENDER_WWW_HOST=
# MESHTENDER_PRIMARY_HOST=
# MESHTENDER_AUTH_HOST=
#
# HSTS-preloaded TLDs (.dev, .app, …) force HTTPS, so plain-HTTP dev won't load.
# Serve TLS in-process with a locally-trusted mkcert cert (origins above are
# https for this reason):
# brew install mkcert && mkcert -install
# mkcert -cert-file ./certs/dev.pem -key-file ./certs/dev-key.pem "*.leighthaus.dev" leighthaus.dev
# MESHTENDER_TLS_CERT=./certs/dev.pem
# MESHTENDER_TLS_KEY=./certs/dev-key.pem
# Default LoRa radio params suggested when adding a repeater (EU 869.525 / 250k / SF11 / CR5).
MESHTENDER_RADIO_FREQ_HZ=869525000
MESHTENDER_RADIO_BW_HZ=250000
MESHTENDER_RADIO_SF=11
MESHTENDER_RADIO_CR=5