User Roles
| Role | Permissions |
|---|---|
| Admin | Full access: channels, recordings, settings, users |
| Viewer | View-only: recordings library, active recordings |
Admin Permissions
- Add, edit, and delete channels
- Start, stop, and delete recordings
- Configure all settings
- Manage users
- Access API with full permissions
Viewer Permissions
- Browse recording library
- View active recordings
- Stream/download recordings
- View (not change) channel list
First-Time Setup
On first launch, create an admin account:Open Dashboard
Navigate to http://localhost:8080
Managing Users
Add User
Edit User
Delete User
You cannot delete the last admin account.
View & Revoke Sessions
Admins can manage active sessions for any user:Authentication
Session Management
| Setting | Description | Default |
|---|---|---|
| Session Duration | Token validity period | 24 hours (86400 seconds) |
| Refresh Grace Period | Time after expiry where refresh is still allowed | 1 hour (3600 seconds) |
| Max Sessions | Concurrent logins per user | Unlimited |
Token Refresh Flow
Battles Record uses proactive token refresh to maintain sessions seamlessly:- Proactive refresh - The client automatically refreshes tokens 5 minutes before they expire
- Request retry - If a request fails with
TOKEN_EXPIRED, the client attempts a refresh and retries - Grace period - Expired tokens can still be refreshed for up to 1 hour after expiry
- Session expired - If refresh fails (beyond the grace period), the user sees a session expired modal and must re-authenticate
Password Requirements
Configure password policy in Settings → Security:| Setting | Description | Default |
|---|---|---|
| Min Length | Minimum characters | 8 |
| Require Uppercase | At least one A-Z | No |
| Require Number | At least one 0-9 | No |
| Require Symbol | At least one special char | No |
Two-Factor Authentication
2FA is optional and can be enabled per-user.
Access Control
IP Allowlist
Restrict dashboard access to specific IPs:Reverse Proxy
When behind a reverse proxy:- Configure proxy to pass
X-Forwarded-Forheader - In Settings → Security, enable Trust Proxy Headers
- Add proxy IP to trusted proxies list
API Authentication
API Keys
Create API keys for programmatic access:
Use in requests:
JWT Tokens
Login to receive a JWT token:Password Reset
As Admin
Reset another user’s password:Self-Service
If enabled, users can reset their own password:CLI Reset
If locked out, reset via command line: Desktop:Session Security
| Setting | Description |
|---|---|
| Secure Cookies | Require HTTPS for auth cookies |
| Same-Site | Cookie same-site policy |
| HTTP Only | Prevent JavaScript cookie access |
Local-Only Mode
When running as a desktop app sidecar, the daemon operates in local-only mode:| Setting | Behavior |
|---|---|
| Authentication | No login required |
| Permissions | All requests treated as Admin |
| Access | Only accessible from localhost |
| Shutdown | POST /api/shutdown endpoint available for graceful daemon shutdown |
Local-only mode is automatically enabled when the desktop app manages the daemon as a sidecar
process. It is not available in Docker or standalone daemon deployments.