Offshore 1
$3.09/ month
3 mo $8.346 mo $14.8312 mo $25.95
- 1 vCPU
- 1 GB RAM
- 20 GB NVMe
- 2 TB traffic
Guide · Roundcube 1.7 on Debian and Ubuntu
A webmail VPS lets you read mail in a browser, served by the server that already runs your mail and paid for in crypto only, with no card on file. This guide covers which webmail is still maintained in November 2026, which install route keeps you patched, and the exact settings for IMAP on 993, submission on 587 and HTTPS.
Webmail on a VPS, in short
Webmail on a VPS is a PHP application placed in front of the mail server you already run. For the Postfix and Dovecot server from our tutorial, install Roundcube 1.7.6 (released 9 November 2026) from the official tarball on Debian 12, Debian 13 or Ubuntu 24.04, with Apache, PHP and a SQLite file instead of a database server. Point it at ssl://mail.example.com:993 to read mail and tls://mail.example.com:587 to send, serve it over HTTPS with your existing Let's Encrypt certificate, delete the installer directory, and expect about one security update a month. Start on a 2 GB plan such as Offshore 2 ($4.89 a month).
Your mail server already does the hard part. Postfix receives mail on port 25 and takes your outgoing mail on 587; Dovecot serves the mailboxes over IMAP on 993. Webmail adds a fourth path: browser → HTTPS on port 443 → Apache and PHP running Roundcube → Dovecot on 993 to read, Postfix on 587 to send.
Roundcube is an IMAP client that runs on the server. Messages stay in each user's ~/Maildir; its own database holds users, identities, contacts, settings, sessions and caches, the tables its SQLite schema creates. Lose that database and you lose address books and preferences, not mail.
What you take on is a web server, PHP and a login page that anyone on the internet can reach. That is why this guide gives as much room to the installer, HTTPS, login limits and updates as to the install itself.
The guide builds on the server from the Postfix and Dovecot tutorial: mail host mail.example.com, a certificate in /etc/letsencrypt/live/mail.example.com/, system users such as alice, and ufw with ports 22, 25, 80, 587 and 993 open. Run every command as root. If you are still choosing the server, read which VPS for a mail server first.
Three clients come up in every webmail VPS tutorial. The table shows their state on 18 November 2026, read on each project's own site, repository or package archive.
| Client | Latest release | Maintenance in 2026 | Needs | Debian and Ubuntu packages |
|---|---|---|---|---|
| Roundcube | 1.7.6, 9 November 2026; 1.6.21 on the long-term 1.6 branch | 1.7.0 on 10 May, then six security updates, 1.7.1 to 1.7.6; 1.5 no longer supported | PHP 8.1 or later; MySQL, PostgreSQL or SQLite 3 | Debian 13: 1.6.21. Debian 12: 1.6.5, patched. Ubuntu 24.04: 1.6.6 (universe) |
| SnappyMail | 3.1.3, 18 November 2026 | No release from October 2024 to October 2026; work resumed in November 2026 | PHP 7.4 or later per its install wiki; database optional | Not packaged by Debian |
| SquirrelMail | 1.4.22, the last numbered stable release | Its download page offers 1.4.23-svn snapshots instead of a new release | — | In no Debian suite |
Each system offers Roundcube in its archive, but the version you get, and who ships its security fixes, depend on the system (table below).
This guide uses the official tarball, Roundcube 1.7.6, on all three systems, for three reasons. The commands are the same on Debian 12, Debian 13 and Ubuntu 24.04. Ubuntu's package is behind. And Roundcube's announcement of 9 November says 1.6 "will be discontinued rather soon" and asks users to plan the move to 1.7. The cost: you install updates yourself, about once a month in 2026 (update routine).
Prefer apt on Debian? apt install roundcube roundcube-sqlite3 installs Debian's package, and unattended-upgrades then applies its security fixes: Debian 13 received 1.6.21 eight days after Roundcube released it. Debian's README tells you to point a virtual host at /var/lib/roundcube/public_html. The settings below then go in /etc/roundcube/config.inc.php, which the package creates with a random des_key, and its installer stays in /usr/share/roundcube, outside the web root. Once Roundcube ends 1.6, fixes depend on Debian backporting them, as it already does for Debian 12's 1.6.5.
| Source | Version | Who ships security fixes | Verdict |
|---|---|---|---|
| Official tarball (all three systems) | 1.7.6, 9 November 2026 | Roundcube; you install each release with its update script | This guide |
| Debian 13 package | 1.6.21 in trixie-security, 17 November 2026 | Debian's security team, following each 1.6 release | Good alternative |
| Debian 12 package | 1.6.5 with fixes backported (deb12u13, 16 November 2026) | Debian, which patched it four times from July to November 2026 | Works |
| Ubuntu 24.04 package | 1.6.6 in universe | The ten newest Roundcube CVEs on Ubuntu's tracker were marked Needs evaluation for 24.04 | Avoid |
Roundcube publishes no total memory figure. Its installation wiki suggests a PHP memory_limit of 64M, and PHP's production php.ini sets 128M; both apply to each PHP process. The total depends on how many processes run at once. On Debian, libapache2-mod-php switches Apache to the prefork model, one process per connection, and Debian's mpm_prefork.conf allows up to 150 of them (MaxRequestWorkers): far more than a few users need, and more than a small plan can hold.
RAM and NVMe space are reserved for your VPS; the vCPU are shared cores. After a week of normal use, measure instead of guessing. free -h shows what is left, and the ps line below prints the number and average size of the Apache processes. Set MaxRequestWorkers to the memory you can spare divided by that size: 600 MB to spare at 40 MB a process gives 15.
free -h
ps -C apache2 -o rss= | awk '{n++; s+=$1} END {printf "%d processes, %.0f MB each\n", n, s/n/1024}'
grep MaxRequestWorkers /etc/apache2/mods-available/mpm_prefork.conf
sed -i 's/^MaxRequestWorkers.*/MaxRequestWorkers 15/' /etc/apache2/mods-available/mpm_prefork.conf
apache2ctl configtest && systemctl restart apache2These steps follow Roundcube's INSTALL.md and installation wiki for 1.7.6 and are the same on Debian 12, Debian 13 and Ubuntu 24.04. Roundcube 1.7 needs PHP 8.1 or later; the archives ship PHP 8.2 (Debian 12), 8.4 (Debian 13) and 8.3 (Ubuntu 24.04). Replace mail.example.com and example.com with your own names. The commands follow the six steps.
Install apache2, libapache2-mod-php and the PHP modules, then run php -m. It must list every module INSTALL.md marks as required: ctype, dom, filter, intl, json, mbstring, openssl, pcre, session and sockets, plus PDO and pdo_sqlite.
Take the complete package, which already contains the PHP and JavaScript dependencies, from the link on roundcube.net. Compare its SHA-256 with the checksum on the download page; the page also offers a PGP signature made with the Roundcube Developers key.
Unpack into /var/www/roundcube with --no-same-owner, as INSTALL.md suggests, and delete installer/ at once: this setup never uses it. Make temp and logs writable by www-data, and create a directory for the SQLite file outside the web root.
Create the configuration with the values explained in the next section and a random 24-character des_key. Keep the file readable by root and www-data only.
Add an Apache virtual host whose document root is public_html, using your existing certificate. Open port 443, and let Certbot free port 80 when it renews.
Open https://mail.example.com/ and log in as alice with her Linux password. Roundcube creates the SQLite file on this first request. Its errors go to logs/errors.log, and Dovecot logs each login.
apt update
apt install -y apache2 libapache2-mod-php php-intl php-mbstring php-xml php-sqlite3 php-zip php-gd wget rsync
php -mcd /tmp
wget https://github.com/roundcube/roundcubemail/releases/download/1.7.6/roundcubemail-1.7.6-complete.tar.gz
sha256sum roundcubemail-1.7.6-complete.tar.gz
# compare with the SHA-256 listed on roundcube.net/download
tar xfz roundcubemail-1.7.6-complete.tar.gz --no-same-owner
mv roundcubemail-1.7.6 /var/www/roundcube
rm -rf /var/www/roundcube/installer
chown -R www-data:www-data /var/www/roundcube/temp /var/www/roundcube/logs
mkdir -p /var/lib/roundcube-sqlite
chown www-data:www-data /var/lib/roundcube-sqlite
chmod 750 /var/lib/roundcube-sqlitecat > /var/www/roundcube/config/config.inc.php <<'EOF'
<?php
$config = [];
$config['db_dsnw'] = 'sqlite:////var/lib/roundcube-sqlite/roundcube.db?mode=0640';
$config['imap_host'] = 'ssl://mail.example.com:993';
$config['smtp_host'] = 'tls://mail.example.com:587';
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['mail_domain'] = 'example.com';
$config['trusted_host_patterns'] = ['mail.example.com'];
$config['product_name'] = 'Webmail';
$config['des_key'] = 'REPLACE_ME';
$config['plugins'] = ['archive', 'zipdownload'];
$config['skin'] = 'elastic';
$config['enable_installer'] = false;
EOF
sed -i "s|REPLACE_ME|$(openssl rand -base64 18)|" /var/www/roundcube/config/config.inc.php
chown root:www-data /var/www/roundcube/config/config.inc.php
chmod 640 /var/www/roundcube/config/config.inc.phpcat > /etc/apache2/sites-available/webmail.conf <<'EOF'
<VirtualHost *:80>
ServerName mail.example.com
Redirect permanent / https://mail.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName mail.example.com
DocumentRoot /var/www/roundcube/public_html
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mail.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mail.example.com/privkey.pem
<Directory /var/www/roundcube/public_html>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
EOF
a2enmod ssl
a2dissite 000-default
a2ensite webmail
apache2ctl configtest
systemctl restart apache2ufw allow 443/tcp
mkdir -p /etc/letsencrypt/renewal-hooks/pre /etc/letsencrypt/renewal-hooks/post
printf '#!/bin/sh\nsystemctl stop apache2\n' > /etc/letsencrypt/renewal-hooks/pre/stop-apache.sh
printf '#!/bin/sh\nsystemctl start apache2\n' > /etc/letsencrypt/renewal-hooks/post/start-apache.sh
chmod +x /etc/letsencrypt/renewal-hooks/pre/stop-apache.sh /etc/letsencrypt/renewal-hooks/post/start-apache.sh
certbot renew --dry-runls -l /var/lib/roundcube-sqlite/
tail -n 20 /var/www/roundcube/logs/errors.log # appears with the first error
journalctl -u dovecot --since "15 minutes ago"The configuration from step 4 is short because the mail server already exists. Two choices matter most.
Use the host name on your certificate, not localhost. PHP verifies the server certificate by default, and Roundcube's INSTALL.md warns that a certificate with the wrong host name causes connection errors. Your Let's Encrypt certificate names mail.example.com, so that name passes. Turning verification off, as some tutorials do, removes the protection TLS gives each password on its way to Dovecot.
Log in with the mail account itself. With the tutorial's system users, alice types her Linux user name and password, the same as in a desktop client, and Roundcube passes them on to Postfix when she sends. If you added smtpd_sender_login_maps to Postfix, every identity a user creates in Roundcube must use an address that user may send from.
Each line, and why it has that value:
| Setting | Value here | Why |
|---|---|---|
imap_host | ssl://mail.example.com:993 | ssl:// means implicit TLS, and 993 is its default port: the IMAPS port your mail clients already use |
smtp_host | tls://mail.example.com:587 | tls:// means STARTTLS: the submission port, where Postfix requires TLS and a login |
smtp_user, smtp_pass | %u, %p | Postfix receives the user name and password typed at the Roundcube login |
mail_domain | example.com | Builds the address of new users: alice sends as [email protected] |
trusted_host_patterns | ['mail.example.com'] | An empty list accepts any Host header, which an attacker can forge to collect user names and passwords |
des_key | 24 random characters | Encrypts the IMAP password kept in the session; it must differ from the sample value |
db_dsnw | Path of the SQLite file | Roundcube creates the file and its tables on the first request, if www-data can write to the directory |
enable_installer | false | The default; the file's own warning says enabling it can expose sensitive config data |
Serve Roundcube on the mail host's own name, https://mail.example.com/. The certificate from the tutorial already covers it, so no DNS record changes and no new certificate is needed. Apache reads fullchain.pem as it is: its documentation says SSLCertificateFile may hold intermediate certificates from version 2.4.8, and Debian 12 and 13 ship 2.4.68. The port 80 virtual host only redirects to HTTPS. For 1.7 the document root must be public_html; the installation wiki notes that config, temp and logs are then out of the web's reach.
One conflict needs a fix. The tutorial issued the certificate with Certbot's standalone mode, which binds port 80 itself, and Apache now holds that port. Certbot's guide covers this case: stop the web server before renewal and start it again after. Executable files in /etc/letsencrypt/renewal-hooks/pre and /etc/letsencrypt/renewal-hooks/post run around each renewal, and the guide says hooks run only when a certificate is due. It also says a dry run still runs pre and post hooks, so the certbot renew --dry-run in step 5 tests the whole cycle. The tutorial's deploy hook keeps reloading Postfix and Dovecot; Apache loads the new certificate when the post hook starts it.
On Debian 13, whose Certbot is 4.0, certbot reconfigure can move the certificate to the webroot plugin instead. That command arrived in Certbot 2.3, and Debian 12 ships 2.1.
public_html/installer.php then answers 404, since its code checks for installer/index.php first. Keep enable_installer at false.www-data: it holds the des_key.login_rate_limit). fail2ban ships a roundcube-auth filter that reads failed logins from errors.log and bans the address; the block below turns it on.Mail clients on 993 and 587 face the same password guessing; the tutorial points to fail2ban for Postfix and Dovecot as well.
apt install -y fail2ban
touch /var/www/roundcube/logs/errors.log
chown www-data:www-data /var/www/roundcube/logs/errors.log
cat > /etc/fail2ban/jail.d/roundcube.local <<'EOF'
[roundcube-auth]
enabled = true
backend = auto
logpath = /var/www/roundcube/logs/errors.log
EOF
systemctl restart fail2ban
fail2ban-client status roundcube-authWebmail holds passwords and mail, and Roundcube has had serious flaws. CVE-2025-49113, a flaw that let a logged-in user run code on the server through PHP object deserialization, scored 9.9 out of 10, and Ubuntu's page for it notes that it is on CISA's list of known exploited vulnerabilities; 1.6.11 and 1.5.10 fixed it. In 2026 Roundcube has shipped a security update for 1.7 about once a month, from 1.7.1 on 24 May to 1.7.6 on 9 November. The 1.7.6 announcement lists fixes for SSRF, CSRF bypasses, and header and IMAP command injection, and recommends updating every production installation.
The routine comes from Roundcube's UPGRADING guide: back up the installation and the database, unpack the new release in a temporary folder, and run bin/installto.sh with your install path. It copies the new files, checks the configuration and updates the database schema. It copies installer/ only if the target still has one, so a deleted installer stays deleted.
Apache and PHP get their fixes from unattended-upgrades, installed in the mail tutorial. To hear about Roundcube releases, follow the news page on roundcube.net or the releases of its GitHub repository. INSTALL.md also recommends running bin/cleandb.sh daily to remove records marked as deleted.
No Nymhost plan includes backups. Add /var/www/roundcube/config and /var/lib/roundcube-sqlite to the mailbox backup routine from the tutorial.
V=NEW_VERSION # set to the version just announced on roundcube.net
tar -czf /root/roundcube-before-$V.tar.gz /var/www/roundcube/config /var/lib/roundcube-sqlite
cd /tmp
wget https://github.com/roundcube/roundcubemail/releases/download/$V/roundcubemail-$V-complete.tar.gz
sha256sum roundcubemail-$V-complete.tar.gz
tar xfz roundcubemail-$V-complete.tar.gz --no-same-owner
cd roundcubemail-$V
./bin/installto.sh /var/www/roundcube
# once: purge deleted records every night
echo '0 5 * * * www-data /var/www/roundcube/bin/cleandb.sh > /dev/null' > /etc/cron.d/roundcubeIf you have not built the mail server yet, or want spam filtering, antivirus and webmail from one project, a suite such as mailcow replaces the whole stack rather than adding to it. It runs its own Postfix, Dovecot, Rspamd, nginx and SOGo, its webmail, in Docker containers. Its documentation lists ports 25, 80, 443, 587, 993 and others as required, gives an ss -tlpn command to check them, and tells you to stop or remove whatever already listens there, or move mailcow to other ports. In practice it replaces the server from the tutorial instead of running beside it.
The price is memory: 6 GiB of RAM plus 1 GiB of swap, 20 GiB of disk before any mail, and full virtualization such as KVM, which every Nymhost VPS uses. That means Offshore 8 or Global 8, against a 2 GB plan for Postfix, Dovecot and Roundcube. The mail server VPS guide compares the two routes plan by plan.
Offshore 2 or Global 2 (2 GB) for the tutorial's server plus Roundcube; Offshore 8 or Global 8 for mailcow. Outbound port 25 is open on every plan, each Nymhost VPS is paid in crypto from a prepaid balance, and the pricing page lists every city and rental length.
Amsterdam · Reykjavik · Zurich · Bucharest
$3.09/ month
3 mo $8.346 mo $14.8312 mo $25.95
$4.89/ month
3 mo $13.206 mo $23.4712 mo $41.07
$8.19/ month
3 mo $22.116 mo $39.3112 mo $68.79
$13.49/ month
3 mo $36.426 mo $64.7512 mo $113.31
$20.49/ month
3 mo $55.326 mo $98.3512 mo $172.11
New York · Dallas · Los Angeles · London · Amsterdam · Frankfurt
$3.19/ month
3 mo $8.616 mo $15.3112 mo $26.79
$6.39/ month
3 mo $17.256 mo $30.6712 mo $53.67
$9.59/ month
3 mo $25.896 mo $46.0312 mo $80.55
$19.19/ month
3 mo $51.816 mo $92.1112 mo $161.19
$29.39/ month
3 mo $79.356 mo $141.0712 mo $246.87
Prices in US dollars, checked on 18 November 2026. Paid from a crypto balance (minimum top-up $25); 3, 6 and 12 months save 10, 20 and 30%. Every plan: KVM, root over SSH, 1 dedicated IPv4 + /64 IPv6, shared 1 Gbit/s port.
Roundcube, for most people in 2026. Version 1.7.6 came out on 9 November 2026, the project ships regular security releases and a long-term 1.6 branch, and Debian packages it. SnappyMail, which describes itself as lightweight, went two years without a release before November 2026. SquirrelMail's last numbered release is 1.4.22, and Debian no longer packages it.
No. Roundcube supports MySQL, PostgreSQL and SQLite 3. With SQLite, db_dsnw points to a file, and Roundcube creates the file and its tables on the first request, as long as the web server can write to the file and its directory. That saves running a database server next to your mail services on a small VPS.
Roundcube publishes no total. Its wiki suggests a PHP memory_limit of 64M per process, so the total depends on how many Apache processes run at once. For a few users next to Postfix and Dovecot, start on a 2 GB plan, measure with free -h after a week, and cap Apache's MaxRequestWorkers to what the memory holds.
Yes. Set imap_host to ssl://mail.example.com:993: the ssl:// prefix means implicit TLS, and 993 is its default port. Use the name on your certificate rather than localhost, because PHP verifies the certificate and a name mismatch breaks the connection.
Safe enough if you keep it patched. Roundcube is a common target: CVE-2025-49113 scored 9.9 and is on CISA's list of known exploited vulnerabilities. Serve it over HTTPS only, delete the installer, keep the default limit of 3 failed logins per minute, add fail2ban and install each security release. If only you use it, reach it through WireGuard.
On Ubuntu 24.04, the tarball: the archive's 1.6.6 package lags, and Ubuntu's tracker marks recent Roundcube CVEs as needing evaluation for 24.04. On Debian 12 and 13 both work. apt gives automatic security fixes from Debian on the 1.6 branch; the tarball gives 1.7, the branch Roundcube asks users to move to, with updates you install yourself.
Not as a managed service. Nymhost rents Linux KVM VPS with root access and outbound port 25 open, and you install the mail server and webmail yourself, with guides like this one. Support answers within 12 hours and helps with SSH keys, reinstalls and firewall rules. No plan includes backups, so copy the Roundcube config and database along with your mail.