RU | EN | DE

Step 1. Installing the OS and Important Hostname Note 🏷️

Start the Ubuntu installation (important: version 22.04). The process is standard, but there is one critical moment:

  • In the menu where you need to enter Server name (Hostname): 👉 Type: puppet
  • Username: user (or whatever you prefer). Installing SSH:
sudo apt install openssh-server

Step 2. Pre-Installation Preparation (In the Console) 🛠️

Once the server installs and reboots:

  1. Connect via SSH (PowerShell from real PC): ssh user@IP-ADDRESS
  2. Puppet is very sensitive to accurate time (because of security certificates). Check the time:
date
  1. Update the system before starting:
sudo apt update && sudo apt upgrade -y

Change the hostname if a different one was chosen:

sudo hostnamectl set-hostname puppet

Fix the hosts file (MANDATORY!) ⚠️ If you skip this step, the sudo command will start “hanging” (taking a long time) and Puppet won’t be able to connect to itself.

  1. Open the hosts file:
sudo nano /etc/hosts
  1. Find the line starting with 127.0.1.1 (or 127.0.0.1). The old name will be there.
  2. Replace the old name with puppet.
    • Example: 127.0.1.1 puppet
  3. Save: Ctrl+O Enter Ctrl+X.

Restart:

sudo reboot

Step 3. Adding the Puppet 8 Repository 📦

The standard Ubuntu repository usually has a very old version of Puppet. We need version 8 (Platform 8) — this is the current industry standard.

Execute these commands one by one:

  1. Download the repository package:
wget https://apt.puppet.com/puppet8-release-noble.deb

(If it says “Command not found”, install wget: sudo apt install wget). 2. Install it:

sudo dpkg -i puppet8-release-noble.deb
  1. Update package lists (so the system sees new software):
sudo apt update

Step 4. Installing Puppetserver 🎭

Now let’s install the server itself. This is the “brain” of the entire configuration.

sudo apt install puppetserver -y

It will pull Java and a bunch of libraries. This will take a few minutes.

Step 5. Configuring Memory (Java) 🧠

By default, Puppet Server wants to claim 2 GB of RAM (Java Heap). Since we allocated 4 GB to the VM, the default settings work perfectly fine. But let’s just peek at the config so you know where to change this in the future (e.g., if the server starts crashing):

  1. Open the settings file:
sudo nano /etc/default/puppetserver
  1. Find the line: JAVA_ARGS="-Xms2g -Xmx2g ..."
  2. Make sure it says 2g (2 Gigabytes). If the VM gets less memory, change it to 1g here.
  3. Exit (Ctrl+X) without changing anything.

Step 6. First Start (Takes a While!) ⏳

The most critical moment. The first start is heavy, as the server generates cryptographic keys and certificates (CA).

  1. Start:
sudo systemctl start puppetserver

⚠️ Warning: The command may “hang” for a minute or two. Don’t interrupt it! This is normal. 2. Enable autostart:

sudo systemctl enable puppetserver
  1. Check the status:
sudo systemctl status puppetserver

Should show green: active (running).

Step 7. Checking Accessibility 📡

Puppet runs on port 8140. Let’s check if it’s listening.

ss -tulpn | grep 8140

If you see a line with :::8140 and java — congratulations! Your Puppet Master is alive and awaiting orders.

Step 8. View the Settings File 📡

sudo nano /etc/default/puppetserver

Step 9. Fix Permissions 🔑

Enter this command to give all Puppet folders to the correct owner:

sudo chown -R puppet:puppet /etc/puppetlabs /var/log/puppetlabs /var/run/puppetlabs /opt/puppetlabs/server/data/puppetserver

Step 10. Restart the Server 🔄

Now that it has permissions, it will be able to create keys.

sudo systemctl restart puppetserver

Wait a minute and check status:

sudo systemctl status puppetserver

Set PATH:

echo 'export PATH=$PATH:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin' >> ~/.bashrc

Apply changes:

source ~/.bashrc

Check version:

puppet --version

Check server:

sudo puppet agent -t

Step 11. Fix /etc/hosts on the Puppet Server 🛠️

The server needs to know that it itself is 192.168.0.14.

  1. Connect to Puppet (via SSH, as you did before).
  2. Open the hosts file:
sudo nano /etc/hosts
  1. Enter its internal address:
192.168.0.14    puppet  puppet.local
  1. Save (Ctrl+O, Enter, Ctrl+X). Now the server knows: “I am puppet, my address is 192.168.0.14”.