# ============================================================================= # Magic Frame — environment configuration # ============================================================================= # # This file serves as a template. The one-click installer # (`./deploy/install.sh`) copies it to `.env` automatically and generates # all secrets. You don't need to fill anything in manually unless you want # optional integrations (Google/Microsoft Calendar, OpenWeatherMap) — those # can be added any time later + `docker compose restart app`. # # The first admin user is created on first visit through the setup flow # in the UI (`/login`). There are NO ADMIN_EMAIL/ADMIN_PASSWORD variables — # that would only be another place where your password ends up in plain text. # ============================================================================= # -------- Database ----------------------------------------------------------- # Postgres connection string. The docker-compose container uses the `db` # service. For external hosting, drop the external URL here. DATABASE_URL="postgresql://postgres:postgres@db:5432/magicdashboard?schema=public" # -------- Session cookie encryption ------------------------------------------ # MUST be set, at least 32 characters. The installer generates this # automatically. Never commit it. SESSION_SECRET="" # -------- TLS / hosting ------------------------------------------------------ # Set to `true` once HTTPS is active (Caddy does this automatically once you # configure a domain). If `false`, the browser refuses to store the session # cookie when it sees HTTPS, if `true` the cookie isn't set over plain HTTP — # so match this to your actual reachability. COOKIE_SECURE="" # Base URL where the dashboard is reachable (no trailing slash). Used for # OAuth callback URLs. If left empty, the app reconstructs it from the # Host header per request — works for most setups. # Example: https://dashboard.example.com APP_BASE_URL="" # Address Caddy uses to reach the app. Defaults to the docker-compose service # name. Only needed if the app runs under a different name — on Kubernetes, # for instance, where the service may be called magic-frame-app. Host[:port] # only; anything else falls back to the default. # Example: APP_UPSTREAM="magic-frame-app:3000" APP_UPSTREAM="" # -------- Host ports --------------------------------------------------------- # Which host ports the stack binds. Defaults: 80 (HTTP) and 443 (HTTPS). # Only change these if the defaults are already taken on your host — e.g. you # already run another reverse proxy on 80. Leaving them at 80/443 keeps the # current behaviour, so existing installs are unaffected. Apply a change with: # docker compose up -d # # NOTE: automatic HTTPS (Let's Encrypt) needs public 80 + 443 reachable. If you # move HTTPS off 443 you're typically behind your own proxy terminating TLS — # set COOKIE_SECURE / APP_BASE_URL to match in that case. HTTP_PORT="80" HTTPS_PORT="443" # -------- Timezone ------------------------------------------------------------ # IANA timezone passed to all containers (app, db, caddy). Calendar/iCal times # and `date` inside the containers follow it. The installer fills this in from # the host automatically — empty means UTC, which is how it behaved before # this option existed. Apply a change with: # docker compose up -d # Example: TZ="Europe/Berlin" TZ="" # -------- Optional integrations ---------------------------------------------- # Everything below is optional. If left empty, the respective function is # disabled (calendar widget shows an error, weather widget falls back to # Open-Meteo). You can set these later + `docker compose restart app`. # Google Calendar OAuth # → https://console.cloud.google.com → Credentials → OAuth Client ID # → Enable: Google Calendar API # → Authorized redirect URI: /api/auth/calendar/google/callback GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" # Microsoft / Outlook Calendar OAuth # → https://portal.azure.com → App registrations # → Redirect URI: /api/auth/calendar/microsoft/callback # → Scopes: Calendars.Read, offline_access, User.Read MS_CLIENT_ID="" MS_CLIENT_SECRET="" # OpenWeatherMap API key # → https://openweathermap.org/api (free tier is fine) # Only used when a weather widget picks the "openweathermap" provider. # The default provider (Open-Meteo) works without a key. OPENWEATHERMAP_API_KEY="" # -------- Update banner ------------------------------------------------------ # GitHub repo to check for new releases. When a newer tag than the local # package.json version is published, a banner appears in the editor. # Default points at the upstream Magic Frame repo. Set this to your own fork # if you maintain one. Cache is 6h; the user can dismiss per-version. MAGIC_FRAME_UPDATE_REPO="jeremiaa/magic-frame" # -------- Internal container configuration ----------------------------------- # Caddy admin API for the app container — points at the docker-compose # network name. Only change this if you run Caddy outside of compose. CADDY_ADMIN_URL="http://caddy:2019"