Configuration
Configure the Valvet hub and node agent
Hub Configuration
The hub is configured through environment variables and stores its state in a SQLite database.
Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT | 4865 | HTTP listen port |
DATA_DIR | /data (Docker) or ./data | Database and configuration directory |
JWT_SECRET | Auto-generated | Secret for signing JWT tokens. Set explicitly in production. |
LOG_LEVEL | info | Logging level: trace, debug, info, warn, error |
Database
The hub uses SQLite in WAL (Write-Ahead Logging) mode for concurrent read access. The database file is stored at {DATA_DIR}/valvet.db.
Migrations run automatically on startup — the hub creates and updates the schema as needed.
Ports and Networking
The hub exposes a single HTTP port that serves:
- The web UI (React SPA)
- The REST API (
/api/v1/*) - WebSocket connections from nodes (
/api/v1/ws) - SSE event stream for live UI updates (
/api/v1/events)
If running behind a reverse proxy, ensure WebSocket upgrade headers are forwarded. See the Reverse Proxy guide.
Node Configuration
The node agent stores its configuration at ~/.config/valvet-node/config.json after enrollment. This file contains:
- Hub URL
- Node authentication token
- Node ID
The config file is created automatically during enrollment and should not be edited manually.
Node Agent Commands
valvet-node enroll # Enroll with a hub
valvet-node run # Start the agent
valvet-node update # Self-update to latest version
valvet-node uninstall # Remove the agent