2.8 KiB
2.8 KiB
Docker Quick Start Guide
Prerequisites
- Docker installed on your system
- Docker Compose installed (usually comes with Docker Desktop)
Quick Start
1. Start the application
docker-compose up -d
This will:
- Build the Docker image (first time only)
- Start the container in detached mode
- Create the
datadirectory for the database - Expose port 5172
2. Access the application
Open your browser and navigate to:
- Local:
http://localhost:5172 - Network:
http://YOUR_SERVER_IP:5172
3. Login
Default credentials:
- Password:
admin123
Important: Change this password immediately after first login!
4. Configure Mailcow
- Click "Configuration"
- Enter your Mailcow server (without https://)
- Enter your Mailcow API key
- Click "Save Mailcow Config"
- Click "Change Password" and set a secure password
5. Sync aliases
Click "Sync Aliases" to import your existing aliases from Mailcow.
Common Commands
View logs
docker-compose logs -f
Stop the application
docker-compose down
Restart the application
docker-compose restart
Update after code changes
docker-compose up -d --build
Remove everything (including data)
docker-compose down -v
rm -rf data/
Data Persistence
The ./data directory is mounted as a volume, containing:
malias2.db- Your aliases database and configurationmalias2.log- Application logs
This directory persists across container restarts and updates.
Troubleshooting
Container won't start
Check logs:
docker-compose logs mailcow-alias-manager
Port already in use
Edit docker-compose.yml and change the port mapping:
ports:
- "8080:5172" # Change 8080 to any available port
Can't connect to Mailcow server
Make sure your Mailcow server is accessible from the Docker container. If Mailcow is running on localhost, you may need to use host.docker.internal instead.
Reset to defaults
docker-compose down
rm -rf data/
docker-compose up -d
Updating
To update to a new version:
- Pull the latest code:
git pull
- Rebuild and restart:
docker-compose up -d --build
Your data in the ./data directory will be preserved.
Security Notes
- Change the default password immediately
- The application is designed for internal networks
- For external access, use a reverse proxy with HTTPS (nginx, Traefik, etc.)
- Consider using Docker secrets for sensitive data in production
Network Access
To access from other devices on your network:
- Find your server's IP address
- Access via
http://YOUR_IP:5172 - Make sure your firewall allows connections on port 5172
License
This project is licensed under the MIT License - see the LICENSE file for details.