No description
install-mailcow-debian.sh | ||
install-mailcow-ubuntu.sh | ||
README.md |
Mailcow runs properly through dockeruser:
This script combines all the requested components and adds several security enhancements. Here's what the script does:
- Installs Docker with official GPG keys
- Creates a separate user for Docker operations
- Sets up UFW firewall with all necessary ports for Mailcow
- Installs and configures fail2ban with SSH honeypot
- Clones and sets up Mailcow
- Implements proper logging and error handling
To use this script:
- Download script for the hhf git repo:
wget https://git.hhf.technology/hhf/docker-mailcow/raw/branch/main/install-mailcow-debian.sh
wget https://git.hhf.technology/hhf/docker-mailcow/raw/branch/main/install-mailcow-ubuntu.sh
- Make it executable:
chmod +x install-mailcow-debian.sh
chmod +x install-mailcow-ubuntu.sh
- Run it as root:
sudo ./install-mailcow-debian.sh
sudo ./install-mailcow-ubuntu.sh
Important notes:
- The script must be run as root
- It's designed for Debian-based systems
- Make sure to review the UFW rules and adjust if needed
- After installation, you'll need to configure your DNS records and SSL certificates
- The script creates a separate user 'dockeruser' for Docker operations
- Added proper sudo permissions for dockeruser specifically for Docker commands
- Set correct ownership of the Mailcow directory to dockeruser
- All Docker operations are now performed as dockeruser using
su - dockeruser
- Added proper directory permissions and ownership
- Docker commands are now executed in the correct user context
To use the installation:
- After installation, you can manage Mailcow as dockeruser:
su - dockeruser
cd /opt/mailcow-dockerized
docker compose ps # Check status
docker compose down # Stop services
docker compose up -d # Start services
-
The dockeruser can manage all Docker-related tasks without needing sudo for docker commands.
-
Configuration files will be properly owned by dockeruser, allowing for easier maintenance and updates.
This setup ensures better security by:
- Running Mailcow with minimal required permissions
- Keeping Docker operations separate from root
- Maintaining proper file ownership
- Allowing for easier maintenance and updates
How to bind IPv4 and IPv6 together?
https://github.com/mailcow/mailcow-dockerized/issues/1978#issuecomment-474780861