# frost [FROST-Server](https://github.com/FraunhoferIOSB/FROST-Server) — an OGC SensorThings API server. Stores sensors, observations, datastreams in postgis; exposes REST + MQTT. - **Public hostname**: `sta.wbd-rd.nl` - `/FROST-Server` → REST + admin UI (frost-http:8080) - `/mqtt` → WebSocket MQTT for SensorThings clients (frost-mqtt:9876) - **Networks**: `frost-internal` (private bus) + `app` (nginx ingress) - **Backend**: dedicated `postgis/postgis:16-3.4-alpine` container — segregated from the shared `sql` stack - **Internal bus**: dedicated `eclipse-mosquitto` for frost-http ↔ frost-mqtt sync (not reachable from outside the stack) - **Public MQTT broker for SCADA/IoT clients**: that's `rabbitmq` (port 8883 TLS via nginx stream), NOT this stack ## Volumes (persistent) - `frost-db-data` — postgis data dir - `frost-mosquitto-data`, `frost-mosquitto-log` — internal bus state Container can be recreated freely; no data loss as long as volumes are kept. ## First-run 1. `docker compose up -d frost-db frost-mosquitto` (or just `up -d` for the full stack — frost-http waits on the db healthcheck) 2. `frost-http` will auto-create the schema (`persistence_autoUpdateDatabase=true`) on first start 3. Create the admin user (one-time, post-deploy — the USERS table is created by FROST itself): ```bash docker compose exec frost-db psql -U sensorthings -d sensorthings -c \ "INSERT INTO \"USERS\" (\"USER_NAME\", \"USER_PASS\") VALUES ('admin', crypt('CHANGE_ME', gen_salt('bf', 12)));" ``` Subsequent password rotations: ```bash docker compose exec frost-db psql -U sensorthings -d sensorthings -c \ "UPDATE \"USERS\" SET \"USER_PASS\"=crypt('NEW_PW', gen_salt('bf', 12)) WHERE \"USER_NAME\"='admin';" ``` ## TODO - Switch from `BasicAuthProvider` to Keycloak OIDC (FROST has a plugin) - Bootstrap admin user automatically (post-init container that waits for FROST schema, then runs the SQL above with `${FROST_ADMIN_PASSWORD}`) - Document the SensorThings client examples (Things, Datastreams, Observations) - pgadmin / db inspection: use shared portainer or a one-off `psql` exec