Posted On 23.01.2026

Puppet with Foreman – Installation

0 comments
confdroid.com >> blog >> Puppet with Foreman – Installation

Getting Started: Installing Your First Puppet Server with Foreman in Under 30 Minutes

In previous posts, we covered the basics of Puppet and the typical infrastructure components needed to run it effectively. If that sounded like a lot of setup work, here’s the good news: with a suitable virtual machine and a few straightforward commands, you can have a fully functional Puppet environment — complete with Foreman as the web interface and External Node Classifier (ENC) — up and running in about half an hour. This guide walks through installing Puppet 8 together with Foreman 3.17 (or a later compatible version) on a fresh system. The process is simple thanks to the official Foreman installer, which bundles everything using native OS packages and sensible defaults.

System Requirements and Supported Platforms

The Foreman installer handles most of the heavy lifting. According to the official quickstart documentation, here’s what you need:

  • Memory: At least 4 GB RAM is required. For smoother operation (especially with other services running), plan for 8 GB. In production environments, 8 GB has proven more than sufficient even with moderate workloads.
  • Disk space: Around 40 GB is plenty for most setups. Puppet code, modules, and reports don’t consume much space unless you’re distributing large binaries (which is uncommon).
  • Operating system:
    • Enterprise Linux 9 family — tested on AlmaLinux 9, CentOS Stream 9, and similar. Rocky Linux 9 works well too.
    • Debian 11/12
    • Ubuntu 22.04

The installer sets up:

  • Foreman web UI
  • Smart Proxy
  • Puppet server
  • (Optional) TFTP, DNS, and DHCP services for provisioning

Note: This guide targets Enterprise Linux 9 (e.g., Rocky Linux 9 or AlmaLinux 9), as it’s a common choice for Puppet environments. For small labs or testing, start with a virtual machine. Popular hypervisors include VMware, VirtualBox, Proxmox, XenServer — or KVM if you’re on a Linux workstation like I am. Once the VM is running and accessible via SSH, you’re ready to begin. Quick tip on SELinux: Unless you’re already comfortable tuning it, set SELinux to permissive mode during initial setup (sudo setenforce 0 and edit /etc/selinux/config). You can harden it later.

Step-by-Step Installation

Follow these commands on a clean, freshly installed EL9 system:

  1. Enable the Puppet 8 repository

    sudo dnf -y install https://yum.puppet.com/puppet8-release-el-9.noarch.rpm
  2. Enable the Foreman 3.17 repository

    sudo dnf -y install https://yum.theforeman.org/releases/3.17/el9/x86_64/foreman-release.rpm
  3. Install the Foreman installer package

    sudo dnf -y install foreman-installer
  4. Run the installer The simplest (and recommended) way is non-interactive mode:

    sudo foreman-installer

    If you prefer to review and customize options step by step:

    sudo foreman-installer -i

    The installer runs in the background, downloads packages, configures services, and sets up everything automatically. It usually takes 10–20 minutes depending on your internet speed and hardware.

Once finished, you’ll see output similar to this:

* Foreman is running at https://your-hostname.example.com
  Initial credentials are admin / randomly-generated-password-here
* Foreman Proxy is running at https://your-hostname.example.com:8443

The full log is at /var/log/foreman-installer/foreman-installer.log

Your Puppet server and Foreman are now live!

Important: The initial admin password is randomly generated and shown only once — copy it immediately. You should change it right after logging in.

Post-Installation Essentials

Using an External PostgreSQL Database (Recommended for Production)

By default, Foreman installs and uses a local PostgreSQL instance. For better performance, scalability, or high availability, switch to an external database.

  1. Edit /etc/foreman/database.yml (production section):
    production:
    adapter: postgresql
    host: postgres.example.net          # Your DB server hostname or IP
    sslmode: require                    # Enforce TLS
    database: foreman
    username: foreman
    password: your-strong-password-here
    pool: 9                             # Important for connection pooling
  2. apply the changes:
    sudo foreman-rake db:migrate
    sudo foreman-rake db:seed

    Tip: If migrating from the local DB, export your existing data first and import it into the new server to preserve hosts, configurations, and history.

Firewall Configuration

Make sure these ports are open so agents can connect:

  • 8140/tcp — Puppet server (for agent catalog pulls)
  • 8443/tcp — Foreman Smart Proxy

Example using firewalld:

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

First Login and Basic Setup

  1. Open your browser and go to https://your-hostname.example.com (accept the self-signed certificate for now).
  2. Log in with admin and the generated password.
  3. Immediately change the password and set up organizations and locations — these help organize hosts and apply policies correctly.

You’re Ready to Start!

At this point, you have a complete, working Puppet server integrated with Foreman. Agents can now check in, receive catalogs, and report back. Additional components like PuppetDB, r10k for environment management, or compile masters for scaling can be added later. For small to medium setups, this minimal configuration handles hundreds of nodes without issue. In upcoming posts, we’ll cover:

  • Registering your first Puppet agent
  • Configuring environments and modules
  • Integrating with the ConfDroid Forge modules
  • Scaling with compile masters and PuppetDB

If you run into any snags during installation, feel free to drop a note at the feedback portal: https://feedback.confdroid.com. Happy automating — your Puppet + Foreman journey starts now! 🚀


Did you find this post helpful? You can support me.

Hetzner Referral
ConfDroid Feedback Portal

Related posts

Author Profile

12ww1160DevOps engineer & architect

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 18 =

Related Post

Rocky 9 install R10K service

How to install Puppet R10k service on Rocky 9 If you happen to manage your…

Migrating my cloud to Kubernetes – storage – the final decision SSHFS

Anyone following my quest to migrate to Kubernetes has been reading about the thoughts and…

How to share fuse file systems with NFS

As part of my mini-blog about migrating to Kubernetes I am currently setting up an…
Social Media Auto Publish Powered By : XYZScripts.com