Access Roundcube
- Open the following URL in your browser:
https://<SERVER_IP> - The installation uses a self-signed TLS certificate, so your browser will display a security warning. Accept the certificate to continue.
- HTTP requests on port 80 are automatically redirected to HTTPS.
Login
- Roundcube does not create or store mailbox accounts.
- Log in using the username and password of an existing mailbox on your configured IMAP server.
Configure Your Mail Server
The mail server connection settings are stored in: /root/roundcube/.env
Important settings:
- IMAP Host:
IMAP_HOST - IMAP Port:
IMAP_PORT - SMTP Host:
SMTP_HOST - SMTP Port:
SMTP_PORT - Username Domain:
USERNAME_DOMAIN
The default configuration uses placeholder values:
IMAP_HOST=ssl://mail.example.org
IMAP_PORT=993
SMTP_HOST=tls://mail.example.org
SMTP_PORT=587
Update them with your actual mail server hostname.
After changing the settings, apply them with:
cd /root/roundcube && docker compose up -d
TLS Connection Types
Use the appropriate prefix for your mail server:
ssl://: Implicit TLS, typically used with IMAP port993or SMTP port465.tls://: STARTTLS, typically used with IMAP port143or SMTP port587.
Self-Signed Mail Server Certificates
If your IMAP or SMTP server uses a self-signed certificate, Roundcube may reject the connection.
The optional TLS verification settings are located in: /root/roundcube/config/custom.inc.php
Uncomment and configure the relevant IMAP or SMTP connection options only when you trust the mail server and network.
Apply the configuration:
cd /root/roundcube && docker compose restart roundcube
Plugins & Skin
The default installation enables:
archivezipdownload
Plugins are configured through the PLUGINS variable in: /root/roundcube/.env
For example:
PLUGINS=archive,zipdownload,managesieve
Apply the changes:
cd /root/roundcube && docker compose up -d
Bundled plugins such as managesieve, markasjunk, and enigma can be enabled by adding them to PLUGINS, when supported by the image.
For third-party plugins, add them to ROUNDCUBEMAIL_COMPOSER_PLUGINS in the Compose file and include their names in PLUGINS.
Manage Roundcube
View container status:
cd /root/roundcube && docker compose ps
View logs:
cd /root/roundcube && docker compose logs -f
Restart Roundcube:
cd /root/roundcube && docker compose restart roundcube
Stop the stack:
cd /root/roundcube && docker compose down
Start the stack:
cd /root/roundcube && docker compose up -d
Important Files & Directories
- Install Path:
/root/roundcube - Compose File:
/root/roundcube/docker-compose.yml - Environment File:
/root/roundcube/.env - Extra Configuration:
/root/roundcube/config/custom.inc.php - Database Volume:
/var/lib/docker/volumes/roundcube_db_data - Nginx Configuration:
/etc/nginx/sites-available/roundcube - TLS Certificate:
/etc/nginx/ssl/roundcube.crt - TLS Private Key:
/etc/nginx/ssl/roundcube.key
Domain & HTTPS
1. Point your domain to the server's IP address (e.g., yourdomain.com;).
2. Install Certbot:
apt update
apt install -y certbot python3-certbot-nginx
3. Edit NGINX config and replace both server_name _; entries with your domain (e.g., server_name yourdomain.com;):
vim /etc/nginx/sites-available/roundcube
4. Issue a TLS certificate:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Edit /etc/nginx/sites-available/roundcube and update the ssl_certificate and ssl_certificate_key directives to use your Let's Encrypt certificate.
Before:
ssl_certificate /etc/nginx/ssl/roundcube.crt;
ssl_certificate_key /etc/nginx/ssl/roundcube.key;
After:
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. Test the config:
nginx -t
7. Reload NGINX:
systemctl reload nginx
8. Open your browser and visit: https://yourdomain.com
Notes
- Roundcube is publicly accessible through Nginx on ports
80and443. - The Roundcube container itself listens only on
127.0.0.1:8000. - MariaDB is an internal Docker service and is not directly exposed to the host.
- The default web interface uses a self-signed TLS certificate.
- The upload limit is set to
25 MB; increase bothUPLOAD_MAX_FILESIZEand Nginx'sclient_max_body_sizefor larger uploads. - Change the Roundcube configuration based on your preferences.