# Configuration ## Environment variables and flags | Variable / flag | Description | Default | |-----------------|-------------|---------| | `HNHMAP_PORT` | HTTP server port | 8080 | | `-port` | Same (command-line flag) | value of `HNHMAP_PORT` or 8080 | | `HNHMAP_BOOTSTRAP_PASSWORD` | Password for initial setup: when no users exist, logging in as `admin` with this password creates the first admin user | — | | `HNHMAP_BASE_URL` | Full application URL for OAuth redirect_uri (e.g. `https://map.example.com`). If not set, derived from `Host` and `X-Forwarded-*` headers | — | | `HNHMAP_OAUTH_GOOGLE_CLIENT_ID` | Google OAuth Client ID | — | | `HNHMAP_OAUTH_GOOGLE_CLIENT_SECRET` | Google OAuth Client Secret | — | | `-grids` | Grid storage directory (command-line flag; in Docker typically `-grids=/map`) | `grids` | Example for first run: ```bash export HNHMAP_BOOTSTRAP_PASSWORD=your-secure-password ./hnh-map -grids=./grids -port=8080 ``` In Docker, a volume is typically mounted at `/map` and the app is started with `-grids=/map`. For the frontend (Nuxt) in development mode: | Variable | Description | |----------|-------------| | `NUXT_PUBLIC_API_BASE` | Base path to the API (e.g. `/map/api` when proxying to the backend) | See also [.env.example](../.env.example) in the repository root.