These scripts are used to perform an initial setup before installing Zextras Carbonio on systems based on RHEL (8/9) and Ubuntu 22/24. The main goal is to ensure the environment meets the minimum requirements so the Carbonio installation can run smoothly.
Run directly on the target server. Configures locale, hostname, DNS (dnsmasq), chrony, optionally installs PostgreSQL 16, and sets up the Zextras repository.
Orchestrator script that sets up an entire multi-server Carbonio infrastructure from a single machine via SSH. Supports flexible node counts per role.
| Role | What Gets Configured |
|---|---|
LDAP |
dnsmasq (A records + MX), PostgreSQL 16, Zextras repo, chrony |
MTA |
Hostname, DNS → LDAP IP, Zextras repo, chrony |
Proxy |
Hostname, DNS → LDAP IP, Zextras repo, chrony |
Mailstore |
Hostname, DNS → LDAP IP, Zextras repo, chrony |
-
System update & upgrade
-
Locale configuration (
en_US.UTF-8) -
Hostname &
/etc/hostsconfiguration (all nodes aware of each other) -
DNS via dnsmasq on LDAP node — MX record points to MTA
-
Non-LDAP nodes point DNS resolver to LDAP IP
-
PostgreSQL 16 (LDAP node only)
-
Zextras repository setup on all nodes
-
Time sync via chrony (replaces systemd-timesyncd)
-
UFW firewall disable
-
SSH key-based orchestration (multi-server script)
-
Run directly on the target server as root
git clone https://github.com/afatyoo/Initial-Setup-Carbonio.git cd Initial-Setup-Carbonio chmod +x Initial-setup-ubuntu22-24.sh ./Initial-setup-ubuntu22-24.sh
Requirements:
-
SSH key access from the controller machine to all target servers (passwordless)
-
All target servers must be running Ubuntu 22.04 or 24.04
-
Run as root on all servers
-
Set up SSH key access to all servers (run once per server)
-
ssh-copy-id root@<LDAP_IP> ssh-copy-id root@<MTA_IP> ssh-copy-id root@<PROXY_IP> ssh-copy-id root@<MAILSTORE_IP>
-
Clone and run the orchestrator script from any machine with SSH access
git clone https://github.com/afatyoo/Initial-Setup-Carbonio.git cd Initial-Setup-Carbonio chmod +x setup-carbonio-ubuntu22-24-multi.sh ./setup-carbonio-ubuntu22-24-multi.sh
-
Follow the interactive prompts — provide domain, SSH user, and IP/hostname for each node
The script will:
-
Validate SSH connectivity to all servers before starting
-
Set up the LDAP node first (with dnsmasq + PostgreSQL)
-
Configure MTA, Proxy, and Mailstore nodes automatically via SSH
-
Print a summary table of all configured servers at the end
192.168.10.51 ldap-labsc.afatyo.web.id → LDAP + PostgreSQL + dnsmasq
192.168.10.52 mbox-labsc.afatyo.web.id → Mailstore
192.168.10.53 mail-labsc.afatyo.web.id → MTA + ProxyDNS MX record: afatyo.web.id → mail-labsc.afatyo.web.id
-
These scripts do not install Carbonio, they only prepare the environment.
-
Run the scripts as root or with
sudo. -
For multi-server setup, ensure SSH key authentication is configured before running the script.
-
It is recommended to run on a fresh server installation to avoid conflicts.
-
After running the script, proceed with Carbonio installation following the official Zextras documentation.