Dashboard Authentication
Protect your CCS dashboard with optional username/password authentication. Disabled by default for backward compatibility.Authentication is completely optional. If not configured, the dashboard
remains accessible without login (default behavior).
Enable dashboard auth whenever the bind is reachable from another device,
including when you run
ccs config --host 0.0.0.0.Quick Setup
Step 1: Generate Password Hash
Use bcrypt to hash your password:$2b$10$...
Step 2: Configure Authentication
- config.yaml
- Environment Variables
Add to
~/.ccs/config.yaml:Step 3: Restart Dashboard
Login Flow
When authentication is enabled:- Navigate to the dashboard URL printed by
ccs configfor the current session - You’re redirected to login page
- Enter username and password
- On success, redirected to original destination
- Session persists for configured timeout (default: 24 hours)
Logout
Click the user menu in the dashboard header and select Sign Out.Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable/disable authentication |
username | string | "" | Login username |
password_hash | string | "" | Bcrypt-hashed password |
session_timeout_hours | number | 24 | Session duration in hours |
Environment Variables
| Variable | Maps To |
|---|---|
CCS_DASHBOARD_AUTH_ENABLED | dashboard_auth.enabled |
CCS_DASHBOARD_USERNAME | dashboard_auth.username |
CCS_DASHBOARD_PASSWORD_HASH | dashboard_auth.password_hash |
CCS_SESSION_SECRET | Custom session encryption key |
Environment variables take priority over config.yaml values.
Security Features
Session-Based Auth
Uses httpOnly cookies (not localStorage) to prevent XSS attacks
Rate Limiting
5 login attempts per 15 minutes per IP address
Bcrypt Hashing
Industry-standard password hashing (10 rounds)
Persistent Secret
Session secret persisted across restarts
Best Practices
- Use strong passwords: At least 12 characters with mixed case, numbers, and symbols
- Rotate passwords: Change passwords periodically
- Secure transport: Use HTTPS if exposing dashboard externally (via reverse proxy)
- Single user: This feature supports one user; for multi-user, use external auth proxy
Troubleshooting
”Too many login attempts”
Rate limiting triggered. Wait 15 minutes or restart the dashboard.Session expires unexpectedly
Increasesession_timeout_hours in config or check if ~/.ccs/.session-secret file exists.
