I have Ubuntu 20.04 and Jenkins 1.3.3 I need to change the local Jenkins port from 8080 to 8888.
I tried to change the config file sudo gedit /etc/default/jenkins in the string
#port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8888After restart service: sudo service jenkins start it doesn't affect changes. I still visit jenkins with 8080 port.
Also in this config file I add additional string: JENKINS_ARGS="--httpPort=$HTTP_PORT" but unfortunately after restart service the same - 8080.
I tried to change the address via web interface in the Manage Jenkins next Configure System next change string Jenkins URL to and apply and restart service. I visited page and have got next features:
java -jar jenkins-cli.jar -s -webSocket who-am-i
Reports your credential and permissions.So changes are saved but doesn't affect. I tried to restart my PC to initial all changes. Can You help me? Any suggestions?
21 Answer
Refer to the documentations in:
It says that you can modify by:
systemctl edit jenkinsThen add the following lines:
[Service] Environment="JENKINS_PORT=8888"
Port should be your desired port to use. Save it and then restart jenkins:
sudo systemctl restart jenkins 0