Configure Jenkins for different user.home

I found another workaroud.

  1. Go to the Manage Jenkins > Configure System
  2. Navigate to the Global Properties
  3. Make the Checkbox Environment variables active
  4. Name field pop up the user.home
  5. value is your desired path
  6. Click Apply, Save and Restart Jenkins

This overrides that path.


I exactly had the same problem. You cannot just add an environment variable to change the path. You'll need to change the jenkins user's home directory itself.

In a linux/unix based system run the following command on your terminal.

login as a root user or use sudo in front of the commands if you're not running it as root user,

1) Move the Jenkins installation directory your desired location.

  mv /var/lib/jenkins /path/to/your/location

2) Change the Jenkins users home directory.

  usermod -d /path/to/your/location jenkins

Now restart jenkins. You should see the user.home and HOME variable set to the new location.