Supabase Blog

How to Install Jenkins in Ubuntu 24.04

0 views

How to Install Jenkins in Ubuntu 24.04

Install and run Jenkins on Ubuntu 24.04 for CI/CD pipelines.

Prerequisites

  • Ubuntu 24.04 LTS
  • sudo access

1. Install Java (required by Jenkins)

sudo apt-get update
sudo apt-get install -y openjdk-17-jdk
java -version

2. Add Jenkins repository and install

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null

sudo apt-get update
sudo apt-get install -y jenkins

3. Start and enable Jenkins

sudo systemctl start jenkins
sudo systemctl enable jenkins
sudo systemctl status jenkins

4. Open Jenkins and complete setup

  • Open http://localhost:8080 (or your server IP:8080).
  • Get the initial admin password:
    sudo cat /var/lib/jenkins/secrets/initialAdminPassword
    
  • Paste the password, install suggested plugins, create an admin user, and start using Jenkins.

Optional: Run behind Nginx

Use Nginx as a reverse proxy with HTTPS and proxy / to http://127.0.0.1:8080.