Skip to content

afatyoo/Initial-Setup-Carbonio

Repository files navigation

Initial Setup Script for Carbonio

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.

📂 Available Scripts

Ubuntu 22/24 — Single Server

Run directly on the target server. Configures locale, hostname, DNS (dnsmasq), chrony, optionally installs PostgreSQL 16, and sets up the Zextras repository.

Ubuntu 22/24 — Multi Server ⭐

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

🔧 Features

  • System update & upgrade

  • Locale configuration (en_US.UTF-8)

  • Hostname & /etc/hosts configuration (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)

🚀 Usage

Single Server (Ubuntu 22/24)

  1. 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

Multi Server (Ubuntu 22/24)

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

    1. 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>
  1. 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
  1. 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

RHEL 8/9

git clone https://github.com/afatyoo/Initial-Setup-Carbonio.git
cd Initial-Setup-Carbonio
chmod +x Initial-Setup-Carbonio-RHEL-8-9.sh
./Initial-Setup-Carbonio-RHEL-8-9.sh

🖥️ Example Multi-Server Layout

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 + Proxy

DNS MX record: afatyo.web.id → mail-labsc.afatyo.web.id

⚠️ Notes

  • 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.

About

This repository contains initial setup and pre-installation check scripts for installing Zextras Carbonio on RHEL (8/9) and Ubuntu 22/24 servers. The scripts help system administrators verify system requirements, dependencies, hostname/DNS configuration, firewall, and potential conflicts before running the actual Carbonio installation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages