Rainloop Webmail on OpenBSD 6.9
- Network services
- Published
- 2 min read
- @nabbisen
Table of contents
Summary Summary

Rainloop (opens in a new tab) is a “simple, modern & fast web-based email client”, written in PHP (opens in a new tab). It’s also open source (opens in a new tab) licensed under AGPL v3 (opens in a new tab). I installed it in OpenBSD (opens in a new tab) server. It was really simple.
Environment Environment
- OS: OpenBSD 6.9
- Web server: OpenBSD httpd (opens in a new tab)
- App server: PHP-FPM (opens in a new tab) based on PHP 7.4
- Webmail: Rainloop 1.16
References References
Installation steps Installation steps
Get the package Get the package
First, get the latest package (opens in a new tab). There are two ways: its official website (opens in a new tab) or GitHub releases (opens in a new tab). Here, the former is adopted.
Prepare the document root:
$ cd /var/www
$ mkdir <rainloop-dir>
$ cd <rainloop-dir>
Get the package:
$ ftp https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip
unzip it:
$ # doas pkg_add unzip # do beforehand if necessary
$ unzip rainloop-community-latest.zip
You will see:
$ ls
data/ index.php rainloop/
Besides, all what to do in order to upgrade in the future will be to add “rainloop/v/<next-version>” and update “data/VERSION”.
Configure Configure
Set the permissions for App server to access “data/”:
$ doas chown -R www: data
Configure httpd server via httpd.conf (opens in a new tab):
$ doas nvim /etc/httpd.conf
Edit it like below. <fqdn> means the host aka “https:// some.domain /…”
Be careful not to allow web access to “data/”. location "/data/*" { block } is important.
server "<fqdn>" {
listen on $ext_addr tls port 443
tls {
certificate "/etc/ssl/*.pem"
key "/etc/ssl/private/*.key"
}
log {
access "<fqdn>-access.log"
error "<fqdn>-error.log"
}
root "/<rainloop-dir>"
directory index index.php
# security
location "*/.git*" { block }
## app specific (ref: https://www.rainloop.net/docs/permissions/ )
location "/data/*" { block }
# robots.txt
location "/robots.txt" { pass }
location "/*.php" {
fastcgi socket "/run/php-fpm.sock"
}
}Restart the daemon:
$ doas rcctl restart httpd
Finished.
Conclusion Conclusion
Now you can access the webmail via web browsers:

Well, custom domains are not allowed by default. It is able to configure them in the admin panel (opens in a new tab). Also, you must change admin id/password there.
More on: Run web, mail and federated services
-
Tor 🧅 provides highly private access 👯 to the Web ✨
-
OpenBSD develops and maintains their own web server called “httpd” under ISC license.
-
Lemmy is one of Fediverse implementations, which focuses on link aggregators.
OBSD Solutions
OBSD Solutions: OpenBSD consulting and support by Scqr, Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.