The Hot Node UI uses simple password-based authentication to protect administrative actions. The interface is view-only by default and requires login to perform any write operations.
Add your admin password to the .env file:
ADMIN_PASSWORD=your_secure_password_here
SESSION_SECRET=your_random_secret_key_hereImportant:
- Use a strong, unique password
- Never commit
.envto version control - Change
SESSION_SECRETto a random string in production
Sessions are configured to:
- Last 24 hours
- Use httpOnly cookies (XSS protection)
- Use secure cookies in production (HTTPS only)
- Open the Hot Node UI in your browser
- Click the 🔒 Login button in the top-right corner
- Enter your admin password
- Click Login
Once authenticated, all administrative controls become enabled.
Click the 🔓 Logout button in the top-right corner to end your session.
When not authenticated:
- ✅ View all dashboards, stats, and pin lists
- ✅ See system health and status
- ❌ Cannot toggle enable/disable
- ❌ Cannot add or remove pins
- ❌ Cannot trigger migrations or GC
- ❌ Cannot modify settings
The following actions require authentication:
- Toggle hot node enabled/disabled
- Add manual pins
- Remove pins
- Update configuration
- Trigger manual migration
- Run garbage collection
- Modify Discord webhook settings
- Sessions are stored in-memory (restart clears all sessions)
- For production, consider using Redis or MongoDB for session storage
- Always use HTTPS in production to protect credentials
- Implement rate limiting for login attempts (future enhancement)
- Consider adding IP whitelisting at the nginx/firewall level
POST /api/auth/login
Body: { "password": "your_password" }
Response: { "success": true }
POST /api/auth/logout
Response: { "success": true }
GET /api/auth/status
Response: { "authenticated": true/false }
All write operations require authentication:
POST /api/config/togglePOST /api/config/updatePOST /api/pins/addPOST /api/pins/removePOST /api/pins/migratePOST /api/migration/runPOST /api/gc/run
401 Unauthorized is returned for unauthenticated requests to protected endpoints.
To test authentication:
- Start the server:
npm start - Open browser to
http://localhost:3101 - Try to add a pin without logging in (button should be disabled)
- Login with your password
- Add a pin (should now work)
- Logout
- Verify actions are disabled again