How to Install RainLoop Webmail on Debian 11

RainLoop is a free, open-source web-mail client for the desktop that integrates a talk-to-text service. It is designed to work as an interface to regular IM programs like AOL and Windows Live Messenger. RainLoop is a web-based application that can be run with most browsers and it takes only a few seconds to start up.


  • Email – Rainloop comes preconfigured with all the major POP3/IMAP servers you might want to use. You don’t need to configure them separately; they’re ready when you start using Rainloop.
  • Calendar – Add multiple calendars from popular calendaring software (iCal, Google Calendar, etc) into Rainloop.
  • Contacts – See who’s on your contacts list, view their contact information, add new people, search for people by name or location, add notes about each person, etc.
  • Tasks – Manage tasks easily in Rainloop. Add tasks quickly from Outlook Express, Microsoft Outlook, Apple Mail, Mozilla Sunbird, Firefox, Eudora Pro, Netscape Communicator, Opera Mail, or any other application that supports the standard GTD task model.
  • Notes – Share ideas, thoughts, links, and more. Create and edit text files, HTML documents, formatted RTF documents, images, PDFs, MP3s, and much more.
  • News – Read news feeds from RSS 2.0 compliant websites such as Bloglines, Digg, Reddit, Slashdot, Yahoo! Buzz, etc.
  • Search – Quickly find emails based on keywords, labels, subjects, sender, receiver, date range, and many other criteria.
  • Web browsing – Browse through pages of your choice using built-in proxy support.
  • Chatting – Use Rainloop as a chat client for AIM, MSN Messenger, Jabber, ICQ, IRC, and more.
  • Screen sharing – Remotely share your screen, webcam, or microphone with friends and family.
  • Importing – Rainloop provides a simple way to import PST files and mbox format archives created by another program like Thunderbird, Evolution, Entourage, Kontact, etc.
  • Automatic updates – When a new version becomes available, Rainloop will automatically download the update without requiring user intervention.

In this step-by-step guide, you’ll learn how to configure, install, and use Rainloop as a webmail client.


To install Rainloop properly, you should have:

  • A fully qualified domain name (FQDN) pointing to your server and a dedicated SSL certificate for that FQDN.
  • A fresh installation of Debian 10 or Debian 11 on your server with root access.
  • A properly configured Apache2 web server with SSL enabled by default.
  • A minimum of 2 GB of RAM, 20 GB of hard disk, and 2 GHz processor or higher.

Updating your system.

You need to update your system to support all the new TLS 1.2 and SSL protocols for your Rainloop webmail client.

Run the following command to update your system package index.

sudo apt update && apt upgrade -y

Installing Nginx

Nginx is in the LEMP stack, which means that it uses Linux, Nginx, MariaDB, and PHP. Linux is used to handle the back-end server operations. Nginx is the load balancer, load-balancer and front-end proxy. MariaDB is the database engine. PHP is used to run your Rainloop webmail application.

Nginx is one of the best web servers out there, and it is used by a large percentage of the top 10,000 most visited websites in the world. You will use Nginx as a reverse proxy server to forward all incoming HTTP requests to your Rainloop webmail client.

Run the sudo apt install nginx -y command to install Nginx on your server.

sudo apt install nginx -y

Install Nginx

Run the sudo service nginx status command to verify that Nginx is installed and running.

sudo service nginx status

You should get active (running) systax as the output from this command. If you don’t, go back and install Nginx again until you get the active output.

Check Nginx status

For double-checking, open your favorite web browser and go to http://your-ip-address. You should get the default Nginx page with the latest version of the Nginx software, which will be displayed on the screen. This means that your Nginx installation was successful and is working properly.

Nginx page

Installing MariaDB

For your Rainloop webmail application, you need a database engine that can handle the large amounts of data you will send back and forth to it. MariaDB is a very popular open-source alternative to MySQL, which is often used because it is more lightweight, faster, and easier to use than MySQL

Run the sudo apt install mariadb-server -y command to install MariaDB on your server.

sudo apt install mariadb-server -y

Install MariaDB

Once the installation is complete, run the sudo mysql_secure_installation command to secure your MySQL instance. The “mysql_secure_installation” script is a security feature that will perform certain actions to secure your MariaDB server.


You will be asked to enter the root password for your MariaDB database instance. This is your first time setting a password for your MySQL root user, so hit Enter to continue.

You will be asked if you want to set a root password. Enter Y to continue. Provide a strong password that only you can remember. Hit Enter.

Secure MySQL installation

For the remaining questions, type Y and hit Enter to confirm each of the questions.

Securing MariaDB

Type the command below to restart MariaDB. This will make sure that all the changes have taken effect.

sudo service mariadb restart

Run the sudo systemctl status mariadb command to check whether MariaDB is running or not.

sudo systemctl status mariadb

You will get the output “Active: active (running) since … in state” as the output from this command. This means that your MariaDB database instance is running and listening for requests.

MariaDB status

Installing PHP

PHP is short for PHP: Hypertext Preprocessor. A PHP-based service can be easily embedded into HTML pages, thus enabling you to interact with your MySQL database from a website. It is one of the most popular web development languages out there.

RainLoop requires PHP 5.5+ and many of the PHP extensions to work properly. This demo uses PHP 7.3+.

Run the commands below to install PHP 7.3 and its modules on your server.

sudo apt install php -y
sudo apt install php-cli php-fpm php-curl php-json php-mbstring -y
sudo apt install php-common php-xml unzip -y

Once the installation is complete, open the /etc/php/7.3/fpm/php.ini file in your favorite editor.

sudo nano /etc/php/7.3/fpm/php.ini

On Debian 11, use this command:

sudo nano /etc/php/7.4/fpm/php.ini

Edit the following lines in the /etc/php/7.3/fpm/php.ini file as follows:



Save and close the php.ini file when you are done and restart PHP on your server to make sure all the changes take effect.

sudo service php7.3-fpm restart

On Debian 11, use:

sudo service php7.4-fpm restart

Creating a Database for RainLoop

RainLoop uses databases to store your user’s data and logins. You will need a database for RainLoop to work properly.

Run the command below to log into your server’s MariaDB shell with the root user. Enter your root password and hit Enter to continue.

sudo mysql -u root -p

Run the CREATE DATABASE rainloopdb; command to create a new MariaDB database named rainloopdb. This database will store all the user data, logs, and login information. Remember to put the ; semicolon at the end of every SQL query.


Run the commands below to create a new user in your database, with a username of rainloopuser and a password of password123. Replace password123 with any password that you want. Be sure to use a strong password that is used only once on your server.

CREATE USER 'rainloopuser'@'localhost' IDENTIFIED BY 'password123';

Run the GRANT ALL ON rainloopdb.* TO ‘rainloopuser’@‘localhost’; command to grant all privileges on the database to your newly created user.

GRANT ALL ON rainloopdb.* TO 'rainloopuser'@'localhost';

Run the FLUSH PRIVILEGES; command to reload the privileges that you have just granted. This ensures that your user has full access to the database.


Finally, run the exit; command to log out of your MariaDB shell.


Create database for RainLoop

We have successfully created a new database named rainloopdb, and a user named rainloopuser with password “password123” who has full access to all the data and tables in our new database. Now we can move on to installing RainLoop.

Installing RainLoop

For this demo, we will download and install RainLoop for the community from its official website. You can get the latest build of RainLoop this way.

Run the command below to download RainLoop to your web root directory.

mkdir /var/www/rainloop && wget

Next, we will extract the contents of the file to our web root directory. This will create a new directory named rainloop-community-x.x.x

unzip -d /var/www/rainloop

Unpack rainLoop source

Finally, we need to set the proper permissions to the newly-created directory. The easiest way to do this is by using the chown and chmod commands.

sudo chown -R www-data:www-data /var/www/rainloop && sudo chmod -R 775 /var/www/rainloop

Creating Virtual Host for RainLoop

A Virtual Host is a setting in Nginx, the web server used in this tutorial, allowing multiple domains to run on the same server. This way we can save money and resources by hosting multiple websites on a single server.

Hosts allow you to specify which domain names point to which directory on your computer and how you want to process them – for example, whether you want all requests for a domain name sent to a specific PHP script (e.g. “index.php”) or you want them forwarded to a different script (e.g., “default.php”). There are two types of hosts: “global” and “location.” Global hosts are the standard type that is recognized by Apache, whereas Nginx uses location-based hosts.

Open an etc/nginx/sites-available/rainloop.conf file in your favorite text editor. a

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

Add the following lines of code to the /etc/nginx/sites-available/rainloop.conf file. replace with your actual domain.

server {
listen 80;
root /var/www/rainloop;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;

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

location ~ /\.ht {
deny all;

location ^~ /data {
deny all;

Save and close the file when you are done editing it.

On Debian 11, replace php7.3-fpm with php7.4-fpm in the above file.

Run the ln -s /etc/nginx/sites-available/rainloop.conf /etc/nginx/sites-enabled command to create a symlink and enable the virtual host. This will configure port 80 on your server to serve all URLs from the “rainloop” domain root with HTTP protocol.

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

Run the nginx -t command to test that everything is configured properly.

nginx -t

You will get the following output.

Test nginx config

Finally, run the systemctl restart nginx command to restart the Nginx web server to ensure your changes take effect.

sudo systemctl restart nginx

Accessing the Administration Control Panel Web UI

Now that we have finished installing RainLoop, we can access the built-in PHP control panel by visiting the URL in your browser.

You will get a login screen that looks like the one below. Enter the default username and password: admin/12345. Click on the > icon to log in.

RainLoop Login

Once logged in, you will see the administration control panel, where you can manage your user accounts and modify your settings.

RaunLoop Dashboard


In this tutorial, we have installed a secure, robust, and reliable security-centered webmail service using PHP and MySQL. We have correctly selected the right web server to meet our specific needs and ensure that we have a stable and manageable setup going forward.

You should now have a fully functional installation of RainLoop. For further information on the RainLoop software, you can visit its official website.