Updating Central from v1.2 to v2023.3

Hi all,

Thought I would write up my upgrade from v1.2 to v2023.3. Firstly, the reason why I've been so behind on updates is due to workload and finding a good time to pause the system for the update, as the process takes a couple of hours. I ended up picking a Sunday evening. A big lesson that I have learned as part of the process is that I should have updated ODK on a regular basis. This would have made my life a little easier. But overall, it was a lot less scary than I had thought, especially with the support of the ODK team.

Right, so let's get into the details. My server is running on a DigitalOcean droplet, nothing fancy—regular Intel, 1 vCPU, 2 GB RAM, 50 GB SSD, and 2 TB transfer. I've been running the server for a couple of years and have a range of forms, some that upload photos, some with signatures, and some with PDF or Word docs. I've got around 10,000 submissions and about 50 users.
The main steps that I needed to take are all described in detail on the Upgrading Central page on docs.getodk.org.

Firstly, I needed to take a snapshot just in case everything went wrong and I needed to restore. This is easily done via the DigitalOcean web portal and is really cheap for the peace of mind that it gave me.

Secondly, I needed to install Docker Compose and remove the old version "docker-compose." The third stage that I needed to complete was updating Postgres to the latest version. This does take a while, but patience is key. Once the update is completed, I then needed to check the .env file and update it to the latest version, adding my domain name and email address. Now, this is where I ran into a little issue. When I restarted my server, nginx only restarted and never became healthy. So at this stage, I stopped the server, removed nginx, and rebuilt it. This solved the issue. At this stage, I thought I would try it out and ran into the issue of getting an "Error 502" when trying to log in. This was due to the migration of the data not being completed yet. As I said earlier, patience is key. To monitor the update, I used "docker compose logs service --tail 50" to see how it was progressing.

After about an hour, everything was completed and I could log in. While inspecting that everything was where it should be and working as expected, I noticed that my Enketo forms weren't loading with the error "Error: Could not connect with Form Server - https://docs.getodk.org/central-troubleshooting/ - Preview could not connect with server." During the update, I had lost the nameserver, but I quickly added my IP address to resolve this. I followed the instructions on https://docs.getodk.org/central-troubleshooting/ Preview could not connect with server.

Once I had completed all these steps, I was on the latest version, had access to the amazing new features, and was able to further develop some of our forms, such as selecting features from the map (great for our conservation team) and creating entities.

Overall, the moral of the story is to back up, be patient, and know that the ODK team is so supportive that it gave me confidence, especially @Sadiq_Khoja who I had the pleasure of having lunch with at the ODK summit and sound advice all the way through the process.

Here (3.7 KB) is a text file of the commands I used for reference, but I would recommend just following the instructions on https://docs.getodk.org/.

Hope this helps.

Stu

7 Likes