{"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":"<p>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<ul>\n<li>Complete support of IMAP and SMTP protocols including SSL and STARTTLS.<\/li>\n<li>Sieve scripts (Filters and vacation message).<\/li>\n<li>Integration with Facebook, Google, Twitter and Dropbox.<\/li>\n<li>Managing folders list.<\/li>\n<li>Configurable multi-level caching system.<\/li>\n<li>Extending functionality with plugins installed through admin panel.<\/li>\n<li>Perfect rendering of complex HTML mails.<\/li>\n<li>Drag&#8217;n&#8217;drop for mails and attachments<\/li>\n<\/ul>\n<p>You can check more features of RainLoop Webmail <a href=\"https:\/\/www.rainloop.net\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>You may also want to check our previous article on <a href=\"https:\/\/kifarunix.com\/howtos\/how-to-install-and-setup-thunderbird-mail-client-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noopener\">how to setup Thunderbird mail client on Ubuntu 18.04<\/a>.<\/p>\n<h2>Pre-requisites<\/h2>\n<p>As a pre-requisite;<\/p>\n<ol>\n<li>RainLoop requires LAMP\/LEMP stack in order to operate efficiently. Generally, ensure that the following items are set before you can install and setup RainLoop Webmail.<\/li>\n<\/ol>\n<div class=\"span8\">\n<ul>\n<li>Web server: Apache, NGINX, lighttpd or other with PHP support<\/li>\n<li>PHP: 5.4 and above<\/li>\n<li>PHP extensions: cURL, iconv, json, libxml, dom, openssl, DateTime, PCRE, SPL<\/li>\n<li>Browser: Google Chrome, Firefox, Opera 10+, Safari 3+, Internet Explorer 11 or EDGE<\/li>\n<li>Optional: PDO (MySQL\/PostgreSQL\/SQLite) PHP extension (for contacts).<\/li>\n<\/ul>\n<p>You may want to check our previous articles on setting up <a href=\"https:\/\/kifarunix.com\/howtos\/how-to-install-lamp-stack-apachemariadb-php-7-2-on-ubuntu-18-04-lts\/\" target=\"_blank\" rel=\"noopener\">LAMP<\/a> or <a href=\"https:\/\/kifarunix.com\/howtos\/how-to-setup-lemp-stack-nginx-mariadb-php-7-2-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noopener\">LEMP<\/a> Stack on Ubuntu 18.04.<\/p>\n<p>Once you are done setting up LEMP Stack, install the following extra PHP extensions required by RainLoop;<\/p>\n<pre># apt install php7.2-{curl,xml}<\/code><\/pre>\n<p>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 <a href=\"https:\/\/kifarunix.com\/networking\/how-to-configure-static-ip-addresses-on-ubuntu-18-04-server-using-netplan\/\" target=\"_blank\" rel=\"noopener\">how to set up static IP address on Ubuntu 18.04<\/a>. In our case, the Server IP address is <strong>192.168.43.17<\/strong> and the hostname is <strong>webmail.example.com<\/strong> and thus my hosts file would contain the following line;<\/p>\n<pre><strong>...<\/strong>\r\n192.168.43.17  webmail.example.com<\/code><\/pre>\n<h2>Installing RainLoop<\/h2>\n<p>In order to install RainLoop, download its archive and extract the files to the RainLoop web root directory.<\/p>\n<h4>Create RainLoop web root directory<\/h4>\n<pre># mkdir \/var\/www\/html\/rainloop<\/code><\/pre>\n<\/div>\n<h4>Download RainLoop Webmail archive<\/h4>\n<pre># wget http:\/\/www.rainloop.net\/repository\/webmail\/rainloop-community-latest.zip<\/code><\/pre>\n<h4>Install RainLoop Application<\/h4>\n<p>To install RainLoop, extract the files from the archive and upload them to the RainLoop web root directory.<\/p>\n<pre># unzip rainloop-community-latest.zip -d \/var\/www\/html\/rainloop\/<\/code><\/pre>\n<h4>Configure proper permission for files and directories of the RainLoop<\/h4>\n<ul>\n<li>Set the read\/write permissions for all RainLoop application directories to 755 (<code>drwxr-xr-x<\/code>);<\/li>\n<\/ul>\n<pre># find \/var\/www\/html\/rainloop\/ -type d -exec chmod 755 {} \\;<\/code><\/pre>\n<ul>\n<li>Set the read\/write permissions for all RainLoop application files to 644 (<code>-rw-r--r--<\/code>);<\/li>\n<\/ul>\n<pre># find \/var\/www\/html\/rainloop\/ -type f -exec chmod 644 {} \\;<\/code><\/pre>\n<ul>\n<li>Change the ownership of the RainLoop Web root directory to <code>www-data<\/code>.<\/li>\n<\/ul>\n<pre># chown -R www-data.www-data \/var\/www\/html\/rainloop\/<\/code><\/pre>\n<h2>Configure a Server Block for RainLoop<\/h2>\n<p>After the installation, you need to create a server block configuration for RainLoop as shown below.<\/p>\n<pre><code># vim \/etc\/nginx\/sites-available\/rainloop.conf<\/code><\/pre>\n<pre>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<p>Create the RainLoop log directory as defined in the configuration file above.<\/p>\n<pre># mkdir \/var\/log\/rainloop<\/code><\/pre>\n<p>Once you are done with configuration, save the file and test for syntax errors;<\/p>\n<pre># 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<div class=\"span8\">\n<p>Since all is well, activate the RainLoop site configuration as shown\u00a0 below;<\/p>\n<pre># ln -s \/etc\/nginx\/sites-available\/rainloop.conf \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n<p>Reload Nginx Service to effect the changes above;<\/p>\n<pre># systemctl reload nginx<\/code><\/pre>\n<p>To verify that the RainLoop installation is fine, navigate to the browser and enter the URL <code>http:\/\/webmail.example.com\/?admin<\/code>. Where\u00a0<code>webmail.example.com<\/code> is the server&#8217;s hostname as configured on Nginx server name;<\/p>\n<p>If all is well, you should see RainLoop admin panel login page as shown below;<\/p>\n<p><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/11\/rainloop-admin-panel-login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1307 size-full\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/11\/rainloop-admin-panel-login.png\" alt=\"rainloop webmail admin-panel-login-page\" width=\"1280\" height=\"565\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/11\/rainloop-admin-panel-login.png 1280w, https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/11\/rainloop-admin-panel-login-768x339.png 768w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p>Congratulations !! You have successfully installed RainLoop Webmail client on Ubuntu 18.04. In our next tutorial, we will discuss <a href=\"https:\/\/kifarunix.com\/how-to-configure-rainloop-webmail-client-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noopener\">how to configure RainLoop webmail client<\/a>. Welcome around.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,64],"tags":[226,230],"class_list":["post-1232","post","type-post","status-publish","format-standard","hentry","category-howtos","category-ubuntu-18-04","tag-email-client","tag-rainloop","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1232"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=1232"}],"version-history":[{"count":11,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1232\/revisions"}],"predecessor-version":[{"id":1715,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1232\/revisions\/1715"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=1232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=1232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=1232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}