Professional Documents
Culture Documents
04
Guides & Tutorials (https://linode.com/docs/)
» Email Server Guides (https://linode.com/docs/email/)
» Email Clients (https://linode.com/docs/email/clients/)
» Install Roundcube on Ubuntu 14.04
Use promo code DOCS10 for $10 credit on a new account. Try this Guide
Contribute on GitHub
View Project (https://github.com/linode/docs) | View File (https://github.com/linode/docs/blob/master/docs/email/clients/installroundcubeonubuntu1404.md) | Edit File
(https://github.com/linode/docs/edit/master/docs/email/clients/installroundcubeonubuntu1404.md)
This is a Linode Community guide. If you’re an expert on something for which we need a guide, you too can get paid to write for us.
(/docs/contribute)
What is Roundcube?
Roundcube is a webbased IMAP email client that offers a user interface similar to Google’s Gmail or Microsoft’s Hotmail. It is a serverside
application written in PHP designed to access an email server or service. Email users interact with Roundcube over the internet using a web
browser.
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 1/11
22/12/2017 Install Roundcube on Ubuntu 14.04
2. Complete the sections of our Securing Your Server (/docs/security/securingyourserver) to create a standard user account, harden
SSH access and remove unnecessary network services.
3. This guide is designed to work with our Installing Postfix, Dovecot, and MySQL (/docs/email/postfix/emailwithpostfixdovecotand
mysql) tutorial, but you can use a different mail server.
5. Update your server’s software packages:
sudo apt‐get update && sudo apt‐get upgrade
Note
This guide is written for a nonroot user. Commands that require elevated privileges are prefixed with sudo . If you’re not familiar with the sudo
command, you can check our Users and Groups (/docs/toolsreference/linuxusersandgroups) guide.
sudo apt‐get install lamp‐server^
2. During the installation process, you will be asked to choose a password for the root MySQL user.
3. Secure your new MySQL installation:
sudo mysql_secure_installation
sudo sed ‐i ‐e "s/^;date\.timezone =.*$/date\.timezone = 'UTC'/" /etc/php5/apache2/php.ini
cd /etc/apache2/sites‐available
sudo wget https://linode.com/docs/assets/apache2‐roundcube.sample.conf
3. Transfer the file’s ownership to root:
sudo chown root:root apache2‐roundcube.sample.conf
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 2/11
22/12/2017 Install Roundcube on Ubuntu 14.04
4. Next, change the file’s access permissions:
sudo chmod 644 apache2‐roundcube.sample.conf
5. Determine what type of Secure Socket Layer (SSL) encryption certificate is best for your Roundcube deployment. A selfsigned SSL
certificate (/docs/security/ssl/howtomakeaselfsignedsslcertificate) is easy and free, but triggers an error in most modern browsers
reporting that the connection is not private. Let’s Encrypt (https://letsencrypt.org/) offers browser trusted, free SSL certificates, but does
not support Extended Validatation (https://en.wikipedia.org/wiki/Extended_Validation_Certificate) (EV) or multidomain (wildcard
(https://en.wikipedia.org/wiki/Wildcard_certificate)) certificates. To gain those features, a commercial SSL certificate
(/docs/security/ssl/obtainingacommercialsslcertificate) must be used.
Caution
Make sure the custom directory and desired .log files exist before specifying them in your virtual host configuration. Failure to do so will
prevent Apache from starting. The files should be owned by the www‐data user with 644 permissions.
7. Rename your configuration file to match its full domain name:
sudo mv apache2‐roundcube.sample.conf webmail.example.com.conf
8. Lastly, disable the default Apache virtual host unless you plan to use it.
sudo a2dissite 000‐default.conf default‐ssl.conf
mysql ‐u root ‐p
CREATE DATABASE roundcubemail;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'example_password';
GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost';
5. Flush the MySQL privilege tables to reload them:
FLUSH PRIVILEGES;
6. Log out of the MySQL command prompt and return to a regular Linux shell prompt:
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 3/11
22/12/2017 Install Roundcube on Ubuntu 14.04
exit
sudo apt‐get install php‐pear php5‐intl php5‐mcrypt && sudo php5enmod intl mcrypt
sudo a2enmod deflate expires headers rewrite ssl
sudo pear install Auth_SASL Net_SMTP Net_IDNA2‐0.1.1 Mail_mime Mail_mimeDecode
Note
PEAR is an acronym for “PHP Extension and Application Repository”. Common PHP code libraries, written officially or by third parties, can be
easily installed and referenced using the pear command.
PEAR will print an install ok confirmation message for each package that it successfully installs. In this case, a complete installation
will look similar to this:
install ok: channel://pear.php.net/Auth_SASL‐1.0.6
install ok: channel://pear.php.net/Net_SMTP‐1.7.1
install ok: channel://pear.php.net/Net_IDNA2‐0.1.1
install ok: channel://pear.php.net/Mail_mime‐1.10.0
install ok: channel://pear.php.net/Mail_mimeDecode‐1.5.5
cd ~/Downloads
2. Download Roundcube. At the time of this writing, the current stable version is 1.1.4, so it will be used for the rest of this guide.
wget http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.1.4/roundcubemail‐1.1.4.tar.gz
sudo tar ‐zxvf roundcubemail‐1.1.4.tar.gz ‐C /var/www
4. Eliminate the version number from Roundcube’s directory name. This will make updating easier later:
sudo mv /var/www/roundcubemail‐1.1.4 /var/www/roundcube
sudo chown ‐R www‐data:www‐data /var/www/roundcube
6. Lastly, you should enable Roundcube’s automatic cachecleaning shell script:
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 4/11
22/12/2017 Install Roundcube on Ubuntu 14.04
echo '0 0 * * * root bash /var/www/roundcube/bin/cleandb.sh >> /dev/null' | sudo tee ‐‐append /etc/crontab
sudo a2ensite webmail.example.com.conf
2. Restart Apache to apply all configuration changes and enable your new virtual host:
sudo service apache2 restart
2. Begin configuring Roundcube. The first step of Roundcube’s graphical configuration is an environment check. Click on the NEXT button
at the bottom of the page to continue.
Note
Since Roundcube supports six different SQL engines, five NOT AVAILABLE warnings will appear under the Checking available databases
section. MySQL was installed earlier as part of the LAMP stack, so you can ignore these warnings.
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 5/11
22/12/2017 Install Roundcube on Ubuntu 14.04
3. Specify your Roundcube configuration options. The list of options below will get you a proper, working configuration, but you can adjust
any unmentioned options as you see fit.
General configuration > product_name: Name of your email service.
General configuration > support_url: Where should your users go if they need help? A URL to a webbased contact form or an
email address should be used. (e.g. http://example.com/support or mailto:support@example.com )
General configuration > skin_logo: Replaces the default Roundcube logo with an image of your choice. The image must be
located within the /var/www/roundcube directory and be linked relatively (e.g. skins/larry/logo.png ). Recommended image
resolution is 177px by 49px .
Database setup > db_dsnw > Database password: Password for the roundcube MySQL user you created earlier.
IMAP Settings > default_host: Hostname of your IMAP server. Use ssl://localhost to access the local server (i.e. your server)
using OpenSSL.
IMAP Settings > default_port: TCP port for incoming IMAP connections to your server. Use port 993 to ensure OpenSSL is
used.
IMAP Settings > username_domain: What domain name should Roundcube assume all users are part of? This allows users to
only have to type in their email username (e.g. somebody) instead of their full email address (e.g. somebody@example.com ).
SMTP Settings > smtp_server: Hostname of your SMTP server. Use ssl://localhost to access the local server (i.e. your server)
using OpenSSL.
SMTP Settings > smtp_port: TCP port for incoming SMTP connections to your server. Use port 587 to ensure OpenSSL is used.
SMTP Settings > smtp_user/smtp_pass: Click and check the Use the current IMAP username and password for SMTP
authentication checkbox so that users can send mail without retyping their user credentials.
Display settings & user prefs > language: Allows you to select a default RFC1766 (http://www.faqs.org/rfcs/rfc1766)compliant
locale for Roundcube. For a full listing of the supported language codes, run cat /usr/share/i18n/SUPPORTED on your Linode.
Display settings & user prefs > draft_autosave: Most users will expect their drafts to be saved almost instantaneously while
they type them. While Roundcube does not offer instantaneous draft saving as an option, it can save a user’s draft every minute.
Select 1 min from the dropdown menu.
4. Click on the CREATE CONFIG button toward the bottom of the page to save your new configuration. You should see a confirmation
message on the corresponding page saying: The config file was saved successfully into RCMAIL_CONFIG_DIR directory of your
Roundcube installation.
5. Complete the configuration by clicking CONTINUE.
(/docs/assets/roundcubeconfigurationsavedsuccessfully.png)
6. Lastly, import Roundcube’s MySQL database structure by clicking on the Initialize database button.
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 6/11
22/12/2017 Install Roundcube on Ubuntu 14.04
sudo rm ‐rf /var/www/roundcube/installer
While Roundcube automatically disabled the installer functionality within its configuration file, deleting the installer directory adds
another layer of protection against intruders.
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 7/11
22/12/2017 Install Roundcube on Ubuntu 14.04
Note
If your email address is somebody@example.com , you only have to enter somebody as your username. Roundcube assumes that all users
exist at example.com .
cd ~/Downloads && wget http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.1.4/roundcubemail‐1.1.4.tar.gz
3. Extract and unzip the tarball (.tar.gz file) to ~/Downloads :
tar ‐zxvf roundcubemail‐1.1.4.tar.gz
cd roundcubemail‐1.1.4
sudo php bin/installto.sh /var/www/roundcube
5. Confirm the update by pressing Y and then ENTER. A successful upgrade will print something similar to this:
Upgrading from 1.1.4. Do you want to continue? (y/N)
y
Copying files to target location...sending incremental file list
...
Running update script at target...
Executing database schema update.
This instance of Roundcube is up‐to‐date.
Have fun!
All done.
All done means the update was successful; unless you don’t see this message, proceed to step six.
6. Delete the Roundcube directory and gzipped tarball from ~/Downloads :
cd ~/Downloads && rm ‐rfd roundcubemail‐1.1.4 roundcubemail‐1.1.4.tar.gz
Conclusion
Now that you have installed Roundcube, you have your very own free, webbased email client similar to Google’s Gmail or Microsoft’s
Hotmail. Users can access their email by navigating to https://webmail.example.com .
From here, you can install plugins to add additional functionality (http://trac.roundcube.net/wiki/Doc_Plugins) and customize the theme
(http://trac.roundcube.net/wiki/Doc_Skins) to match your organization’s color scheme.
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be
useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
Roundcube Homepage (https://roundcube.net/)
See Also
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 8/11
22/12/2017 Install Roundcube on Ubuntu 14.04
See Also
Use Advanced OpenSSH Features to Harden Access to Your Linode (/docs/security/advancedsshserversecurity/)
Install Odoo 10 on Ubuntu 16.04 (/docs/websites/cms/installodoo10onubuntu1604/)
Configure Postfix to Send Mail Using Gmail and Google Apps on Debian or Ubuntu (/docs/email/postfix/configurepostfixtosendmail
usinggmailandgoogleappsondebianorubuntu/)
Configure SPF and DKIM With Postfix on Debian 8 (/docs/email/postfix/configurespfanddkiminpostfixondebian8/)
Install Odoo 9 ERP on Ubuntu 14.04 (/docs/websites/cms/installodoo9erponubuntu1404/)
comments powered by Disqus (http://disqus.com)
This guide is published under a CC BYND 4.0 (https://creativecommons.org/licenses/bynd/4.0) license.
Overview (https://www.linode.com/linodes)
Plans & Pricing (https://www.linode.com/pricing)
Features (https://www.linode.com/linodes)
AddOns (https://www.linode.com/addons)
Managed (https://www.linode.com/managed)
Professional Services (https://www.linode.com/professionalservices)
Resources (https://linode.com/docs/)
Guides & Tutorials (https://linode.com/docs/)
Speed Test (https://www.linode.com/speedtest)
Forum (https://forum.linode.com/)
Chat (https://www.linode.com/chat)
System Status (http://status.linode.com/)
Company (https://www.linode.com/about)
About Us (https://www.linode.com/about)
Blog (https://blog.linode.com)
Press (https://www.linode.com/press)
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 9/11
22/12/2017 Install Roundcube on Ubuntu 14.04
Referral System (https://www.linode.com/referrals)
Careers (https://www.linode.com/careers)
Contact Us (https://www.linode.com/contact)
8554LINODE (tel:+18554546633)
(8554546633) (tel:+18554546633)
Intl.: +1 6093807100 (tel:+16093807100)
Email us (mailto:support@linode.com)
(https://facebook.com/linode) (https://twitter.com/linode) (https://plus.google.com/+linode/) (https://linkedin.com/company/linode)
© 2017 Linode, LLC
Terms of Service (https://www.linode.com/tos)
Privacy Policy (https://www.linode.com/privacy)
Security (https://www.linode.com/security)
Standards & Compliance (https://www.linode.com/compliance)
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 10/11
22/12/2017 Install Roundcube on Ubuntu 14.04
https://linode.com/docs/email/clients/installroundcubeonubuntu1404/ 11/11