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.
Features:
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:
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
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
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.
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.
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
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.
mysql_secure_installation
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.
For the remaining questions, type Y and hit Enter to confirm each of the questions.
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.
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:
Before:
After:
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
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.
CREATE DATABASE rainloopdb;
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.
FLUSH PRIVILEGES;
Finally, run the exit; command to log out of your MariaDB shell.
exit;
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.
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 http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip
Next, we will extract the contents of the rainloop-community-latest.zip file to our web root directory. This will create a new directory named rainloop-community-x.x.x
unzip rainloop-community-latest.zip -d /var/www/rainloop
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
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 your-domain.com with your actual domain.
server {
listen 80;
server_name rainloop.your-domain.com;
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.
Finally, run the systemctl restart nginx command to restart the Nginx web server to ensure your changes take effect.
sudo systemctl restart nginx
Now that we have finished installing RainLoop, we can access the built-in PHP control panel by visiting the URL http://rainloop.your-domain.com 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.
Once logged in, you will see the administration control panel, where you can manage your user accounts and modify your settings.
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.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…