HUB
Sign inSign up

fiddler110/crowsnest

By fiddler110

•Updated 9 days ago

Image
0

312

fiddler110/crowsnest repository overview

⁠CrowsNest — Windrose Server Controller

A login-protected web dashboard for managing and monitoring your Windrose dedicated game server. Start and stop the server, stream live logs, track resource usage, and get real-time Windrose+ data — all from a browser. Runs as a Docker container alongside the game server. See the CrowsNest Github page for my configuration and setup instructions for running via docker compose.


⁠Features

  • Login-protected dashboard (session invalidates on browser close)
  • Live server status badge — online / starting / offline / unknown
  • One-click Start and Stop buttons
  • Smart polling: every 30 minutes at idle; every 10 seconds for 10 minutes after a Start/Stop action
  • Live log streaming via Server-Sent Events
  • System resource stats: CPU, memory, and optional GPU via nvidia-smi
  • Windrose+ panel — live player count, player names, world time/weather, server uptime, connection info, memory usage, multipliers, and server mode badge (active / idle / degraded / boot) — requires the Windrose+ plugin
  • Night shutdown — auto-stops the server when empty during a configurable overnight window
  • Optional Discord notifications on automated shutdown

⁠How to Use

⁠First-time setup

1. Copy the env file templates and fill in your values:

cp CrowsNest/.env.example CrowsNest/.env

2. Set a password for each user (see Authentication⁠):

docker run --rm -it \
  -v ./CrowsNest/.env:/app/.env \
  fiddler110/crowsnest \
  python set_password.py scott

3. Start the container:

docker compose up -d crowsnest

⁠Docker Compose
services:
  crowsnest:
    image: fiddler110/crowsnest:latest
    container_name: crowsnest
    restart: unless-stopped
    ports:
      - "5000:5000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      - WINDROSE_COMPOSE_FILE=/windrose/compose.yaml
      - ENV_FILE=/app/.env
      - WINDROSE_ENV_FILE=/windrose/.env
      - COMPOSE_PROJECT_NAME=windrose
      - TZ=${TZ:-UTC}
    group_add:
      - "${DOCKER_GID:-999}"
    volumes:
      - ./CrowsNest/.env:/app/.env
      - ./compose.yaml:/windrose/compose.yaml:ro
      - ./.env:/windrose/.env
      - /var/run/docker.sock:/var/run/docker.sock
docker compose up -d
⁠Docker Run
docker run -d \
  --restart unless-stopped \
  --name crowsnest \
  -p 5000:5000 \
  --add-host host.docker.internal:host-gateway \
  --group-add "${DOCKER_GID:-999}" \
  -e WINDROSE_COMPOSE_FILE=/windrose/compose.yaml \
  -e ENV_FILE=/app/.env \
  -e WINDROSE_ENV_FILE=/windrose/.env \
  -e COMPOSE_PROJECT_NAME=windrose \
  -e TZ=UTC \
  -v ./CrowsNest/.env:/app/.env \
  -v ./compose.yaml:/windrose/compose.yaml:ro \
  -v ./.env:/windrose/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  fiddler110/crowsnest:latest

⁠Authentication

Users are defined by the VALID_USERS set in app.py. Each username must also have a corresponding <NAME>_PASSWORD_HASH entry in .env. Passwords are stored as PBKDF2-SHA256 hashes (260,000 iterations, random 16-byte salt) — never in plaintext.

⁠Setting passwords

Use the bundled set_password.py helper to generate and store a hash:

# Run against the mounted .env file
docker exec -it crowsnest python set_password.py scott
# Enter and confirm the password when prompted

This writes SCOTT_PASSWORD_HASH=<hash> into .env. No container restart is needed — the bind-mounted .env is read on every login attempt.

⁠Adding users

1. Add the username to VALID_USERS in app.py:

VALID_USERS = {"scott", "alice"}

2. Generate the hash as shown above.

3. Rebuild and restart the container (required only when VALID_USERS changes):

docker compose build crowsnest && docker compose up -d --no-deps crowsnest
⁠Login behaviour
  • Sessions invalidate on browser close (SESSION_PERMANENT = False).
  • Login attempts are rate-limited to 10 per IP per 60-second window.
  • Cookies are set with HttpOnly, SameSite=Strict, and (in production) Secure flags.

⁠Environment Variables

All configuration lives in CrowsNest/.env.

VariableDefaultDescription
<NAME>_PASSWORD_HASH—PBKDF2-SHA256 hash for each user. Required — generated by set_password.py.
SESSION_SECRETauto-generatedFlask session signing key. Created automatically on first run if absent.
TZUTCIANA timezone for night shutdown scheduling and log timestamps, e.g. America/New_York.
WINDROSE_PLUS_RCON_PASSWORD—Must match rcon.password in windrose_plus.json. Required for Windrose+ integration.
WPLUS_HTTP_URLhttp://host.docker.internal:8780Base URL of the Windrose+ HTTP API.
DISCORD_WEBHOOK_URL—Discord webhook URL for night shutdown notifications.
NIGHT_SHUTDOWN_ENABLEDtrueSet to false to disable the night shutdown job entirely.
NIGHT_SHUTDOWN_START23Hour (0–23) the shutdown window opens.
NIGHT_SHUTDOWN_END5Hour (0–23) the shutdown window closes. Wraps midnight.
NIGHT_SHUTDOWN_INTERVAL30Minutes between idle checks inside the shutdown window.
INSECURE_COOKIEfalseSet to true to disable the Secure cookie flag (for plain-HTTP dev environments).

⁠Volumes

Host pathContainer pathPurpose
./CrowsNest/.env/app/.envCredentials and runtime configuration
./compose.yaml/windrose/compose.yamlCompose file used to start/stop the game server (read-only)
./.env/windrose/.envWindrose server .env (for UPDATE_ON_START toggling)
/var/run/docker.sock/var/run/docker.sockDocker socket for issuing docker commands against the host

No shared data volume is needed between containers. All Windrose+ data is fetched over HTTP via http://host.docker.internal:8780.


⁠Docker Socket Access

The container runs as a non-root user (appuser, UID 1000). To access the Docker socket at runtime, the container is added to the host's docker group via group_add.

Find your host Docker group GID:

stat -c '%g' /var/run/docker.sock

Set DOCKER_GID in your root .env if it differs from the default of 999:

DOCKER_GID=998

⁠Windrose+ Integration

When Windrose+⁠ is enabled on the game server (WINDROSE_PLUS_ENABLED=true), CrowsNest connects to its HTTP API at port 8780 and surfaces a live info panel on the dashboard showing:

  • Active player count and names
  • Server mode: active / idle / degraded / boot
  • World time of day and current weather
  • Server uptime
  • Connection info and region
  • Memory usage
  • Multiplier values

Set WINDROSE_PLUS_RCON_PASSWORD in CrowsNest/.env to the same value as rcon.password in your windrose_plus.json to enable this panel.


⁠Night Shutdown

CrowsNest can automatically stop the Windrose server during overnight hours if the server is empty. This is useful to avoid leaving a server running with no players.

The scheduler wakes up every NIGHT_SHUTDOWN_INTERVAL minutes within the configured window and stops the server only if the player count is zero.

Configure via environment variables in CrowsNest/.env:

VariableDefaultDescription
NIGHT_SHUTDOWN_ENABLEDtrueEnable or disable the feature
NIGHT_SHUTDOWN_START23Hour the window opens (e.g. 23 = 11 PM)
NIGHT_SHUTDOWN_END5Hour the window closes (e.g. 5 = 5 AM)
NIGHT_SHUTDOWN_INTERVAL30Check interval in minutes

The window wraps midnight — a start of 23 and end of 5 covers 11 PM to 5 AM.

You can also toggle and reconfigure night shutdown live from the dashboard without restarting the container.


⁠Discord Notifications

Set DISCORD_WEBHOOK_URL in CrowsNest/.env to receive a notification in a Discord channel whenever the night shutdown job stops the server.

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

⁠HTTP API

All endpoints require an active session cookie obtained via /login.

MethodPathDescription
GET/Dashboard
GET/POST/loginLogin page
POST/logoutClears session, redirects to /login
GET/api/statusContainer status: online / starting / offline / unknown
POST/api/startStart the windrose container
POST/api/stopStop the windrose container
GET/api/logsSSE stream of docker logs -f windrose
GET/api/statsCPU, memory, and (if available) GPU usage
GET/api/playersPlayer count, names, and data availability flag
GET/api/windrose-infoFull Windrose+ data: players, world state, multipliers, memory
GET/api/update-on-startCurrent UPDATE_ON_START value from the Windrose .env
POST/api/update-on-startToggle UPDATE_ON_START
GET/api/night-shutdownNight shutdown config and next scheduled check time
POST/api/night-shutdownEnable/disable and reconfigure the shutdown window

⁠Running Locally (without Docker)

pip install -r requirements.txt

# Set at least one password
python3 set_password.py scott

# Run the dev server
python3 app.py

The app listens on http://0.0.0.0:5000. Set INSECURE_COOKIE=true in .env when running without HTTPS.


⁠About

CrowsNest is a companion controller for the Windrose dedicated server Docker image⁠ maintained by indifferentbroccoli⁠. CrowsNest is an independent project and is not affiliated with indifferentbroccoli or the Windrose game.

Tag summary

Content type

Image

Digest

sha256:a898f7d2d…

Size

78.6 MB

Last updated

9 days ago

docker pull fiddler110/crowsnest