Self-hosted /e/ Cloud Services on CentOS 7

/e/ Cloud Services installation on CentOS 7

The installation instructions for ecloud-selfhosting refer to installation on Ubuntu. My laptop runs Fedora and my server OS of choice is CentOS, which are closely related RPM based distros. So I decided to try installing the services on CentOS and see how it goes. It was reasonably straight forward, here are the steps I took:

# Step 1: set up DNS records on your chosen domain per the standard installation instructions, and PTR for reverse DNS resolution

# bootstrap script uses a git argument not present in the old version of git in the CentOS repo. We'll use this 3rd party repo to install git 2.
yum -y install

# EPEL repo has certbot, among other useful packages
yum -y install epel-release

# Install Docker yum repo to get the newest version of Docker
yum-config-manager --add-repo

# Install dependencies
yum -y install git2u-all salt-minion bind-utils certbot

# bootstrap script expects these to be in place. NextCloud seems to have UID 33 hard-coded for the www-data user/group, so we have to set that explicitly.
mkdir /etc/salt/minion.d
groupadd -g 33 www-data
adduser -u 33 -g 33 www-data

# Install and start Docker
yum -y install docker-ce docker-compose
systemctl enable docker
systemctl start docker

# Disable and stop Postfix SMTP server which is running by default
systemctl disable postfix
systemctl stop postfix

# Check that ports 25, 80, 110, 143, 443, 587, 993, 995 are open in the firewall (HTTP ports required for Let's Encrypt SSL cert domain control validation!). Set in /etc/sysconfig/iptables or use firewall-cmd depending on the firewall you have enabled.

# Grab and run it

# Ignore the apt-get command not found warning, we already installed required deps from yum.

Once you have completed the bootstrap script, you should receive a welcome email with instructions to finish setting up your first mailbox, along with admin logins for nextcloud, rspamd and Postfix.Admin. Setup of my /e/ phone, Thunderbird and Nextcloud account in Fedora worked flawlessly first time.