Skip to content

Deploying Roundcube

Introduction

Roundcube is a free, open-source webmail client with a desktop-like user interface. It provides a full-featured email experience in your browser, connecting to standard IMAP servers while offering a clean, intuitive interface that rivals commercial webmail services.

Key highlights of Roundcube:

  • Modern Interface: Desktop-like UI with drag-and-drop functionality
  • IMAP/SMTP Support: Works with any standard email server
  • Rich Text Editor: Full HTML email composition
  • Address Book: Integrated contacts with import/export
  • Search: Full-text search across messages
  • Folder Management: Create, rename, and organize folders
  • Multiple Identities: Support for multiple sender identities
  • Plugins: Extensive plugin architecture for customization
  • Skins: Multiple themes and customizable appearance
  • Mobile Responsive: Works on tablets and phones
  • Multi-Language: Available in 80+ languages
  • Open Source: GPL-3.0 licensed with active development

This guide walks through deploying Roundcube on Klutch.sh using Docker and connecting it to your mail server.

Why Deploy Roundcube on Klutch.sh

Deploying Roundcube on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically builds and deploys Roundcube without complex web server configuration.

Persistent Storage: Attach persistent volumes for user preferences and temporary files that survive container restarts.

HTTPS by Default: Klutch.sh provides automatic SSL for secure email access.

Always-On Availability: Your webmail remains accessible 24/7 from anywhere.

Environment Variable Management: Securely store configuration through Klutch.sh.

Prerequisites

Before deploying Roundcube on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your Roundcube configuration
  • An IMAP email server to connect to
  • An SMTP server for sending email
  • (Optional) An external database for multi-user deployments
  • Basic familiarity with Docker

Preparing Your Repository

Create a GitHub repository containing your Dockerfile for Roundcube deployment.

Repository Structure

roundcube-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM roundcube/roundcubemail:latest
# Set environment variables
ENV ROUNDCUBEMAIL_DEFAULT_HOST=${IMAP_HOST}
ENV ROUNDCUBEMAIL_DEFAULT_PORT=${IMAP_PORT:-993}
ENV ROUNDCUBEMAIL_SMTP_SERVER=${SMTP_HOST}
ENV ROUNDCUBEMAIL_SMTP_PORT=${SMTP_PORT:-587}
ENV ROUNDCUBEMAIL_DB_TYPE=${DB_TYPE:-sqlite}
ENV ROUNDCUBEMAIL_DB_HOST=${DB_HOST}
ENV ROUNDCUBEMAIL_DB_NAME=${DB_NAME:-roundcube}
ENV ROUNDCUBEMAIL_DB_USER=${DB_USER}
ENV ROUNDCUBEMAIL_DB_PASSWORD=${DB_PASSWORD}
# Expose the web interface port
EXPOSE 80
# The base image includes the default entrypoint

Environment Variables Reference

VariableRequiredDescription
IMAP_HOSTYesIMAP server hostname (e.g., ssl://mail.example.com)
IMAP_PORTNoIMAP port (default: 993 for SSL)
SMTP_HOSTYesSMTP server hostname (e.g., tls://mail.example.com)
SMTP_PORTNoSMTP port (default: 587)
DB_TYPENoDatabase type: sqlite, mysql, or pgsql (default: sqlite)
DB_HOSTNoDatabase host (for MySQL/PostgreSQL)
DB_NAMENoDatabase name (default: roundcube)
DB_USERNoDatabase username
DB_PASSWORDNoDatabase password

Deploying Roundcube on Klutch.sh

    Push Your Repository to GitHub

    Commit and push your Dockerfile to GitHub.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “roundcube” or “webmail”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select the repository containing your Roundcube Dockerfile.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 80

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    IMAP_HOSTssl://mail.example.com
    SMTP_HOSTtls://mail.example.com

    For external database (recommended for production):

    VariableValue
    DB_TYPEmysql or pgsql
    DB_HOSTYour database host
    DB_USERYour database user
    DB_PASSWORDYour database password

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /var/www/html/db1 GBSQLite database (if using sqlite)
    /var/www/html/temp1 GBTemporary files and attachments
    /var/www/html/logs1 GBApplication logs

    Deploy Your Application

    Click Deploy to start the build process.

    Access Roundcube

    Once deployment completes, access Roundcube at your app URL and log in with your email credentials.

Configuration

Connecting to Your Mail Server

Roundcube connects to your existing IMAP/SMTP server:

  1. Users log in with their email credentials
  2. Roundcube authenticates against the IMAP server
  3. Emails are accessed directly from the mail server

Configuring Plugins

  1. Edit the Dockerfile to enable plugins:
    ENV ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,managesieve
  2. Common plugins:
    • archive: Archive messages
    • zipdownload: Download multiple messages as ZIP
    • managesieve: Manage server-side mail filters

Customizing Appearance

  1. Set the default skin:
    ENV ROUNDCUBEMAIL_SKIN=elastic
  2. Available skins: elastic (default), larry, classic

Security Considerations

  • Always use SSL/TLS for IMAP and SMTP connections
  • Configure proper session timeouts
  • Use a proper database instead of SQLite for production
  • Regularly update Roundcube for security patches

Additional Resources

Conclusion

Deploying Roundcube on Klutch.sh gives you a modern, feature-rich webmail client with automatic builds, persistent storage, and secure HTTPS access. Whether for personal use or organization-wide email access, Roundcube on Klutch.sh provides a reliable webmail solution that works with any standard email server.