Tine 2.0 – #1 The Installation

First of all it’s pretty easy and in this guide I’ll mention all important steps to succeed and avoid all known pitfalls. Second of all, this guide represents a best practise installation of Tine 2.0 and you should be able to achieve best results with this guide.

Please keep in mind, that you and only you are in charge of your installation. You are responsible for reliability and safety. If you don’t comply with that you should consider to use a hosted solution!

This guide was last updated at 19th August, 2017.


Tine 2.0 is a PHP based application which runs great with just a MariaDB. But you clearly improve your experience with setting up Redis as a session storage, cache and queue worker.

I hereby suggest PHP 7 or higher due to it’s performance improvements.

Tine 2.0 runs great with PHP 5.5 + but  7.0+ is a better choice.

For PHP you’d like to make sure, that you have the following extensions enabled: ctype, date, xml, dom, SimpleXML, gd, hash, iconv, json, mysql, pdo_mysql, SPL and zip. Those packages are pretty common and should be available on all linux distributions.

Tine 2.0 is optimised for Mysql/MariaDB, I wouldn’t suggest to use PostgreSQL or Oracle, especially because the PostgreSQL support is about to be probably dropped in the future and a migration is not that easy.

The best experience can be achieved with MariaDB 5.5.4+. We are using some features of 5.5.4, if you don’t have or your provider doesn’t support it, it’s not a game breaker, but the fallbacks are less performant.

About the webserver, nginx or apache2 are both working great and the important rewrite rules are available for both. This is just up to you!

Find the right package

All packages can be found on Github, the most relevant package is called All-in-One and ships the whole thing like Addressbook, Calendar, Mail and even more. Literally everything a groupware should offer.

We also have repositories for some distributions, I personally prefer the manual installation which is describe in this guide.

Preparing the setup

At this point I assume that you have a running server, with properly configured database, web server and application server.

Tine 2.0 need some rewrite rules to support activesync and *dav.

For apache2 put this into your  .htaccess file:

DirectoryIndex index.php

<IfModule mod_php5.c>

<IfModule mod_php7.c>

php_value max_input_time 120
php_value session.gc_maxlifetime 86400
php_value memory_limit 128M
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value safe_mode off
php_flag display_errors off
php_flag log_errors on
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag register_globals off
php_value max_execution_time 90

<IfModule mod_rewrite.c>
RewriteEngine on

# ActiveSync
RewriteRule ^Microsoft-Server-ActiveSync index.php?frontend=activesync [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

# OpenID
RewriteRule ^users/(.*) index.php?frontend=openid&username=$1 [L,QSA]

# WebDAV / CalDAV / CardDAV
RewriteRule ^$ index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

RewriteRule ^addressbooks index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^calendars index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^webdav index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^principals index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^remote.php index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

# Anonymous downloads
RewriteRule ^download/get/(.*) index.php?method=Download.downloadNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^download/show/(.*) index.php?method=Download.displayNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

<IfModule mod_expires.c>
ExpiresActive on

ExpiresByType image/gif "access plus 1 month 1 days"
ExpiresByType image/jpeg "access plus 1 month 1 days"
ExpiresByType image/png "access plus 1 month 1 days" 


For nginx you need to put it into your host configuration:

rewrite (?i)^/Microsoft-Server-ActiveSync /index.php?frontend=activesync last
rewrite (?i)^/users/(.*) /index.php?frontend=openid&username=$1 last
rewrite (?i)^/(addressbooks|calendars|webdav|principals|remote.php) /index.php?frontend=webdav last
rewrite (?i)^/download/get/(.*) /index.php?method=Download.downloadNode&path=$1 last
rewrite (?i)^/download/show/(.*) /index.php?method=Download.displayNode&path=$1 last

This is the minimal config for nginx, you can tune nginx a lot of improve the performance of Tine 2.0! But that’s up to you.

The next step is to unzip the All-in-One package into your webroot.

The setup

This step expects your web server to be set up with all required rewrite rules as well as database server and redis (optional). 

Tine 2.0 needs some folders writable to fully operate. This folders are cache, files, session and temp. All these folders shouldn’t be accessible from the web. Only your application server needs to write and read there.

cache and session can be replaced by redis which improves the overall experience a lot!

Exposing those folders to the web can cause severe vulnerabilities to your installation. I suggest to place them somewhere out of your web root.

For example you can create a dedicated folder for Tine 2.0 in /srv or somewhere else and make it write and readable only to your application server which is php-fpm in best case.

You’ll find a file called config.inc.php.dist in your webroot, you need to rename it to config.inc.php to proceed. Once done you edit it and fill any username and password for the Tine 2.0 setup interface. Keep in mind, that the setup page will be available after installation and you should chose a good password.

Fig 1. Tine 2.0 Setup Login

Once done navigate with your web browser to https://<your url>/setup.php. You should be able to see a login like in Fig 1.

Once logged in you need to accept the terms and conditions to proceed. On the next page Tine 2.0 will check your server installation for compatibility. If everything is green you should be able to proceed.

The configuration

Tine 2.0 offers many configuration options and some of them are more important than others. At this point we’ll go through the more important and useful settings.

Config Manager

Fig 2. Config Manager example

What you need to configure is:

  • Database
  • Caching
  • Session
  • Temporary files
  • Filestore directory

What you can configure is:

  • Logging
  • Queue

I would suggest you to configure queue as well, it can improve the userexperience and improves the performance! To use the queuing feature in Tine 2.0 you need a redis server.

Attention: The queue worker requires an additional worker running on your server which is not covered by this tutorial yet!

In theory there is no real need to set a session path, PHP should know itself where to store them. But I had problems without an explicit session path.

If you decided to use redis, you should set caching and session to redis otherwise you should find a save place on yo

ur server and create folders for caching, temporary files and filestore directory. Make sure those folders are writable by the application server and are not exposed to the www.


Fig 3. Authentication/Accounts example

Tine 2.0 is mighty. Really. Tine 2.0 can integrate into several authentication backends and is able to interact with your mailserver. I won’t cover all of those aspects in this tutorial.

Important sections are Authentication provider and Accounts storage, first one decides if the login is valid and second one where the accounts are stored. I use IMAP as an authentication provider but Tine 2.0 can also use itself. Most people would like to set both to SQL and just proceed.

IMAP becomes interesting if you run Tine 2.0 for example for your family and everyone has a family mail account. Or same with a small company.

In case you have LDAP you can also set both to LDAP which might be cool for companies.


Fig 4. Email example

You should fill SMTP and IMAP with mailserver information, Tine 2.0 will use it to send event invitations and so on!

Use system account comes handy when you have one mail account per user and all have the same mail server. When set to true, all your users will have a fixed mail account. That’s super useful for when you don’t want to set up all user profiles yourself.

In case your mail server provides sieve, you can set it up as well. Tine 2.0 offers a sieve client for all users, so they are able to define vacation notices and server sided filter rules.

Application manager

Now it’s your turn to decide which applications you like to have. I would suggest for a fully featured setup:

  • Addressbook
  • Calendar
  • ActiveSync
  • Felamimail
  • Filemanager

And congratulations you are done. No have fun and enjoy Tine 2.0! 🙂

Seek help or want to contribute?

There is a community page with all relevant resources! 🙂