Candid photograph of a Linux server terminal with a soft olive-green glow against a dark slate background, conveying a calm technical atmosphere.

Step-by-step guides for system administrators — covering command-line basics, web server setup, and preparation material for technical interviews.

Browse Tutorials

How to Install and Configure Jenkins on Fedora

Jenkins is a popular open-source automation server for building, testing, and deploying software. On Fedora, it can be installed from the official Jenkins repository and managed with standard systemctl, dnf, firewall, and SELinux tools.

This setup suits a small development server, a home lab, or a production-style environment hosted in Sydney, Melbourne, Brisbane, or another Australian location. The examples use OpenJDK 21, a supported Java release for current Jenkins installations.

Before exposing Jenkins to a network, consider where build logs and source code are stored. Australian organisations may need to review the Privacy Act 1988, contractual data-handling rules, and any customer requirements about keeping information within Australia.

Prepare Fedora And Java

Update Fedora and install Java before adding Jenkins. OpenJDK 21 is available through Fedora’s standard repositories and provides the runtime required by current Jenkins packages.

sudo dnf upgrade --refresh -y
sudo dnf install -y java-21-openjdk java-21-openjdk-devel curl wget
java -version

The output should show Java 21. If several Java versions are installed, select the default with:

sudo alternatives --config java

A server in an Australian office or cloud region should also use the correct time zone. For most deployments, UTC makes build logs consistent across teams, while Australia/Sydney or Australia/Melbourne can be useful when local scheduling is more important.

timedatectl set-timezone Australia/Sydney
timedatectl status

Add The Jenkins Repository

Import the Jenkins signing key and create a repository file for the stable release stream. Using the repository allows dnf to install updates alongside normal Fedora maintenance.

sudo wget -O /etc/yum.repos.d/jenkins.repo \
  https://pkg.jenkins.io/redhat-stable/jenkins.repo

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo dnf makecache
sudo dnf install -y jenkins

Enable Jenkins at boot and start it immediately:

sudo systemctl enable --now jenkins
sudo systemctl status jenkins

If the service fails, inspect the journal rather than repeatedly restarting it:

sudo journalctl -u jenkins -xe

Useful command-line habits, including checking services and inspecting files, are covered in Linux command tutorials. Those techniques are especially helpful when a package installation appears successful but the service does not bind to its port.

Open The Firewall And Finish Setup

Jenkins listens on TCP port 8080 by default. Fedora commonly uses firewalld, so open the port only on the zone attached to the server’s active interface.

sudo firewall-cmd --get-active-zones
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports

Find the initial administrator password with:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Open http://server-address:8080 in a browser, paste the password, install the suggested plugins, and create an administrator account. Avoid using a public IP address without TLS and authentication controls, particularly if the server is reachable from an Australian business network or an internet connection.

Jenkins stores its main data in /var/lib/jenkins. Ensure that the filesystem has enough space for workspaces, archived artefacts, dependency caches, and console logs. A busy team working during Sydney business hours can generate storage demand quickly.

Configure Nginx And HTTPS

For a cleaner production setup, place Nginx in front of Jenkins and expose only ports 80 and 443. Install the web server and allow Nginx to connect to Jenkins through SELinux:

sudo dnf install -y nginx
sudo setsebool -P httpd_can_network_connect 1
sudo systemctl enable --now nginx

Create /etc/nginx/conf.d/jenkins.conf:

server {
    listen 80;
    server_name jenkins.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Test and reload Nginx:

sudo nginx -t
sudo systemctl reload nginx

Use a fully qualified domain name and obtain a certificate through an approved certificate authority. Australian organisations often use a domain managed by their local registrar or DNS provider, while cloud-hosted systems may use an Australian region such as AWS Sydney for lower latency and data-governance requirements.

Secure And Maintain The Installation

Jenkins should be treated as a privileged automation platform. Restrict access through firewall rules, use role-based permissions, disable anonymous access, and install only plugins that the team actually needs. Keep the Jenkins controller separate from sensitive production systems where possible.

Create a backup policy for /var/lib/jenkins, especially the jobs, users, credentials.xml, and plugin configuration data. Protect backups with encryption and restrict access because credentials and build artefacts may contain confidential information.

Practical maintenance checks include:

Jenkins agents should run builds with the minimum permissions required. For containerised builds, review access to the Docker or Podman socket carefully; socket access can grant extensive control over the host.

Once the web interface works through Nginx, verify a complete pipeline: check out a small repository, run its tests, archive an artefact, and confirm that the build log is retained. For broader troubleshooting references that cover technical device and software issues, see these troubleshooting guides.

A reliable Fedora Jenkins deployment is built from a few repeatable practices: supported Java, signed packages, controlled network access, HTTPS, SELinux-aware proxying, and tested backups. Record the service commands, repository details, firewall rules, and recovery steps in the server’s administration notes so another administrator can restore or maintain the system without guesswork.