New Jenkins install to manage the builds


I need a new Jenkins installation, because the current one has an annoying encoding bug. Even though the locale is set to UTF-8 and the log files are stored in UTF-8 internally, the log file is converted to another encoding when served over the web.

Running Jenkins in a Docker container was not the best idea, in the sense that it was quite fiddly to manage. So I’ll install Jenkins now on a new VM, without Docker.

Installing Jenkins

Create a new VM on Amazon. I used an Ubuntu 16.04 HVM AMI. The instructions are for older Ubuntu versions I guess, because they mention openjdk-7-jre, but I suppose, the newer Java should work fine.


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y openjdk-8-jre openjdk-8-jdk

wget -q -O - | sudo apt-key add -
sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install -y jenkins

Need to change the jenkins startup options in /etc/default/jenkins to make sure Jenkins stores files in UTF-8, because it seems to ignore the system locale:

JAVA_ARGS="-Dfile.encoding=UTF-8 ..."

The same flag must be added to the script that starts the workers, see later.

Add/redirect DNS

Set the A record of to the new server.

Configure Jenkins

Make sure you have access to port 8080 on the instance, and then start configuring Jenkins from your browser.

Install no plugin from the installer. It does not have the full list,
so we’ll have to install some plugins later, anyway. So we’ll do it all at once.

Create an admin user called admin, and a secure password.

Install the following plugins using the plugin manager:

Then configure Jenkins:

Install and configure mail server

apt-get install postfix

The name of the system is

Add workers

SSH to a Linux worker, and restart the swarm process:

restart swarm JENKINS_PASSWORD=<passwd>

On the windows workers, just restart the Java process with the new Jenkins server

Quite annoyingly, Azure sometimes changes the IP address of the builders, and then I need to update the jenkins security group on AWS.

Update builder config

Make sure that the Jenkins server, and the builder server (that runs the frontend and the backend) are both have the same (default) security group.

Configure the JENKINS_URL environment variable on dokku, use the internal IP address of the Jenkins server. E.g.

dokku config:set cron JENKINS_URL=http://admin:<passwd>@

Do this for all node apps that need access to Jenkins: builder, buidler-test, backend and cron currently.