CloudLinux.ro
Email

How to install webmail with Roundcube

Updated 7/20/2026

Roundcube gives you a web interface for email, so you do not depend on a desktop client. It connects to your mail server over IMAP.

Requirements

A web stack with PHP (see LEMP stack), a database and a working mail server (IMAP).

1. Install Roundcube

apt-get update -y
apt-get install -y roundcube roundcube-mysql

2. Configure the IMAP connection

In /etc/roundcube/config.inc.php:

$config['imap_host'] = 'ssl://mail.example.com:993';
$config['smtp_host'] = 'tls://mail.example.com:587';

3. Serve it through Nginx

Add a server block for webmail.example.com pointing to the Roundcube directory, see hosting multiple sites.

4. Secure it

Note: if you use Mailcow, it already includes webmail, so you do not need a separate install.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials