Files
malias-web/DOCKER.md
2026-01-12 14:09:28 +01:00

2.7 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 data directory 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

  1. Click "Configuration"
  2. Enter your Mailcow server (without https://)
  3. Enter your Mailcow API key
  4. Click "Save Mailcow Config"
  5. 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 configuration
  • malias2.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:

  1. Pull the latest code:
git pull
  1. 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:

  1. Find your server's IP address
  2. Access via http://YOUR_IP:5172
  3. Make sure your firewall allows connections on port 5172