Quickstart Guide
Get Spectra Server up and running in less than 5 minutes using Docker Compose. This guide will have you processing game data and streaming to frontends quickly.Prerequisites
Docker
Docker Engine 20.10 or higher
Docker Compose
Docker Compose v2.0 or higher
No Node.js installation required when using Docker! The container includes all dependencies.
Quick Setup with Docker Compose
Create Project Directory
Create a dedicated directory for Spectra Server and SSL certificates:The
keys folder will store SSL certificates (optional for development).Create Docker Compose Configuration
Create a
docker-compose.yml file in the spectra-server directory:docker-compose.yml
Port Mapping:
- 5100: Incoming WebSocket for observer clients
- 5101: REST API for status, previews, and team info
- 5200: Outgoing WebSocket for frontends
Configure Environment Variables (Optional)
For development, the default Then update your
INSECURE=true setting is sufficient. For production or custom configurations, create a .env file:docker-compose.yml to use the env file:docker-compose.yml
Start the Server
Launch Spectra Server with Docker Compose:The
-d flag runs the container in detached mode (background).SSL Certificates (Production)
For production deployments withINSECURE=false, place your SSL certificates in the keys folder:
If you don’t provide SSL certificates, Spectra Server will automatically generate self-signed certificates. However, clients will need to accept the self-signed certificate.
Environment Variables Reference
| Variable | Default | Description |
|---|---|---|
INSECURE | true | Set to false to enable HTTPS/WSS with SSL certificates |
SERVER_KEY | keys/server.key | Path to SSL private key |
SERVER_CERT | keys/server.crt | Path to SSL certificate |
REQUIRE_AUTH_KEY | true | Require API key authentication for observer clients |
AUTH_KEY | DEBUG_REMOVE_ME | Master authentication key for development |
USE_BACKEND | false | Enable backend integration for multi-org support |
SUPPORTER_CHECK_URL | - | Backend endpoint for supporter verification |
Next Steps
Connect Observer Client
Set up Spectra Client on an observer machine
Connect Frontend
Configure Spectra Frontend to receive game state
API Reference
Explore REST endpoints and WebSocket events
Configuration
Advanced configuration and authentication setup
Testing the Connection
Once the server is running, you can test WebSocket connections:Troubleshooting
Server won't start or immediately exits
Server won't start or immediately exits
Check the logs:Common issues:
- Port already in use (5100, 5101, or 5200)
- Invalid SSL certificate paths when
INSECURE=false - Missing environment variables
Cannot connect to WebSocket
Cannot connect to WebSocket
Verify:
- Server is running:
docker compose ps - Ports are accessible:
curl http://localhost:5101/status - Firewall rules allow connections on ports 5100, 5101, 5200
- Client version is compatible with server version
Authentication failing
Authentication failing
Check:
REQUIRE_AUTH_KEYis set tofalsefor testing, orAUTH_KEYmatches the key provided by the client- Client is sending proper authentication packet format
Running from Source (Development)
If you prefer to run from source instead of Docker:Running from source requires Node.js 18+ and Yarn 4.7.0+.