{"id":1232,"date":"2018-11-06T23:29:01","date_gmt":"2018-11-06T20:29:01","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1232"},"modified":"2018-12-11T23:50:41","modified_gmt":"2018-12-11T20:50:41","slug":"how-to-install-and-setup-rainloop-webmail-with-nginx-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-and-setup-rainloop-webmail-with-nginx-on-ubuntu-18-04\/","title":{"rendered":"How to Install RainLoop Webmail Client with Nginx on Ubuntu 18.04"},"content":{"rendered":"
In this tutorial, we are going to learn how to install RainLoop Webmail on Ubuntu 18.04.\u00a0 RainLoop Webmail is a simple, modern and fast web-based email client. It provides an easy and hustle free way to easily access your mails on any mail provider be it your own email servers, Gmail, Outlook, Yahoo, name them. RainLoop Webmail client offers quite a number of features;<\/p>\n
You can check more features of RainLoop Webmail here<\/a>.<\/p>\n You may also want to check our previous article on how to setup Thunderbird mail client on Ubuntu 18.04<\/a>.<\/p>\n As a pre-requisite;<\/p>\n You may want to check our previous articles on setting up LAMP<\/a> or LEMP<\/a> Stack on Ubuntu 18.04.<\/p>\n Once you are done setting up LEMP Stack, install the following extra PHP extensions required by RainLoop;<\/p>\n 2. Set Static IP address for your server and set the hostname in hosts file in case you are not using DNS server. You can check our previous article on how to set up static IP address on Ubuntu 18.04<\/a>. In our case, the Server IP address is 192.168.43.17<\/strong> and the hostname is webmail.example.com<\/strong> and thus my hosts file would contain the following line;<\/p>\n In order to install RainLoop, download its archive and extract the files to the RainLoop web root directory.<\/p>\n To install RainLoop, extract the files from the archive and upload them to the RainLoop web root directory.<\/p>\n After the installation, you need to create a server block configuration for RainLoop as shown below.<\/p>\n Create the RainLoop log directory as defined in the configuration file above.<\/p>\n Once you are done with configuration, save the file and test for syntax errors;<\/p>\n Since all is well, activate the RainLoop site configuration as shown\u00a0 below;<\/p>\n Reload Nginx Service to effect the changes above;<\/p>\n To verify that the RainLoop installation is fine, navigate to the browser and enter the URL If all is well, you should see RainLoop admin panel login page as shown below;<\/p>\nPre-requisites<\/h2>\n
\n
\n
# apt install php7.2-{curl,xml}<\/code><\/pre>\n
...<\/strong>\r\n192.168.43.17 webmail.example.com<\/code><\/pre>\n
Installing RainLoop<\/h2>\n
Create RainLoop web root directory<\/h4>\n
# mkdir \/var\/www\/html\/rainloop<\/code><\/pre>\n<\/div>\n
Download RainLoop Webmail archive<\/h4>\n
# wget http:\/\/www.rainloop.net\/repository\/webmail\/rainloop-community-latest.zip<\/code><\/pre>\n
Install RainLoop Application<\/h4>\n
# unzip rainloop-community-latest.zip -d \/var\/www\/html\/rainloop\/<\/code><\/pre>\n
Configure proper permission for files and directories of the RainLoop<\/h4>\n
\n
drwxr-xr-x<\/code>);<\/li>\n<\/ul>\n
# find \/var\/www\/html\/rainloop\/ -type d -exec chmod 755 {} \\;<\/code><\/pre>\n
\n
-rw-r--r--<\/code>);<\/li>\n<\/ul>\n
# find \/var\/www\/html\/rainloop\/ -type f -exec chmod 644 {} \\;<\/code><\/pre>\n
\n
www-data<\/code>.<\/li>\n<\/ul>\n
# chown -R www-data.www-data \/var\/www\/html\/rainloop\/<\/code><\/pre>\n
Configure a Server Block for RainLoop<\/h2>\n
# vim \/etc\/nginx\/sites-available\/rainloop.conf<\/code><\/pre>\n
server {\r\n\tlisten 80;\r\n\r\n\tserver_name webmail.example.com;\r\n\troot \/var\/www\/html\/rainloop;\r\n\r\n access_log \/var\/log\/rainloop\/access.log;\r\n error_log \/var\/log\/rainloop\/error.log;\r\n\r\n\tindex index.php;\r\n\r\n\tlocation \/ {\r\n\t\ttry_files $uri $uri\/ \/index.php?$query_string;\r\n\t}\r\n\r\n\tlocation ~ \\.php$ {\r\n fastcgi_index index.php;\r\n fastcgi_split_path_info ^(.+\\.php)(.*)$;\r\n fastcgi_keep_conn on;\r\n \t fastcgi_pass unix:\/var\/run\/php\/php7.2-fpm.sock;\r\n include \/etc\/nginx\/fastcgi_params;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n \t}\r\n location ~ \/\\.ht {\r\n deny all;\r\n }\r\n\tlocation ^~ \/data {\r\n\t deny all;\r\n\t}\r\n}<\/code><\/pre>\n
# mkdir \/var\/log\/rainloop<\/code><\/pre>\n
# nginx -t\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n
# ln -s \/etc\/nginx\/sites-available\/rainloop.conf \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n
# systemctl reload nginx<\/code><\/pre>\n
http:\/\/webmail.example.com\/?admin<\/code>. Where\u00a0
webmail.example.com<\/code> is the server’s hostname as configured on Nginx server name;<\/p>\n