High-availability systems need cluster software before they can coordinate recovery. The Pacemaker, Corosync and pcs packages install this software and the pcsd management service; node configuration, fencing and failover setup follow separately.
In a typical high-availability setup, Corosync provides cluster membership and messaging, Pacemaker manages resources and recovery decisions, and pcs supplies a consistent CLI for configuration and monitoring. The pcsd daemon handles remote management requests from pcs and supports authentication with the local hacluster account.
Ubuntu and Debian maintain these packages in their distribution APT repositories, with versions that differ by release. Each intended node needs its own installation and compatible package versions. A firewall must permit management and node messaging only from the relevant trusted hosts.
Package installation can start pcsd automatically on TCP port 2224, exposing cluster administration before a manual service start. Active firewall protection must already restrict access to trusted peer nodes and explicitly authorized administration hosts before installation. Firewall changes must preserve existing remote-administration access to avoid lockout.
Steps to install Pacemaker, Corosync and pcs on Ubuntu or Debian:
- Check each node's active firewall protection before installation.
$ sudo ufw status verbose
The UFW path requires Status: active, a default deny policy for incoming traffic, and no broader allow rules that admit untrusted sources to the cluster ports. If UFW is inactive or unused, another active host or network firewall must already enforce equivalent trusted-source filtering before installation. The rules assume outgoing traffic is allowed; a restrictive outgoing policy also needs matching peer destinations.
- Allow pcsd TCP connections from each peer's management address when UFW is active.
The two-node example uses 192.0.2.11 for node1 and 192.0.2.12 for node2, with one address per node for management and the cluster link. The command shown is for node1; on node2 the source is 192.0.2.11. Actual rules need your peer addresses, with one rule per peer. A separate administration host needs only its own source-restricted TCP 2224 rule.
$ sudo ufw allow proto tcp from 192.0.2.12 to any port 2224
- Allow Corosync UDP traffic from each peer's cluster-link address for a single-link knet configuration.
$ sudo ufw allow proto udp from 192.0.2.12 to any port 5405
On node2, the source is node1's cluster-link address, 192.0.2.11. A single default knet link uses UDP 5405; additional links or a custom port need rules matching their configuration. Cluster messaging access is for peer nodes, not administration clients. TCP 3121 for Pacemaker Remote and TCP 21064 for DLM are unnecessary for this installation. Active UFW applies these rules immediately.
- Update the apt package index on each intended node with sudo access.
$ sudo apt update
- Install the cluster packages on each node.
$ sudo apt install --assume-yes pacemaker corosync pcs
The installation provides pcsd and the local hacluster account. For RPM-based systems, use the separate installation procedure.
- Start the pcsd service on each node.
$ sudo systemctl start pcsd
pcsd provides the management API used by pcs and listens on TCP port 2224 by default.
- Enable pacemaker, corosync and pcsd to start on boot.
$ sudo systemctl enable pacemaker corosync pcsd
corosync and pacemaker still need a cluster configuration before they can operate together.
- Set the local hacluster password on each node.
This account can authorize powerful cluster-management operations, so its password must remain confidential.
$ sudo passwd hacluster New password: Retype new password: passwd: password updated successfully
Each target node needs a usable account password for password-based authentication. Passwords may differ when nodes are authenticated separately; using one password merely simplifies a single multi-node authentication command.
- Verify that pcsd is enabled and running on each node.
$ sudo systemctl status pcsd --no-pager ● pcsd.service - PCS GUI and remote configuration interface Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled; preset: enabled) Active: active (running) since Thu 2026-11-05 16:08:47 +08; 4min 15s ago ##### snipped #####enabled and active (running) confirm the management service is ready. Node authentication, cluster creation, fencing and resources are separate from package installation.