Thu, March 29, 2018 ยท 1 min read

Changing Jenkins default port on fedora 26

Changing Jenkins default port on fedora 26

By default Jenkins runs on port 8080, this can be changed by editing /etc/sysconfig/jenkins file.

Check the current port:

$ grep JENKINS_PORT= /etc/sysconfig/jenkins
JENKINS_PORT="8080"

Change the port and restart Jenkins:

$ systemctl restart jenkins

$ firewall-cmd --add-port=7070/tcp --permanent
success

$ firewall-cmd --reload
success

Test with curl:

$ curl -I https://localhost:7070
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
Content-Type: text/html;charset=UTF-8