Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
services:roundcube [2025/03/06 13:15] – willy | services:roundcube [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Roundcube Webmail ====== | ||
- | |||
- | [[https:// | ||
- | |||
- | **Note:** i installed roundcube on my // | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | Since i don't want to oberate the external server with containers, i will show you how to install Roundcube on bare metal. It's relatively easy anyway. | ||
- | |||
- | You need PHP and NGINX installed. PHP requires some extensions like PDO and zip, also Roundcube requires aspell to be installed for syntax checking, which is controlled by L10N variable in / | ||
- | <code bash> | ||
- | echo app-eselect/ | ||
- | echo dev-lang/ | ||
- | echo ' | ||
- | emerge -vp php aspell | ||
- | # The following is optional, if you haven' | ||
- | # useradd --shell / | ||
- | </ | ||
- | |||
- | Since i use NGINX, the fpm flag needs also to be enabled. | ||
- | |||
- | If you haven' | ||
- | < | ||
- | user = web | ||
- | group = web | ||
- | </ | ||
- | in file **/ | ||
- | |||
- | |||
- | ===== Installation ===== | ||
- | |||
- | Let's follow [[https:// | ||
- | |||
- | Since i want to share PHP between Rouncube and other public services, due to the limited resources of the external server, i will not create a dedicated user, which would require also to run multiple PHP copies. | ||
- | |||
- | The webmail will be installed under **/ | ||
- | <code bash> | ||
- | mkdir / | ||
- | mkdir / | ||
- | chown web:web / | ||
- | </ | ||
- | |||
- | Download the latest **complete** package from [[https:// | ||
- | |||
- | Set proper permissions and create the folder to store the SQLite database (mysql or postgres are overkill for small needs): | ||
- | <code bash> | ||
- | cd / | ||
- | mkdir db temp | ||
- | chown web:web db temp | ||
- | wget https:// | ||
- | tar xvf roundcubemail-X.Y.Z-complete.tar.gz | ||
- | ln -s roundcubemail-X.Y.Z-complete.tar.gz roundcubemail | ||
- | </ | ||
- | |||
- | Done! Now setup the NGINX webserver. | ||
- | |||
- | ===== NGINX setup ===== | ||
- | |||
- | Assuming that PHP-FPM is on port 9000, the following configuration should be enough: | ||
- | <file - roundcube.conf> | ||
- | server { | ||
- | server_name webmail.mydomain.com; | ||
- | listen 443 ssl; | ||
- | |||
- | index index.php; | ||
- | |||
- | root / | ||
- | |||
- | access_log / | ||
- | error_log / | ||
- | |||
- | # The following lines should be uncommented after initial setup is complete! | ||
- | # location ~ / | ||
- | # deny all; | ||
- | # alias / | ||
- | # } | ||
- | |||
- | location ~ /.*\.php$ { | ||
- | try_files $uri =404; | ||
- | fastcgi_split_path_info ^(.+\.php)(/ | ||
- | include fastcgi_params; | ||
- | fastcgi_param SCRIPT_FILENAME $request_filename; | ||
- | fastcgi_pass 127.0.0.1: | ||
- | } | ||
- | |||
- | include / | ||
- | ssl_dhparam / | ||
- | ssl_certificate / | ||
- | ssl_certificate_key / | ||
- | } | ||
- | </ | ||
- | |||
- | Restart your NGINX and configure Roundcube. | ||
- | |||
- | |||
- | ===== Configuration ===== | ||
- | |||
- | Point your browser to **https:// | ||
- | |||
- | Double check the **temp** and **logs** paths, you need to change the path to point to the folders you created in the previous step. | ||
- | |||
- | When asked for database, use this as file path **/ | ||
- | |||
- | Save the settings by copying the produced config file as **/ | ||
- | |||
- | Here is an example which works with Stalwart: | ||
- | <file - config.inc.php> | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | $config[' | ||
- | </ | ||
- | |||
- | At this point the installation is complete. | ||
- | |||
- | |||
- | ===== CardDav Plugin ===== | ||
- | |||
- | To enable integration with your CardDav addressbook, | ||
- | |||
- | Download latest tarball from [[https:// | ||
- | |||
- | **Note:** it is critical that you LOGOUT from Roundcube before enabling the plugin, and LOGIN again after. This is because this will create the needed table. If you don't, you will get an internal error. | ||
- | |||
- | |||
- | ===== Autostart ===== | ||
- | |||
- | Roundcube only depends on PHP-FPM and NGINX, ensure they are both autostarting: | ||
- | <code bash> | ||
- | rc-update add php-fpm default | ||
- | rc-update add nginx default | ||
- | </ | ||
- | |||