Security & Password Management Guide
Overview
EAS Station uses a single source of truth for all passwords and credentials: the persistent .env file located at /app-config/.env inside the containers.
Architecture
Single Source of Truth: /app-config/.env
Both the application and Icecast containers read from this shared configuration file:
┌─────────────────────┐
│ Persistent Volume │
│ /app-config │
│ │
│ ┌─────────────┐ │
│ │ .env │◄──┼──── Single source of truth
│ └─────────────┘ │
└─────────────────────┘
▲ ▲
│ │
┌─────┘ └─────┐
│ │
┌───▼─────┐ ┌────▼────┐
│ App │ │ Icecast │
│Container│ │Container│
└─────────┘ └─────────┘
How It Works
- Initial Deployment: Docker-compose provides default passwords via environment variables
- First Run: These defaults are written to
/app-config/.envby the app - Subsequent Runs: Both containers read from
/app-config/.env(overriding docker-compose defaults) - Password Changes: Made via the web UI, automatically sync to both containers on next restart
Changing Passwords Securely
Method 1: Web UI (Recommended)
- Log in to your EAS Station web interface
- Navigate to Settings → Environment Variables
- Find the password you want to change:
ICECASTADMINPASSWORD- Admin access to IcecastICECASTSOURCEPASSWORD- Stream publishing passwordSECRET_KEY- Flask session encryption keyPOSTGRES_PASSWORD- Database password (if using embedded DB)
- Enter new password (see password requirements below)
- Click Save
- Restart containers in Portainer:
- Go to your stack
- Click "Stop"
- Click "Start"
The Icecast container will now load the new password from /app-config/.env on startup.
Method 2: Direct File Edit (Advanced)
If you need to edit the file directly:
Access the app container
docker exec -it <container-name> shEdit the persistent .env file
vi /app-config/.envFind and update passwords
ICECASTADMINPASSWORD=yournewsecure_password
ICECASTSOURCEPASSWORD=anothersecurepasswordSave and exit
Then restart both containers from Portainer
Password Requirements
CRITICAL: Icecast Passwords MUST Be ASCII-Only
Icecast only supports ASCII characters in passwords. Do NOT use:- ❌ Emoji (🔒, ✓, etc.)
- ❌ Unicode bullets (••)
- ❌ Non-Latin characters (中文, العربية, etc.)
- ❌ Smart quotes ("" instead of "")
- ✅ Letters:
a-z,A-Z - ✅ Numbers:
0-9 - ✅ Symbols:
!@#$%^&*()-_=+[]{}|;:,.<>?/~
Recommended Password Strength
For production deployments:
- Minimum 16 characters
- Mix of uppercase, lowercase, numbers, and symbols
- Unique for each service (don't reuse passwords)
- Not dictionary words
Example strong passwords:
ICECASTADMINPASSWORD=X9$mK2#pR5!qL7@nW3
ICECASTSOURCEPASSWORD=P4!vT8#zQ2$dN6&jM9
SECRET_KEY=a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456
Default Passwords (CHANGE THESE!)
The system ships with these defaults - change them immediately after deployment:
| Variable | Default Value | Purpose |
|---|---|---|
ICECASTADMINPASSWORD |
changeme_admin |
Icecast admin interface |
ICECASTSOURCEPASSWORD |
easstationsource_password |
Audio stream publishing |
SECRET_KEY |
(empty) | Flask session encryption |
POSTGRES_PASSWORD |
postgres |
Database access |
Security Best Practices
1. Change All Default Passwords Immediately
After first deployment:
- Go to Settings → Environment Variables
- Change ALL default passwords
- Restart containers
2. Use Strong, Unique Passwords
- Generate passwords using a password manager
- Never reuse passwords between services
- Use maximum length passwords where possible
3. Restrict Admin Access
- Set
ICECASTADMINUSERandICECASTADMINPASSWORDonly if you need metadata updates - If you don't need live metadata updates, leave these unset to disable admin API access
4. Backup Your Configuration
The /app-config volume contains all your passwords. Back it up securely:
Create encrypted backup
docker run --rm -v eas-station_app-config:/data \
-v $(pwd):/backup alpine tar czf /backup/app-config-backup.tar.gz /dataEncrypt the backup
gpg --symmetric --cipher-algo AES256 app-config-backup.tar.gz
5. Regular Password Rotation
For production systems, rotate passwords periodically:
- Critical systems: Every 90 days
- Normal systems: Every 180 days
- After any security incident: Immediately
Troubleshooting
"401 Unauthorized" Errors
If you see continuous 401 errors in logs:
- Check password format: Is it ASCII-only? No Unicode characters?
- Verify sync: Did you restart containers after changing the password?
- Check logs: Look for "Loading Icecast configuration from persistent .env file" in Icecast container logs
- Verify file: Check
/app-config/.envcontains the correct password
Containers Using Different Passwords
This should not happen with the new architecture, but if it does:
- Stop all containers
- Delete the old
.envfile:
docker run --rm -v eas-station_app-config:/data alpine rm /data/.env
- Restart stack - it will regenerate with defaults
- Change passwords via web UI
- Restart again to sync
Password Contains Unicode
If you accidentally set a Unicode password:
ERROR: 'latin-1' codec can't encode characters
Solution:
- Go to Settings → Environment Variables
- Change to ASCII-only password
- Restart containers
Migration from Old Setup
If you're upgrading from a version that didn't use shared config:
Before Upgrade
- Note your current Icecast password from Portainer environment variables
- Note your current app password from Settings → Environment
After Upgrade
- Deploy new version
- Go to Settings → Environment Variables
- Verify both passwords match
- If they don't match, change to a new ASCII password
- Restart containers
Security Incident Response
If you suspect a password has been compromised:
- Immediately change the password via Settings → Environment Variables
- Restart all containers
- Review access logs in
/var/log/icecast2/(access.log) - Check for unauthorized stream connections
- Rotate all other passwords as a precaution
Questions?
- Security issues: Report privately to project maintainers
- General questions: Open a GitHub discussion
- Documentation improvements: Submit a pull request
Remember: Security is a process, not a one-time setup. Regularly review and update your passwords, especially for internet-facing deployments.
This document is served from docs/security/SECURITY_PASSWORD_GUIDE.md in the EAS Station installation.