Deploying Roundcube Webmail Client with Docker: A Step-by-Step Guide
Elevate your email experience with Roundcube Webmail deployed effortlessly using Docker. Simplify your inbox management and enjoy a sleek, user-friendly interface.
If you don't have a self-managed mail server, you can refer to my previous post:
If you've set up a self-hosted mail server using docker-mailserver, you've taken a significant step towards controlling your email environment. Now, let's enhance the user experience by deploying Roundcube Webmail Client as the client side. This blog post will guide you through the process, complete with a sample docker-compose.yml
file and essential configuration/environment variables.
Sample docker-compose.yml
Configuration:
version: '3.8'
services:
roundcubemail:
image: roundcube/roundcubemail:latest
container_name: roundcubemail
restart: unless-stopped
volumes:
- ./www:/var/www/html
- ./db/sqlite:/var/roundcube/db
ports:
- 127.0.0.1:12345:80
environment:
- ROUNDCUBEMAIL_DB_TYPE=sqlite
- ROUNDCUBEMAIL_SKIN=elastic
- ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.example.com
- ROUNDCUBEMAIL_DEFAULT_PORT=993
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.com
- ROUNDCUBEMAIL_SMTP_PORT=587
# Add other necessary environment variables
Configuration/Environment Variables:
- ROUNDCUBEMAIL_DEFAULT_HOST: Hostname of the IMAP server.
- ROUNDCUBEMAIL_DEFAULT_PORT: IMAP port number (default: 143).
- ROUNDCUBEMAIL_SMTP_SERVER: Hostname of the SMTP server.
- ROUNDCUBEMAIL_SMTP_PORT: SMTP port number (default: 587).
- ROUNDCUBEMAIL_SKIN: Configures the default theme (default: larry).
- ROUNDCUBEMAIL_DB_TYPE: Database provider (options: mysql, pgsql, sqlite).
Connecting to a Database:
To run Roundcube with a MySQL database, set the necessary environment variables. For example:
docker run --link=mysql:mysql -d roundcube/roundcubemail
Persistent Data:
Ensure data persistence by mounting the following directories:
/var/www/html
: Roundcube installation directory./var/roundcube/config
: Additional config files./var/roundcube/db
: Storage location of the SQLite database.
By following this guide, you'll have a fully functional Roundcube Webmail Client seamlessly integrated with your self-hosted mail server. Happy emailing!
Copyright statement: Unless otherwise stated, all articles on this blog adopt the CC BY-NC-SA 4.0 license agreement. For non-commercial reprints and citations, please indicate the author: Henry, and original article URL. For commercial reprints, please contact the author for authorization.