The Best Price for IPv4/IPv6 Lease – Any RIR & Any Geo-LocationOrder Now
Hostperl

Configure Roundcube Plugins on Ubuntu VPS: Essential Extensions

By Raman Kumar

Share:

Updated on Jun 5, 2026

Configure Roundcube Plugins on Ubuntu VPS: Essential Extensions

Essential Roundcube Plugins for Professional Email Management

Roundcube webmail gives you a dependable base, but plugins are what make it feel complete. With the right extensions, you can add calendars, better spam controls, two-factor login, and shared contacts that hold up in day-to-day business use.

This guide shows you how to install and configure the most useful Roundcube plugins on your Ubuntu VPS. You’ll add practical features users notice immediately, while keeping security and stability front and center.

The recommendations here focus on workflow improvements that don’t drag down performance. Each section includes settings that make sense for VPS hosting environments, where CPU, RAM, and disk all have limits.

Installing the Roundcube Plugin Manager

Use Composer for dependency management in your Roundcube install. It keeps plugin installs and updates predictable.

Move into your Roundcube directory and install Composer:

cd /var/www/html/roundcube
sudo apt update
sudo apt install composer -y

Confirm whether Composer is already set up:

ls -la composer.json

If composer.json exists, you can start installing plugins. If it doesn’t, initialize Composer in the Roundcube directory:

sudo composer init --no-interaction

Set correct ownership and permissions on the plugin directory:

sudo chown -R www-data:www-data plugins/
sudo chmod -R 755 plugins/

Calendar Plugin Configuration

The calendar plugin adds scheduling to Roundcube without moving users to a separate app. Install it with Composer:

sudo composer require kolab/calendar

Enable the plugin in the main Roundcube config:

sudo nano config/config.inc.php

Add 'calendar' to the plugins array:

$config['plugins'] = array('calendar', 'archive', 'zipdownload');

Create the required database schema:

sudo mysql -u roundcube_user -p roundcube_db < plugins/calendar/drivers/database/SQL/mysql.initial.sql

Put calendar settings in a local plugin config:

sudo nano plugins/calendar/config.inc.php

Add these baseline settings:

$config['calendar_driver'] = 'database';
$config['calendar_default_view'] = 'agendaWeek';
$config['calendar_timeslots'] = 4;
$config['calendar_work_start'] = 8;
$config['calendar_work_end'] = 18;

Advanced Contact Management Setup

The CardDAV plugin gives you a central address book that syncs across devices. Install the plugin:

sudo composer require roundcube/carddav

Open the plugin config:

sudo nano plugins/carddav/config.inc.php

Enable automatic discovery and set a consistent address book name:

$prefs['_GLOBAL']['hide_preferences'] = false;
$prefs['_GLOBAL']['fixed'] = array(
    'discovery_service' => true,
    'addressbook_name' => '%u Contacts'
);

Once configured, users work from the same contact list in Roundcube, on their phone, and in desktop clients that support CardDAV.

If you also want tighter webmail-to-mailbox integration, see the complete IMAP integration guide.

Two-Factor Authentication Plugin

Email accounts are high-value targets, so add 2FA early. Install the plugin:

sudo composer require alexandregz/twofactor_gauthenticator

Enable it in your plugin list:

$config['plugins'] = array('calendar', 'carddav', 'twofactor_gauthenticator');

Edit the plugin configuration:

sudo nano plugins/twofactor_gauthenticator/config.inc.php

Use these settings as a starting point:

$config['twofactor_gauthenticator']['force'] = false;
$config['twofactor_gauthenticator']['issuer'] = 'Your Company Mail';
$config['twofactor_gauthenticator']['digits'] = 6;
$config['twofactor_gauthenticator']['period'] = 30;

Users can secure logins with Google Authenticator or any TOTP app. The plugin works with your existing authentication and doesn’t require LDAP or third-party services.

Configure Roundcube Plugins on Ubuntu VPS for Spam Filtering

For user-level spam controls, add the SpamAssassin integration plugin:

sudo composer require johndoh/sauserprefs

This plugin assumes SpamAssassin is already running on the mail server. If it isn’t, install and enable it:

sudo apt install spamassassin spamc -y
sudo systemctl enable spamassassin
sudo systemctl start spamassassin

Now configure the plugin:

sudo nano plugins/sauserprefs/config.inc.php

Set the database DSN and enable the training buttons:

$config['sauserprefs_db_dsnw'] = 'mysql://roundcube_user:password@localhost/roundcube_db';
$config['sauserprefs_sql_username'] = '%u';
$config['sauserprefs_ham_buttons'] = true;

This gives users control without shell access. They can tune spam sensitivity, whitelist senders, and train filters directly from the web UI.

File Management and Attachment Handling

The filesystem_attachments plugin improves attachment handling for users who send and receive a lot of files. Install it:

sudo composer require roundcube/filesystem_attachments

Open the plugin config:

sudo nano plugins/filesystem_attachments/config.inc.php

Define storage and sensible limits:

$config['filesystem_attachments_dir'] = '/var/lib/roundcube/attachments/';
$config['max_message_size'] = '25MB';
$config['temp_dir_ttl'] = '48h';

Create the directory and lock down permissions:

sudo mkdir -p /var/lib/roundcube/attachments
sudo chown www-data:www-data /var/lib/roundcube/attachments
sudo chmod 700 /var/lib/roundcube/attachments

With TTL cleanup in place, old temporary files drop off automatically. That helps prevent slow, silent disk growth on a VPS.

Performance Optimization for Plugin-Heavy Installs

As you add plugins, Roundcube will use more memory and CPU per request. A few small PHP tweaks usually prevent sluggish page loads.

Increase PHP limits in your Apache PHP config:

sudo nano /etc/php/8.1/apache2/php.ini

Update these values:

memory_limit = 256M
max_execution_time = 120
post_max_size = 50M
upload_max_filesize = 25M

Enable OPcache to reduce PHP compilation overhead:

opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000

Restart Apache to apply changes:

sudo systemctl restart apache2

If something feels slow after adding a plugin, use Roundcube debug logging to pinpoint it. Enable debugging temporarily:

$config['debug_level'] = 4;
$config['log_driver'] = 'file';

For broader tuning across the full mail stack, use the complete Postfix and Dovecot guide.

Plugin Database Management

Some plugins create tables and store extra data over time. A small maintenance script keeps those tables and files from growing unchecked.

sudo nano /usr/local/bin/roundcube-plugin-maintenance.sh

Add the script below:

#!/bin/bash

# Roundcube Plugin Database Maintenance
DB_USER="roundcube_user"
DB_PASS="your_password"
DB_NAME="roundcube_db"

# Clean old calendar events
mysql -u $DB_USER -p$DB_PASS $DB_NAME -e "DELETE FROM calendar_events WHERE end < DATE_SUB(NOW(), INTERVAL 1 YEAR);"

# Clean temporary attachments
find /var/lib/roundcube/attachments -type f -mtime +2 -delete

# Optimize database tables
mysql -u $DB_USER -p$DB_PASS $DB_NAME -e "OPTIMIZE TABLE calendar_events, carddav_addressbooks, cache;"

echo "Plugin maintenance completed: $(date)"

Make it executable, then schedule it in cron:

sudo chmod +x /usr/local/bin/roundcube-plugin-maintenance.sh
sudo crontab -e

Add a weekly run:

0 2 * * 0 /usr/local/bin/roundcube-plugin-maintenance.sh >> /var/log/roundcube-maintenance.log

This kind of housekeeping matters on a VPS. It keeps storage use predictable and avoids unnecessary database bloat.

Troubleshooting Common Plugin Issues

Plugin issues usually come from JavaScript conflicts, theme quirks, or version mismatches. Start with logs, not guesswork.

Check the web server error log:

sudo tail -f /var/log/apache2/error.log

If you need more detail, enable Roundcube’s internal debugging for a short window:

$config['debug_level'] = 1;
$config['log_driver'] = 'syslog';

If a plugin breaks the UI, disable it first and troubleshoot after the site is usable again:

sudo nano config/config.inc.php

Remove the plugin from the array:

$config['plugins'] = array('calendar'); // removed problematic plugin

Clear the cache to fix stale assets and some JavaScript issues:

sudo rm -rf temp/smarty_cache/*
sudo rm -rf temp/smarty_compile/*

For security tradeoffs that can influence which plugins you enable, read the email hosting security guide.

Ready to run Roundcube with the plugins your users actually need? Hostperl’s managed VPS hosting gives you the headroom, backups, and support to keep a multi-plugin webmail setup stable.

Frequently Asked Questions

Which plugins are essential for business email hosting?

Calendar, contacts (CardDAV), two-factor authentication, and spam filtering are the core set. Together they cover scheduling, contact sync, account protection, and day-to-day message control.

How many plugins can I safely install on a VPS?

Most VPS plans can run 8–12 plugins without noticeable slowdowns. Watch memory usage and page load time as you add them, and disable anything you don’t actively use.

Can I migrate plugin configurations between servers?

Yes. Plugin settings typically live in the database and in plugin config files. Export the database, copy the plugin config files, and install matching plugin versions on the destination server.

What happens if a plugin breaks after an update?

Disable it by removing it from the plugins array in config.inc.php. Then verify compatibility with your Roundcube version and check the plugin changelog for breaking changes before turning it back on.

Do plugins affect mobile email client connections?

Server-side features like calendars and contacts can sync to mobile clients through CalDAV/CardDAV. Interface-only plugins affect only users who access Roundcube through a browser.