Create a VPS on Digitalocean, AWS or wherever you want.
Since it’s a new machine we want to update the repositories:
sudo apt-get update
Jenkins runs on Java 8, so now we are going to install it:
sudo apt-get install openjdk-8-jdk wget gnupg sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9B7D32F2D50582E6 sudo apt-get update sudo apt-get install git jenkins
Now we are going to create a SSH key for jenkins. This will allow us to authenticate with Github or other services.
To make sure than Jenkins is running, execute the following command:
service jenkins status service jenkins start
Jenkins will be running on port 8080. So if you access YOUR_IP:8080 you should see the following screen
Now copy the password that has been created for you:
For now we are going to select “Install suggested plugins“. You can uninstall the plugins later.
After the installation, you’ll have to create the first admin user.
On the next screen you’ll have to configure the Jenkins URL. The default is the server IP with the port 8080. You can create a DNS record and user a custom domain or subdomain.