Need to migrate your e-mails to a new server? Free and paid versions of our online tool available.
Hero Image

Server Setup Guides

Configure Firewall on RHEL 9

Configure firewalld on RHEL 9

Status

systemctl status firewalld
firewall-cmd --state
firewall-cmd --list-all

Allow common services

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --ad...
7th May 2026

Configure OpenSMTPD on RHEL 9

Configure OpenSMTPD on RHEL 9

Install

# OpenBSD – built-in:
rcctl enable smtpd && rcctl start smtpd

# Other platforms:
# Ubuntu/Debian:
apt install opensmtpd
# AlmaLinux/RHEL:
dnf install opensmtpd
# Arch:
pacman -S opensmtpd

Basic /etc/mail/smtpd.conf

pki mail.example.com cert "/etc/ssl/m...
7th May 2026

Enable TLS/SSL on Apache – RHEL 9

Enable TLS/SSL on Apache – RHEL 9

Step 1 – Enable mod_ssl

dnf install -y mod_ssl && systemctl restart httpd

Step 2 – Generate self-signed certificate

openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
    -keyout /etc/ssl/private/apache-selfsigned.key \
    -out /etc/ssl/certs/apache-self...
7th May 2026

Enable TLS/SSL on Nginx – RHEL 9

Enable TLS/SSL on Nginx – RHEL 9

Step 1 – Self-signed certificate (testing)

openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
    -keyout /etc/ssl/private/nginx-selfsigned.key \
    -out /etc/ssl/certs/nginx-selfsigned.crt \
    -subj "/CN=example.com"
openssl dhparam -out /etc/ssl/certs/dhp...
7th May 2026

HAProxy TLS Termination on RHEL 9

HAProxy TLS Termination on RHEL 9

Step 1 – Combine cert + key

cat /etc/ssl/certs/example.com.crt /etc/ssl/private/example.com.key > /etc/haproxy/certs/example.com.pem
chmod 600 /etc/haproxy/certs/example.com.pem
openssl dhparam -out /etc/haproxy/dhparam.pem 2048

Step 2 – Config

global
    ss...
7th May 2026

Harden SSH on RHEL 9

Harden SSH on RHEL 9

Back up config

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

Key settings (/etc/ssh/sshd_config)

Port 2222
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
AllowUsers deploy alice
Protocol 2
ClientAliveInterval 600
ClientAliveCountMax 0
X11Forwa...
7th May 2026

Install Apache HTTP Server on RHEL 9

Install Apache HTTP Server on RHEL 9

Step 1 – Install

subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install -y httpd mod_ssl
systemctl enable --now httpd

Step 2 – Open firewall ports

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --ad...
7th May 2026

Install Docker on RHEL 9

Install Docker on RHEL 9

Step 1 – Install

dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable --now docker

Step 2 – Add user to docker group

usermod -aG docker $USER...
7th May 2026

Install Fail2Ban on RHEL 9

Install Fail2Ban on RHEL 9

Step 1 – Install

subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install -y fail2ban
systemctl enable --now fail2ban

Step 2 – /etc/fail2ban/jail.local

[DEFAULT]
bantime  = 3600
findtime = 600
maxretry = 5
banaction = iptables-mult...
7th May 2026

Install Gitea on RHEL 9

Install Gitea on RHEL 9

Step 1 – Create git user and download binary

useradd -r -m -d /home/git -s /bin/bash git
VERSION=1.22.0
wget -O /usr/local/bin/gitea https://dl.gitea.com/gitea/${VERSION}/gitea-${VERSION}-linux-amd64
chmod +x /usr/local/bin/gitea

Step 2 – Directories

mkdir -p /var/lib...
7th May 2026