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)
16 - libiconv (recommended)
17 - mbstring, fileinfo, mcrypt (optional)
18 * PEAR packages distributed with Roundcube or external:
20 - Mail_Mime 1.8.1 or newer
21 - Net_SMTP 1.4.2 or newer
22 - Net_IDNA2 0.1.1 or newer
23 - Auth_SASL 1.0.3 or newer
24 * php.ini options (see .htaccess file):
25 - error_reporting E_ALL & ~E_NOTICE (or lower)
26 - memory_limit > 16MB (increase as suitable to support large attachments)
27 - file_uploads enabled (for attachment upload features)
28 - session.auto_start disabled
29 - zend.ze1_compatibility_mode disabled
30 - suhosin.session.encrypt disabled
31 - mbstring.func_overload disabled
32 - magic_quotes_runtime disabled
33 * PHP compiled with OpenSSL to connect to IMAPS and to use the spell checker
34 * A MySQL (4.0.8 or newer), PostgreSQL, MSSQL database engine
35 or the SQLite extension for PHP
36 * One of the above databases with permission to create tables
37 * An SMTP server (recommended) or PHP configured for mail delivery
43 1. Decompress and put this folder somewhere inside your document root
44 2. Make sure that the following directories (and the files within)
45 are writable by the webserver
48 3. Create a new database and a database user for Roundcube (see DATABASE SETUP)
49 4. Point your browser to http://url-to-roundcube/installer/
50 5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
51 6. After creating and testing the configuration, remove the installer directory
58 Roundcube writes internal errors to the 'errors' log file located in the logs
59 directory which can be configured in config/main.inc.php. If you want ordinary
60 PHP errors to be logged there as well, enable the 'php_value error_log' line
61 in the .htaccess file and set the path to the log file accordingly.
63 By default the session_path settings of PHP are not modified by Roundcube.
64 However if you want to limit the session cookies to the directory where
65 Roundcube resides you can uncomment and configure the according line
66 in the .htaccess file.
72 Note: Database for Roundcube must use UTF-8 character set.
76 Setting up the mysql database can be done by creating an empty database,
77 importing the table layout and granting the proper permissions to the
78 roundcube user. Here is an example of that procedure:
81 > CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
82 > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
83 IDENTIFIED BY 'password';
86 # mysql roundcubemail < SQL/mysql.initial.sql
88 Note 1: 'password' is the master password for the roundcube user. It is strongly
89 recommended you replace this with a more secure password. Please keep in
90 mind: You need to specify this password later in 'config/db.inc.php'.
95 You need sqlite 2 (preferably 2.8) to setup the sqlite db
96 (sqlite 3.x also doesn't work at the moment). Here is
97 an example how you can setup the sqlite.db for roundcube:
99 # sqlite -init SQL/sqlite.initial.sql sqlite.db
100 Loading resources from SQL/sqlite.initial.sql
101 SQLite version 2.8.16
102 Enter ".help" for instructions
104 # chmod o+rw sqlite.db
106 Make sure your configuration points to the sqlite.db file and that the
107 webserver can write to the file and the directory containing the file.
112 To use Roundcube with PostgreSQL support you have to follow these
113 simple steps, which have to be done as the postgres system user (or
114 which ever is the database superuser):
116 $ createuser roundcube
117 $ createdb -O roundcube -E UNICODE roundcubemail
120 roundcubemail =# ALTER USER roundcube WITH PASSWORD 'the_new_password';
121 roundcubemail =# \c - roundcube
122 roundcubemail => \i SQL/postgres.initial.sql
124 All this has been tested with PostgreSQL 8.x and 7.4.x. Older
125 versions don't have a -O option for the createdb, so if you are
126 using that version you'll have to change ownership of the DB later.
131 Do keep your database slick and clean we recommend to periodically execute
132 bin/cleandb.sh which finally removes all records that are marked as deleted.
133 Best solution is to install a cronjob running this script daily.
140 First of all, rename the files config/*.inc.php.dist to config/*.inc.php.
141 You can then change these files according to your environment and your needs.
142 Details about the config parameters can be found in the config files.
143 See http://trac.roundcube.net/wiki/Howto_Install for even more guidance.
145 You can also modify the default .htaccess file. This is necessary to
146 increase the allowed size of file attachments, for example:
147 php_value upload_max_filesize 2M
153 If you already have a previous version of Roundcube installed,
154 please refer to the instructions in UPGRADING guide.
160 There are two forms of optimisation here, compression and caching, both aimed
161 at increasing an end user's experience using Roundcube Webmail. Compression
162 allows the static web pages to be delivered with less bandwidth. The index.php
163 of Roundcube Webmail already enables compression on its output. The settings
164 below allow compression to occur for all static files. Caching sets HTTP
165 response headers that enable a user's web client to understand what is static
168 The caching directives used are:
169 * Etags - sets at tag so the client can request is the page has changed
170 * Cache-control - defines the age of the page and that the page is 'public'
171 This enables clients to cache javascript files that don't have private
172 information between sessions even if using HTTPS. It also allows proxies
173 to share the same cached page between users.
174 * Expires - provides another hint to increase the lifetime of static pages.
176 For more information refer to RFC 2616.
180 These directives are designed for production use. If you are using this in
181 a development environment you may get horribly confused if your webclient
182 is caching stuff that you changed on the server. Disabling the expires
183 parts below should save you some grief.
185 If you are changing the skins, it is recommended that you copy content to
186 a different directory apart from 'default'.
190 To enable these features in apache the following modules need to be enabled:
195 The optimisation is already included in the .htaccess file in the top
196 directory of your installation.
198 If you are using Apache version 2.2.9 and later, in the .htaccess file
199 change the 'append' word to 'merge' for a more correct response. Keeping
200 as 'append' shouldn't cause any problems though changing to merge will
201 eliminate the possibility of duplicate 'public' headers in Cache-control.
205 With Lightty the addition of Expire: tags by mod_expire is incompatible with
206 the addition of "Cache-control: public". Using Cache-control 'public' is
207 used below as it is assumed to give a better caching result.
209 Enable modules in server.modules:
213 Mod_compress is a server side cache of compressed files to improve its performance.
215 $HTTP["host"] == "www.example.com" {
217 static-file.etags = "enable"
218 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
219 etag.use-mtime = "enable"
221 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
222 $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
223 setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
226 # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
227 # set compress.cache-dir to somewhere outside the docroot.
228 compress.cache-dir = var.statedir + "/cache/compress"
230 compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")