How to Install RainLoop on Ubuntu 20.04

install rainloop ubuntu 20.04

In this tutorial, we’ll be showing you how to quickly install the RainLoop email client on your Ubuntu 20.04 VPS, including instructions for both Apache and Nginx setup.

installing rainloop on ubuntu 20.04

RainLoop Webmail is a simple, modern, and fast web-based email client. Written in PHP, RainLoop provides an easy way to check your emails using your web browser. It comes with full support of both IMAP and SMTP protocols (SSL, STARTTLS), sieve scripts support, integration with Facebook, Google, Twitter, and Dropbox, a multi-level caching system, plugin support, keyboard shortcut support, and many other additional features.

The installation is very simple. If you follow our instructions carefully, you can finish the RainLoop Webmail installation in less than 10 minutes. Let’s get started.

Requirements:

  • For the purposes of this tutorial, we will be using an Ubuntu 20.04 VPS.
  • You will also need a working LAMP or LEMP (Linux, Apache/Nginx, MySQL, PHP) stack.
  • Full SSH root access or a user with sudo privileges is also required.

Step 1: Connect to Your Server

Before we begin with the installation, you will need to connect to your server via SSH as the root user or as any other user that has sudo privileges.

To connect to your server as the root user, use the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

Make sure to replace IP_ADDRESS and PORT_NUMBER with your actual server IP address and SSH port number.

Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt update
sudo apt upgrade

You could even restart your VPS just to ensure that all packages that are being used are the ones that we just updated.

Step 2: Install RainLoop Webmail

There are two RainLoop Webmail editions available for download: Community Edition (under the AGPL v3 license) and Standard Edition (under the RainLoop software license).

For the purposes of this tutorial, we will install the free and open-source community edition.

To download the latest RainLoop Webmail community version, run the following command:

wget http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip

Next, let’s create a new directory for our RainLoop webmail installation. In our example, we will use /var/www/rainloop, but you can also choose a different location.

To create the rainloop directory, run the following command:

sudo mkdir /var/www/rainloop

To extract the files into this new directory, run the following command:

unzip rainloop-community-latest.zip -d /var/www/rainloop

Step 3: Set Permissions

Once the installation is completed, you will need to set the correct file and directory permissions.

To set the proper read/write permissions, run the following commands:

cd /var/www/rainloop
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

The owner of the files needs to be the user of the web server running on your system. In our example, we are using the Apache web server and Apache runs under the “www-data” user on Ubuntu. To change the owner of the files, you can then run the following commands:

cd /var/www/rainloop
chown -R www-data:www-data .

The same user should also apply in case you’re using Nginx.

Step 3: Configure Apache/Nginx

In this step, we will show you how to create a virtual host file in Apache or Nginx – the procedure depends on which web server you have running on your system. This is so that you can access your RainLoop installation from your browser.

Configuring Apache

Create the virtual host file by executing the following command:

nano /etc/apache2/sites-available/rainloop.conf

Then enter the following information:

<VirtualHost *:80>
  ServerName webmail.mydomain.com
  DocumentRoot "/var/www/rainloop/"

  ErrorLog "/var/log/apache2/rainloop_error_log"
  TransferLog "/var/log/apache2/rainloop_access_log"

  <Directory />
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
    Require all granted
  </Directory>

  <Directory /var/www/rainloop/data>
    Options -Indexes
    Deny from all
  </Directory>
</VirtualHost>

In our example, we decided to use a subdomain called webmail.mydomain.com for accessing our RainLoop. Make sure to replace mydomain.com with your actual domain name.

To enable the new RainLoop virtual host, run the following command:

a2ensite rainloop.conf

You should see the following output:

Enabling site rainloop.
To activate the new configuration, you need to run:
systemctl reload apache2

Reload your Apache in order to activate the new configuration:

systemctl reload apache2

That’s it – your Apache configuration is complete.

Configuring Nginx

Create the virtual host file by executing the following command:

nano /etc/nginx/sites-available/rainloop.conf

Insert the following contents in that file:

server {
  listen 80;

  server_name webmail.mydomain.com;
  root /var/www/rainloop;

  index index.php;
  
  access_log /var/log/nginx/rainloop_access.log;
  error_log /var/log/nginx/rainloop_error.log;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~ \.php$ {
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_keep_conn on;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
  location ~ /\.ht {
    deny all;
  }

  location ^~ /data {
    deny all;
  }
}

In our example, we decided to use a subdomain called webmail.mydomain.com for accessing our RainLoop instance. Make sure to replace mydomain.com with your actual domain name.

To enable the server configuration that we just created, run the following command:

ln -s /etc/nginx/sites-available/rainloop.conf /etc/nginx/sites-enabled/rainloop.conf

To check for any Nginx configuration errors, run the following command:

nginx -t

If there are no errors, you should get the following output:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

You can now reload Nginx in order to activate the new configuration:

systemctl reload nginx

Step 4: Accessing RainLoop Webmail

To access your RainLoop Webmail admin panel, open your browser and enter http://webmail.mydomain.com/?admin (replace this with the actual domain name you used in your web server configuration).

The default admin login credentials are:

Username: admin
Password: 12345
install rainloop on ubuntu 20.04

You will be taken to the RainLoop admin panel, from which you can manage your RainLoop setup and configure your email server settings. It is also highly recommended to change your admin password as soon as you log in.

Congratulations! You have successfully installed RainLoop Webmail on your Ubuntu 20.04 VPS.


rainloop installation on ubuntu 20.04

Keeping track of your email server and maintaining it is vital to most businesses. A client is useless without a reliable email server. With our managed Ubuntu hosting, we can manage and maintain all aspects of your email chain with ease. This saves you the trouble of debugging any current and future issues, and it frees up your time to be more productive. This full support is included with our VPSes and never expires.

If this tutorial helped you set up RainLoop on your Ubuntu VPS, we’d greatly appreciate you telling us your install experience in a comment down below. You can also share this post online by using our share shortcuts to help spread the word.

1 thought on “How to Install RainLoop on Ubuntu 20.04”

Leave a Comment