1 December 2026
Installing and Configure Puppet Server & Agent

Installing and Configure Puppet Server & Agent

This guide installs Puppet Server 7 on RHEL 8 or CentOS 8, installs the Puppet agent on RHEL and Ubuntu nodes, and connects each agent to the server by signing its certificate. The original steps are shown first. Below them you’ll find corrected commands, a first manifest to test the setup, and fixes for the errors people run into most often.


Setting up Puppet Server in RHEL 8 / CENTOS 8

Setting up Puppet Agent in Linux

Configure Puppet Agent with Server


How the setup works and what you need

Puppet uses a client-server model. The Puppet Server compiles catalogs and also acts as the certificate authority (CA). Each agent sends the server a certificate signing request. After the request is signed, the agent connects over HTTPS on TCP port 8140, sends its facts, gets back a catalog and applies it. By default the agent repeats this every 30 minutes.

Requirement Why it matters
Server: 2 vCPU and at least 2–4 GB RAM Puppet Server runs on the JVM. It starts with a 2 GB heap by default, so it may not start on smaller VMs.
Name resolution for every node Agents look for the server by name (puppet by default). Certificates are bound to hostnames.
Synchronised clocks (chrony/NTP) If the clocks are too far apart, SSL validation fails because certificates look not yet valid or already expired.
Port 8140/tcp open on the server All agent-to-server traffic uses this port.
Root or sudo access Puppet settings, certificates and services live in system paths.
Same Puppet major version on server and agents Mixing versions (for example Puppet 6 agents with a Puppet 7 server) is a common cause of avoidable problems.

Note: Set the final hostname before the first start of puppetserver. On first start the server creates its CA and its own certificate from the current hostname. If you rename the host afterwards, you will need to regenerate those certificates.

Corrected Puppet Server installation (RHEL 8 / CentOS 8)

This version of the server steps adds what the gist leaves out: time sync, a firewall rule, enabling the service at boot, and an optional heap adjustment for small lab VMs. Run each command with sudo, or as root.


sudo hostnamectl set-hostname puppet
echo '20.163.145.158  puppet' | sudo tee -a /etc/hosts
echo '172.173.236.231 agent1' | sudo tee -a /etc/hosts


sudo dnf install -y chrony
sudo systemctl enable --now chronyd


sudo rpm -Uvh https:
sudo dnf install -y puppetserver


sudo sed -i 's/-Xms2g -Xmx2g/-Xms1g -Xmx1g/' /etc/sysconfig/puppetserver


sudo firewall-cmd --permanent --add-port=8140/tcp
sudo firewall-cmd --reload


sudo systemctl enable --now puppetserver


source /etc/profile.d/puppet-agent.sh
puppetserver -v
sudo systemctl status puppetserverCode language: PHP (php)

The first start can take a minute or more while the JVM warms up. When the server is ready, systemctl status shows active (running) and port 8140 is listening. You can check the port with sudo ss -tlnp | grep 8140.

Note: On RHEL, the secure_path setting for sudo does not include /opt/puppetlabs/bin. As a result, sudo puppetserver ... or sudo puppet ... often fails with command not found. Run these commands with the full path, for example sudo /opt/puppetlabs/bin/puppetserver, or from a root shell after sourcing the profile script.

Corrected Puppet agent installation (RHEL and Ubuntu)

Install the agent from the same Puppet major version as the server. The original installs Puppet 6 on RHEL 7 and on Ubuntu 18.04 (bionic). Puppet 6 is end of life and so is Ubuntu 18.04, so both are replaced below.


sudo hostnamectl set-hostname agent1
sudo rpm -Uvh https:
sudo dnf install -y puppet-agent


sudo rpm -Uvh https:
sudo yum install -y puppet-agent


wget https:
sudo dpkg -i puppet7-release-jammy.deb
sudo apt-get update          
sudo apt-get install -y puppet-agentCode language: PHP (php)

Don’t start the puppet service yet. The original starts and enables it straight after installation, before the server is configured or the certificate is signed. The agent then begins retrying in the background, which makes the first manual run harder to follow. Configure and bootstrap first, as described in the next section, and then enable the service.

Connecting the agent and signing its certificate

  1. On the agent, as root, point it at the server: sudo /opt/puppetlabs/bin/puppet config set server puppet --section main. If you run this without root, the setting goes into the user’s ~/.puppetlabs config, and the system agent never reads it.
  2. Request a certificate: sudo /opt/puppetlabs/bin/puppet ssl bootstrap. This command waits and retries until the request is signed, so leave it running.
  3. On the server, list pending requests: sudo /opt/puppetlabs/bin/puppetserver ca list.
  4. Sign the request using the exact certname shown in the list: sudo /opt/puppetlabs/bin/puppetserver ca sign --certname agent1.
  5. Back on the agent, puppet ssl bootstrap finishes on its own. Then run the agent once in the foreground: sudo /opt/puppetlabs/bin/puppet agent -t.
  6. Enable the background service only now: sudo systemctl enable --now puppet.
$ sudo /opt/puppetlabs/bin/puppetserver ca list
Requested Certificates:
    agent1       (SHA256)  3B:9A:...:F1

$ sudo /opt/puppetlabs/bin/puppetserver ca sign --certname agent1
Successfully signed certificate request for agent1Code language: PHP (php)

The certname defaults to the agent’s FQDN. If the host has a DNS domain, the request appears as something like agent1.example.com, and you must sign that full name.

Verify with a first manifest

A fresh server has no code, so the first agent run applies an empty catalog. To confirm the whole chain works, add a small manifest on the server:


node default {
  file { '/tmp/puppet-was-here':
    ensure  => file,
    content => "Managed by Puppet\n",
  }
}Code language: PHP (php)
$ sudo /opt/puppetlabs/bin/puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for agent1
Info: Applying configuration version '1732999999'
Notice: /Stage[main]/Main/Node[default]/File[/tmp/puppet-was-here]/ensure: defined content as '{sha256}...'
Notice: Applied catalog in 0.03 seconds

$ cat /tmp/puppet-was-here
Managed by PuppetCode language: JavaScript (javascript)

Run the agent a second time and no changes should be reported. That means the node is in the desired state. Exit code 2 from puppet agent -t means changes were applied, 0 means nothing changed, and 4 or 6 means some resources failed.

Common errors and fixes

Symptom Likely cause Fix
puppetserver fails to start, or journal shows OutOfMemoryError / killed Default 2 GB heap is larger than the VM can provide Lower -Xms/-Xmx in /etc/sysconfig/puppetserver (RHEL) or /etc/default/puppetserver (Debian/Ubuntu), then restart
Connection refused or timeout on port 8140 Service not running or firewall blocking systemctl status puppetserver; open 8140/tcp with firewall-cmd; test with curl -k https://puppet:8140
Could not resolve 'puppet' / getaddrinfo errors Missing DNS or /etc/hosts entry Add the server entry on every agent, or set server to the server’s real FQDN
certificate verify failed or certificate not yet valid Clock skew, or stale certificates after a rename or rebuild Fix time sync. On the server, run puppetserver ca clean --certname agent1. On the agent, run puppet ssl clean, then bootstrap again
sudo: puppet: command not found /opt/puppetlabs/bin is not in sudo’s secure_path Use full paths, or work from a root shell
Agent request never shows in ca list Agent is using a different server or config file Run sudo /opt/puppetlabs/bin/puppet config print server certname --section agent

For deeper troubleshooting, the debug commands at the end of the gist work as written with open source Puppet, even though the comment there mentions PE. Use --http_debug for connection problems and --evaltrace to see how long each resource takes.

Best practices and security notes

  • Check the fingerprint before you sign a request. Compare it with the output of puppet ssl verify or the request fingerprint shown on the agent.
  • Avoid autosign = true in production. If you need automation, use a policy-based autosign script, or an autosign.conf limited to trusted name patterns on a trusted network.
  • Use real FQDNs and DNS rather than /etc/hosts once you have more than a few nodes. Hosts files tend to drift out of sync.
  • Keep Puppet code in Git and deploy it to /etc/puppetlabs/code/environments with a tool such as r10k. Don’t edit site.pp directly on the server.
  • Pin the same major version on the server and the agents, and upgrade the server first.
  • Revoke and clean the certificates of decommissioned nodes with puppetserver ca clean --certname <name> so they can no longer connect.

Note: Since 2025, Perforce has changed how open source Puppet packages are distributed. Newer builds are published through a separate channel with its own terms. The community also maintains a fully open source fork called OpenVox. Before you build new infrastructure on the yum.puppet.com and apt.puppetlabs.com repositories used above, check what they currently provide.

Frequently asked questions

Which port does Puppet Server use?

Puppet Server listens on TCP port 8140. Agents connect to it over HTTPS, so open that port on the server’s firewall and on any network security groups in between.

How do I re-sign a Puppet agent certificate after rebuilding the node?

On the server, run puppetserver ca clean --certname <agent>. On the agent, run puppet ssl clean. Then run puppet ssl bootstrap on the agent again and sign the new request on the server.

How often does the Puppet agent apply configuration?

When the puppet service is running, the agent checks in every 30 minutes by default. Change this with the runinterval setting in puppet.conf. To trigger a run straight away, use puppet agent -t.

Can a Puppet 6 agent connect to a Puppet 7 server?

Older agents can often talk to a newer server, but it is not a supported long-term setup. Puppet 6 is also end of life, so install the same major version on the agents as on the server.

Why does puppetserver fail to start on a small VM?

Puppet Server is a JVM application, and by default it reserves a 2 GB heap. On a VM with 2 GB of RAM or less, lower the -Xms and -Xmx values in /etc/sysconfig/puppetserver and restart the service.

Related tutorials

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Jasa Backlink

Download Anime Batch