1. Home
  2. VPS
  3. DirectAdmin
  4. How to install Rainloop in DirectAdmin

How to install Rainloop in DirectAdmin

In this tutorial we will install Rainloop for DirectAdmin and making it available as the global webmail client on the server. We assume that you have root access and that you are logged in using SSH.

Download Rainloop

cd /var/www/html
wget https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip
unzip rainloop-community-latest.zip -d rainloop
chown -R webapps: rainloop
rm -rf rainloop-community-latest.zip

# Deny direct access to the data folder.
echo "order deny,allow
deny from all" >> rainloop/data/.htaccess

# Add an alias to DirectAdmin
cd /usr/local/directadmin/custombuild
mkdir custom
echo "rainloop=rainloop" >> custom/webapps.list
./build rewrite_confs

Deny access to the data folder

If you are using Nginx only, be sure to deny access to the data folder as described in the documentation. If you are using Apache with .htaccess support enabled, we have you covered.

Create a MySQL database

To use Rainloop to the fullest, you need to create a MySQL database and user.

RAINLOOPPW=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e "CREATE DATABASE rainloop;"
mysql --defaults-extra-file=/usr/local/directadmin/conf/my.cnf -e "GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLES,INDEX ON rainloop.* TO 'rainloop'@'localhost' IDENTIFIED BY '${RAINLOOPPW}';"


Note down the Rainloop MySQL password.

Configure Rainloop

  1. Go to https://servername.yourwebhoster.eu/rainloop/?admin
  2. Log in with the username admin and the password 12345
  3. Change the default password to prevent that anyone can access your computer.
  4. After changing the password, go to Contact and select MySQL as your storage method.
  5. Change the User to rainloop and the password to the earlier generated password.
  6. Click on Test. Rainloop will automatically store the settings if they are valid.
  7. Click on Enable contacts.
  8. Click on the Login tab and enter the servername as default domain. Also enable the “Try to determine user domain”.
  9. Head over to the Domains tab and unclick any of the listed domains.
  10. Click on Add Domain and enter the server hostname. To use the encryption, enter the name that is configured in the server certificate. Learn how to generate a free certificate for your DirectAdmin server.
  11. Repeat this step with the same settings but replace the name with a wildcard *:
  12. Now you can test to log in at your e-mail using Rainloop.

Configure Rainloop as default webmail client

Now that you have configured everything, test if Rainloop works for you. If so, you can make Rainloop the default client by changing the webmail_link value in /usr/local/directadmin/conf/directadmin.conf to rainloop:


And rebuild the configuration:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

Finishing up

You have now installed Rainloop as the main webmail client in DirectAdmin. To increase the security we advise to install two-factor authentication (2FA) and ReCaptcha.

Updated on October 23, 2017

Was this article helpful?

Related Articles