4 This file describes the basic steps to install Roundcube Webmail on your
5 web server. For additional information, please also consult the project's
6 wiki page at http://trac.roundcube.net/wiki
12 * The Apache, Lighttpd, Cherokee or Hiawatha web server
13 * .htaccess support allowing overrides for DirectoryIndex
14 * PHP Version 5.2.1 or greater including
15 - PCRE, DOM, JSON, XML, Session, Sockets (required)
17 - Multibyte String (mbstring)
18 - Mcrypt (supporting Triple DES)
20 - Database driver for either MySQL, Postgres or SQLite
21 * The PEAR framework with the following packages installed:
23 - Mail_Mime 1.8.1 or newer
24 - Net_SMTP 1.4.2 or newer
25 - Net_IDNA2 0.1.1 or newer
26 - Auth_SASL 1.0.3 or newer
27 * php.ini options (see .htaccess file):
28 - error_reporting E_ALL & ~E_NOTICE (or lower)
29 - memory_limit > 16MB (increase as suitable to support large attachments)
30 - file_uploads enabled (for attachment upload features)
31 - session.auto_start disabled
32 - zend.ze1_compatibility_mode disabled
33 - suhosin.session.encrypt disabled
34 - mbstring.func_overload disabled
35 - magic_quotes_runtime disabled
36 * PHP compiled with OpenSSL to connect to IMAPS and to use the spell checker
37 * A MySQL (4.0.8 or newer), PostgreSQL, MSSQL database engine
38 or the SQLite extension for PHP
39 * One of the above databases with permission to create tables
40 * An SMTP server (recommended) or PHP configured for mail delivery
46 1. Decompress and put this folder somewhere inside your document root
47 2. Make sure that the following directories (and the files within)
48 are writable by the webserver
51 3. Create a new database and a database user for Roundcube (see DATABASE SETUP)
52 4. Point your browser to http://url-to-roundcube/installer/
53 5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
54 6. After creating and testing the configuration, remove the installer directory
61 Roundcube writes internal errors to the 'errors' log file located in the logs
62 directory which can be configured in config/main.inc.php. If you want ordinary
63 PHP errors to be logged there as well, enable the 'php_value error_log' line
64 in the .htaccess file and set the path to the log file accordingly.
66 By default the session_path settings of PHP are not modified by Roundcube.
67 However if you want to limit the session cookies to the directory where
68 Roundcube resides you can uncomment and configure the according line
69 in the .htaccess file.
75 Note: Database for Roundcube must use UTF-8 character set.
79 Setting up the mysql database can be done by creating an empty database,
80 importing the table layout and granting the proper permissions to the
81 roundcube user. Here is an example of that procedure:
84 > CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
85 > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
86 IDENTIFIED BY 'password';
89 # mysql roundcubemail < SQL/mysql.initial.sql
91 Note 1: 'password' is the master password for the roundcube user. It is strongly
92 recommended you replace this with a more secure password. Please keep in
93 mind: You need to specify this password later in 'config/db.inc.php'.
98 You need sqlite 2 (preferably 2.8) to setup the sqlite db
99 (sqlite 3.x also doesn't work at the moment). Here is
100 an example how you can setup the sqlite.db for roundcube:
102 # sqlite -init SQL/sqlite.initial.sql sqlite.db
103 Loading resources from SQL/sqlite.initial.sql
104 SQLite version 2.8.16
105 Enter ".help" for instructions
107 # chmod o+rw sqlite.db
109 Make sure your configuration points to the sqlite.db file and that the
110 webserver can write to the file and the directory containing the file.
115 To use Roundcube with PostgreSQL support you have to follow these
116 simple steps, which have to be done as the postgres system user (or
117 which ever is the database superuser):
119 $ createuser roundcube
120 $ createdb -O roundcube -E UNICODE roundcubemail
123 roundcubemail =# ALTER USER roundcube WITH PASSWORD 'the_new_password';
124 roundcubemail =# \c - roundcube
125 roundcubemail => \i SQL/postgres.initial.sql
127 All this has been tested with PostgreSQL 8.x and 7.4.x. Older
128 versions don't have a -O option for the createdb, so if you are
129 using that version you'll have to change ownership of the DB later.
134 Do keep your database slick and clean we recommend to periodically execute
135 bin/cleandb.sh which finally removes all records that are marked as deleted.
136 Best solution is to install a cronjob running this script daily.
143 First of all, rename the files config/*.inc.php.dist to config/*.inc.php.
144 You can then change these files according to your environment and your needs.
145 Details about the config parameters can be found in the config files.
146 See http://trac.roundcube.net/wiki/Howto_Install for even more guidance.
148 You can also modify the default .htaccess file. This is necessary to
149 increase the allowed size of file attachments, for example:
150 php_value upload_max_filesize 2M
156 If you already have a previous version of Roundcube installed,
157 please refer to the instructions in UPGRADING guide.
163 There are two forms of optimisation here, compression and caching, both aimed
164 at increasing an end user's experience using Roundcube Webmail. Compression
165 allows the static web pages to be delivered with less bandwidth. The index.php
166 of Roundcube Webmail already enables compression on its output. The settings
167 below allow compression to occur for all static files. Caching sets HTTP
168 response headers that enable a user's web client to understand what is static
171 The caching directives used are:
172 * Etags - sets at tag so the client can request is the page has changed
173 * Cache-control - defines the age of the page and that the page is 'public'
174 This enables clients to cache javascript files that don't have private
175 information between sessions even if using HTTPS. It also allows proxies
176 to share the same cached page between users.
177 * Expires - provides another hint to increase the lifetime of static pages.
179 For more information refer to RFC 2616.
183 These directives are designed for production use. If you are using this in
184 a development environment you may get horribly confused if your webclient
185 is caching stuff that you changed on the server. Disabling the expires
186 parts below should save you some grief.
188 If you are changing the skins, it is recommended that you copy content to
189 a different directory apart from 'default'.
193 To enable these features in apache the following modules need to be enabled:
198 The optimisation is already included in the .htaccess file in the top
199 directory of your installation.
201 If you are using Apache version 2.2.9 and later, in the .htaccess file
202 change the 'append' word to 'merge' for a more correct response. Keeping
203 as 'append' shouldn't cause any problems though changing to merge will
204 eliminate the possibility of duplicate 'public' headers in Cache-control.
208 With Lightty the addition of Expire: tags by mod_expire is incompatible with
209 the addition of "Cache-control: public". Using Cache-control 'public' is
210 used below as it is assumed to give a better caching result.
212 Enable modules in server.modules:
216 Mod_compress is a server side cache of compressed files to improve its performance.
218 $HTTP["host"] == "www.example.com" {
220 static-file.etags = "enable"
221 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
222 etag.use-mtime = "enable"
224 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
225 $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
226 setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
229 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
230 # set compress.cache-dir to somewhere outside the docroot.
231 compress.cache-dir = var.statedir + "/cache/compress"
233 compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")