Jul 17, 2018

How to change Jenkins port

In CentOS/RedHat
vim /etc/sysconfig/jenkins
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT="8080"
With Ubuntu 14.4 I had to change the file /etc/default/jenkins
E.g.
   #HTTP_PORT=8080
   HTTP_PORT=8083
Best practice is use '-1' to disable it and use 
JENKINS_HTTPS_PORT

for example:
JENKINS_HTTPS_PORT="8443"

You need to restart jenkins to take effect.