Table of Contents
In this article, I will take you through the steps to install RainLoop Webmail on Ubuntu 20.04 LTS. RainLoop is a free and open source webmail with modern user interface and complete support of IMAP and SMTP protocols. It also provides easy integration with Social Media Platforms like Facebook, Google, Twitter and Dropbox. It is really easy to install RainLoop and can also be updated using minimal steps as and when required. More on RainLoop Official Documentation.
Other Important Features
- Simple Look and Feel Customization.
- Administrative Panel for Configuring Main Options.
- Extending functionality with plugins installed through admin panel.
- Perfect rendering of complex HTML mails.
- Configurable multi-level caching system.
- Autocompletion of e-mail addresses.
- Drag and Drops for mails and attachments.
- Keyboard Shortcuts Support.
- Minimalistic Resource Requirements.
How to Install RainLoop Webmail on Ubuntu 20.04 LTS
Also Read: How to Install Google Chrome Browser on Ubuntu 20.04 LTS
Step 1: Prerequisites
a) You should have a running Ubuntu 20.04 LTS
Server.
b) You should have sudo
or root
access to run privileged commands.
c) You should have apt
and curl
utility available in your System.
Step 2: Update Your System
Check for all the latest available updates using apt update
or apt-get update
command. If required, you can also upgrade all the packages using apt upgrade
or apt-get upgrade
command.
root@localhost:~# apt update
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Get:6 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [570 kB]
Hit:7 https://artifacts.elastic.co/packages/oss-7.x/apt stable InRelease
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,385 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [281 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.6 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [605 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [21.8 kB]
Step 3: Install Apache Server
RainLoop requires PHP and webserver like Apache or Nginx to run. Here we are going to use Apache webserver for our purpose. So to install Apache and all the PHP components you can use apt install apache2 php7.4 libapache2-mod-php7.4 php7.4-curl php7.4 xml
command as shown below. If you want you can use Nginx webserver as well. You can check more about this on Nginx documentation.
root@localhost:~# apt install apache2 php7.4 libapache2-mod-php7.4 php7.4-curl php7.4-xml
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libllvm11
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common php7.4-cli php7.4-common
php7.4-json php7.4-opcache php7.4-readline php7.4-curl php7.4-xml
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.4 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common
php7.4 php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline php7.4-curl php7.4-xml
0 upgraded, 17 newly installed, 0 to remove and 8 not upgraded.
Need to get 5,837 kB of archives.
After this operation, 25.9 MB of additional disk space will be used.
Step 4: Install RainLoop
There are multiple ways to install RainLoop webmail. You can either download the zip package and then extract and use the binary directly or you can also use tools like curl and wget to directly install from the installer package. For example, here we are using curl utility to install the package from RainLoop installer file. After installation, below command will generate index.php
file, rainloop
and data
directory in the current path.
root@localhost:~# curl -sL https://repository.rainloop.net/installer.php | php
[RainLoop Webmail Installer]
* Connecting to repository ...
* Downloading package ...
* Complete downloading!
* Installing package ...
* Complete installing!
* [Success] Installation is finished!
Step 5: Create Directory
Before proceeding with the apache configuration, you need to first create a directory called rainloop
under /var/www/
using mkdir /var/www/rainloop command.
root@localhost:~# mkdir /var/www/rainloop
Then move rainloop
, index.php
and data
directory from current path to /var/www/rainloop
using mv rainloop index.php data /var/www/rainloop
command as shown below.
root@localhost:~# mv rainloop index.php data /var/www/rainloop/
Step 6: Provide Permissions
Now go to /var/www/rainloop
directory using cd /var/www/rainloop
command.
root@localhost:~# cd /var/www/rainloop/
root@localhost:/var/www/rainloop#
Then find all the directories and modify its permission to 755
using find . -type d -exec chmod 755 {} \;
command. Similarly find all the files and modify its permission to 644
using find . -type f -exec chmod 644 {} \;
command as shown below.
root@localhost:/var/www/rainloop# find . -type d -exec chmod 755 {} \; root@localhost:/var/www/rainloop# find . -type f -exec chmod 644 {} \;
Then change the ownership of all the files and directories to user www-data and group www-data using chown -R www-data:www-data .
command as shown below. If you do not change the ownership then you might end up with [202] Data folder permissions error [is_writable]
.
root@localhost:/var/www/rainloop# chown -R www-data:www-data .
Step 7: Configure VirtualHost for RainLoop
In the next step, you need to configure a VirtualHost for RainLoop. For this, you need to create rainloop.conf
file under /etc/apache2/sites-available
directory using nano /etc/apache2/sites-available/rainloop.conf
command and then add the configuration information like ServerAdmin, DocumentRoot, ServerName, Directory etc. as shown below. You can also generate and install SSL certificate on Apache Web Server to enable secure communication. Check more about this on OpenSSL Tutorial: Generate and Install Certificate on Apache Server in 8 Easy Steps.
root@localhost:~# nano /etc/apache2/sites-available/rainloop.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/rainloop/
ServerName rainloop.example.com
<Directory /var/www/rainloop>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/rainloop_error
CustomLog /var/log/apache2/rainloop_access common
</VirtualHost>
Step 8: Reload Apache Configuration
Next step is to enable the RainLoop configuration using a2ensite rainloop
command.
root@localhost:~# a2ensite rainloop
Enabling site rainloop.
To activate the new configuration, you need to run:
systemctl reload apache2
Then activate the new configuration by using systemctl reload apache2
command as shown below.
root@localhost:~# systemctl reload apache2
Step 9: Open RainLoop UI
You can go to your favorite web browser and open URL http://rainloop.example.com/?admin
to go to RainLoop Webmail Login Page. Once it is opened, it should look like below. Here you need to use the default user admin
and password 12345
to login.
Once logged in, you should be redirected to below Admin Panel where you will see multiple Warning. The first warning talks about using the default admin password. To change the default password, you can either go to Security tab or you can just click on below shown change
password link which will redirect you to the Security tab.
Here you need to provide the current password first and then provide the new password you want to set. Then Click on Update Password
. This will fix the first warning. Similarly, you can work on other warnings also and then proceed with the further configuration.
With this, you have now successfully completed the steps to install RainLoop webmail on Ubuntu 20.04 LTS Server.