Basic Steps

We are going to:

1. Download the latest version of Roundcube Webmail
2. Create a directory for Roundcube
3. unzip the download and copy to the new directory
4. set up Postgres ( the OS X default database) for Roundcube
5. Alter the Roundcube config files to allow access
6. Configure a httpd redirect file so that you can access webmail
7. Create a webapp plist file to allow selection of Roundcube for any site that you have defined in your "Websites" including the default or wiki site.


Step 1. Downloading Roundcube webmail

Get the latest version from

Note - the current version as at writing is 0.8.2

This will download to your "Downloads" folder (/Users/<username>/Downloads/roundcubemail-0.8.2.tar.gz)

Open Launchpad

Next, we are going to need the Terminal app for some command line work.
Make sure you are logged in as an Administrator-level account

Open Launchpad from your dock

Open Launchpad


type "terminal" and hit "Enter"


Steps 2. and 3. - Create a Directory and unzip to that directory

You can copy these lines and paste direct to your terminal session if you want.
The "sudo" command means "do what follows as a superuser" - it will ask for the admin password for your account

Note that the "|" in the gunzip command between the "0.8.2.tar.gz" and "tar xopf -" is the "bar or pipe" character located on the "Backslash" key on a standard Mac keyboard "Shift \"

In Terminal at the "$" prompt - type:

sudo mkdir -p /opt/webapps/rcwebmail
cd ~/downloads
gunzip -c roundcubemail-0.8.2.tar.gz | tar xopf -
sudo mv roundcubemail-0.8.2/* /opt/webapps/rcwebmail'

cd /opt/webapps/rcwebmail

Step 4. Postgres setup

Still in Terminal - type:

sudo createuser -U _postgres -d -s roundcube
sudo createdb -U _postgres -O roundcube -E UNICODE rcwebmail
sudo psql -U roundcube -d rcwebmail


And you'll see:


Step 4. Postgres setup

Step 4. continued

At the "rcwebmail=>" prompt type the following substituting the password that you want within the single quotes:

ALTER ROLE roundcube WITH PASSWORD 'the_new_password'
\c - roundcube
\i /opt/webapps/rcwebmail/SQL/postgres.initial.sql


You sould see a bunch of SQL commands after the \i /opt/webapps.rcwebmail/SQL/postgres.initial.sql step
and following the \q , you should be back at the command prompt in the \opt\webapps\rcwebmail directory.

Step 4. continued

Step 5 - Roundcube Setup - Database Connect

Still in Terminal :

cd /opt/webapps/rcwebmail
sudo cp
sudo nano

And you'll see this screen below.

Use the arrow keys to move the cursor to the marked line and change


to (inserting the new password that you entered above)


Then type:

Ctrl-x (control and "x" key at same time)
Press "Return" Key

Step 5. Continued - Roundube Config Setup

Still in Terminal type:

sudo cp
Ctrl-w (Ctrl key asnd "w" at same time")

and change the line

$rcmail_config['default_host'] = '';


rcmail_config['default_host'] = 'tls://';

and 7 lines below .....

$rcmail_config['imap_auth_type'] = null;


$rcmail_config['imap_auth_type'] = CRAM_MD5;


Then to exit the nano editor


Step 6. Create an apache redirect file for Roundcube

Still in terminal

cd /opt/webapps/webmail
sudo nano httpd_rcwebmail.conf

Enter these lines and edit as you want!

Alias /webmail "/opt/webapps/rcwebmail/"
Alias /Webmail "/opt/webapps/rcwebmail/"
Alias /WebMail "/opt/webapps/rcwebmail/"
Requestheader set x-apple-service-webmail-enabled true
<Directory "/opt/webapps/rcwebmail/">
  Options -Indexes FollowSymLinks


Step 7. Create a webapp for Roundcube Mail

Still in Terminal

cd /Library/Server/Web/Config/apache2/webapps/
sudo nano org.yourdomain.webapps.rcwebmail.plist

Again - enter the following and change the org.yourdomain to whatever yours is!


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
    <string>"RoundCube Webmail</string>


Start and add Roundcube Webmail to your default site

Startup and follow the screenshots to enable.

You will then be able to access webmail (with the appropriate dns records in place!) via (or WebMail or Webmail - whatever aliases you added in the httpd_rcwebmail.conf file)


Edit your Server Website

double click your "Server Website"

Edit Advanced Settings

Click on Advanced Settings

Tick Webmail

Tick Roundcube Webmail

Tick Webmail

Welcome to Roundcube