Admin Panel¶
The Weather Service admin panel provides a web interface for managing the server, users, settings, and monitoring system health.
Accessing the Admin Panel¶
Default URL: https://wthr.top/admin
First-Time Setup¶
On first run, Weather Service launches the setup wizard:
- Navigate to
https://wthr.top/admin/server/setupin your browser - The setup wizard automatically opens
- Create the primary admin account:
- Username (email address)
- Strong password (min 12 characters)
- Enable 2FA (recommended, optional)
- Configure basic server settings
- Complete setup
The setup wizard is a one-time process. After completion, access the admin panel at /admin.
Authentication¶
Login¶
- Go to
https://wthr.top/admin - Enter admin username and password
- If 2FA is enabled, enter the TOTP code
- Click Login
Two-Factor Authentication (2FA)¶
Enable 2FA for enhanced security:
- Go to Admin Panel → Security
- Click Enable Two-Factor Authentication
- Scan QR code with authenticator app (Google Authenticator, Authy, etc.)
- Enter verification code
- Save recovery codes in a safe place
Password Requirements¶
Admin passwords must meet these criteria:
- Minimum 12 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- At least one special character (!@#$%^&*)
Admin Panel Sections¶
Dashboard¶
The dashboard provides an overview of server status and activity.
Displays: - Server uptime and version - Active users and sessions - Recent API requests - System resource usage (CPU, memory, disk) - Weather data cache statistics - GeoIP database status - Recent errors and warnings
Quick Actions: - Restart server - Clear cache - Download logs - Run backup
Users¶
Manage user accounts.
Features: - List all registered users - Create new users - Edit user profiles - Reset user passwords - Enable/disable user accounts - Delete users - View user activity logs - Manage user locations
User Table Columns: - Username/Email - Registration date - Last login - Status (active/disabled) - 2FA enabled - Saved locations count - Actions (edit, disable, delete)
Creating a User:
- Click Add User
- Enter user details:
- Username
- Email address
- Password (auto-generated or manual)
- Set user status (active/disabled)
- Click Create User
- Send credentials to user (manually or via email)
Settings¶
Configure server-wide settings through the web UI.
General Settings¶
- Server Name - Display name for the service
- Server Mode - Production or development
- Debug Mode - Enable verbose logging
- Maintenance Mode - Put server in maintenance mode
Weather Settings¶
- Enable Weather - Toggle weather forecasts
- Enable Earthquakes - Toggle earthquake data
- Enable Hurricanes - Toggle hurricane tracking
- Enable Severe Weather - Toggle severe weather alerts
- Enable Moon Phase - Toggle lunar information
- Cache Duration - Weather data cache TTL
GeoIP Settings¶
- Enable GeoIP - Auto-location via IP address
- Auto-Update - Automatically update GeoIP databases
- Update Interval - How often to update (default: 7 days)
- Database Sources - CDN URLs for GeoIP data
Authentication Settings¶
- Session Duration - How long sessions last
- Password Requirements - Enforce password complexity
- Login Rate Limit - Max login attempts
- Registration - Enable/disable user registration
Notification Settings¶
- Enable Notifications - WebSocket notifications
- Toast Notifications - Pop-up toast messages
- Banner Notifications - Top banner messages
- Notification Center - Notification history panel
- Sound Alerts - Audio notification alerts
Email/SMTP Settings¶
- Enable Email - Send email notifications
- SMTP Host - Mail server hostname
- SMTP Port - Mail server port (25, 587, 465)
- SMTP Username - Authentication username
- SMTP Password - Authentication password
- From Address - Email sender address
- Use TLS - Enable TLS encryption
Security Settings¶
- CSRF Protection - Enable CSRF tokens
- Rate Limiting - API rate limits
- IP Blocking - Block specific IPs or countries
- CORS - Cross-origin resource sharing settings
SSL/TLS Settings¶
- Enable HTTPS - Use SSL/TLS
- Certificate Path - SSL certificate file
- Key Path - SSL private key file
- Let's Encrypt - Automatic SSL via Let's Encrypt
- Email address
- Domain names
- Auto-renewal
Logs¶
View and manage server logs.
Log Types: - Application Logs - Server events and errors - Access Logs - HTTP request logs - Audit Logs - Admin actions and security events - Error Logs - Error-only logs
Features: - Real-time log streaming - Filter by log level (debug, info, warn, error) - Search logs by keyword - Download logs as files - Clear old logs - Configure log retention
Log Levels: - DEBUG - Detailed debugging information - INFO - General informational messages - WARN - Warning messages (non-critical) - ERROR - Error messages (failures)
Metrics¶
Monitor system performance and usage.
Metrics Displayed: - API request rate (requests/minute) - Response time percentiles (p50, p95, p99) - Cache hit/miss ratio - Database query performance - Memory usage over time - Active WebSocket connections - GeoIP lookup performance - External API call statistics
Charts: - Request rate over time - Response time distribution - Memory usage timeline - Cache performance - Top API endpoints - Geographic distribution of requests
Scheduler¶
View and manage scheduled tasks.
Scheduled Tasks: - GeoIP Update - Update GeoIP databases (weekly) - Database Vacuum - Optimize database (daily) - Log Rotation - Rotate log files (daily) - Notification Cleanup - Clean old notifications (daily) - Session Cleanup - Remove expired sessions (hourly) - Cache Cleanup - Clear stale cache entries (hourly)
Task Actions: - View last run time and status - Run task immediately - Enable/disable task - Change schedule - View task history
Backup & Restore¶
Create and restore backups.
Backup Features: - Manual backup creation - Automated scheduled backups - Backup to local filesystem - Download backups - View backup history - Restore from backup
Creating a Backup:
- Go to Admin Panel → Backup
- Click Create Backup
- Wait for backup to complete
- Download backup file or leave on server
Restoring a Backup:
Service Interruption
Restoring a backup will stop the server and replace all data. All current sessions will be terminated.
- Go to Admin Panel → Backup
- Select backup file
- Click Restore
- Confirm restoration
- Server will restart with restored data
Notifications¶
Manage admin panel notifications.
Notification Types: - Success - Operation completed successfully - Info - Informational message - Warning - Warning or caution - Error - Error or failure - Security - Security-related events
Display Modes: - Toast - Pop-up notification (auto-dismiss) - Banner - Top banner (requires dismiss) - Center - Notification center panel
Features: - View notification history - Mark notifications as read - Dismiss notifications - Configure notification preferences - Enable/disable notification types
Tor Hidden Service¶
Configure Tor hidden service (if enabled).
Features: - Enable/disable Tor hidden service - View .onion address - Configure hidden service port - Monitor Tor connection status - Regenerate .onion address
Enabling Tor:
- Ensure Tor is installed (included in Docker image)
- Go to Admin Panel → Tor
- Click Enable Tor Hidden Service
- Wait for .onion address generation (may take 1-2 minutes)
- Copy .onion address for use
Your weather service will be accessible at:
Admin Panel Features¶
Live Settings Updates¶
Most settings can be updated without restarting the service:
- Change setting in admin panel
- Click Save
- Setting takes effect immediately
Settings requiring restart: - Listen address/port - Database paths - SSL certificates
Audit Trail¶
All admin actions are logged:
- User created/edited/deleted
- Settings changed
- Backups created/restored
- Domains added/verified/deleted
- System maintenance performed
View audit logs at Admin Panel → Logs → Audit
Keyboard Shortcuts¶
| Shortcut | Action |
|---|---|
Ctrl + K | Global search |
Ctrl + / | Show shortcuts |
Esc | Close modals/dialogs |
g d | Go to dashboard |
g u | Go to users |
g s | Go to settings |
Mobile Support¶
The admin panel is fully responsive and works on: - Desktop browsers - Tablets - Mobile phones (portrait and landscape)
Security Best Practices¶
Admin Account Security¶
- Use strong passwords - At least 12 characters with complexity
- Enable 2FA - Protect admin access with TOTP
- Regular password rotation - Change passwords every 90 days
- Unique passwords - Don't reuse passwords from other services
- Secure password storage - Use a password manager
Session Security¶
- Sessions expire after 7 days of inactivity (configurable)
- Sessions are invalidated on password change
- Logout from all devices available
- Session cookies are HTTP-only and secure
Access Control¶
- Only server admins can access
/admin - Regular users cannot access admin panel
- Failed login attempts are rate-limited
- Suspicious activity triggers security notifications
Audit and Monitoring¶
- Review audit logs regularly
- Monitor failed login attempts
- Check for unusual API activity
- Review user account changes
Troubleshooting¶
Cannot Access Admin Panel¶
Problem: Admin panel shows "Access Denied"
Solution: - Ensure you're logged in as an admin - Check that admin role is set correctly in database - Verify session cookie is present
Forgot Admin Password¶
Problem: Cannot remember admin password
Solution: 1. Stop the server 2. Run setup wizard reset: weather --maintenance setup 3. Create new admin account 4. Start the server
Settings Not Saving¶
Problem: Changes to settings don't persist
Solution: - Check file permissions on config directory - Verify database is writable - Check server logs for errors - Ensure maintenance mode is off
Next Steps¶
- Configuration - Manual configuration file editing
- CLI Reference - Command-line management
- API Reference - Programmatic access
- Development - Contributing to Weather Service