Setting up your own ODK (Open Data Kit) Server in Ubuntu 18.04 using Digital Ocean

1
2030

Survey’s are important for every study, be it for your MBA thesis , Scientific study or GIS analysis and planning works. Back in the days, the enumerators used to carry thick book of questionnaire to collect information. The questionnaire’s were again digitized in MS excel or SPSS for analysis. Those days are long gone now, many consulting firm and students use mobile data collection tools. The mobile data collection makes it easier and flexible to collect, manage, manipulate and analyze data. Mobile data collection is cost effective , time saving and Eco-friendly way for collecting information.

ODK (Open Data Kit)

Open Data Kit or ODK is community based open source software kits used to collect, manage, manipulate and analyze data. ODK data collect kit has different kind of software’s that tries to replace traditional paper surveys. ODK supports wide range of data types for question and answer purpose.

The server i.e. ODK Aggregate is a role based online portal where all the data is stored and can be managed using a role based login system. ODK provides a Collect Mobile app which connects to the server to get the questionnaire and use the form to collect information and send it back to the server for data integrity. ODK briefcase is an ODK software which help user download the attached files like images and other data which are linked to the database using the unique key id.


ODK needs a server where the forms (questionnaires) and the collected data are stored and can be downloaded later. There are many public servers which uses ODK to help novice data scientist and students to collect data without coding. Using these servers the data could be accessed by anyone online. Therefore, private server setup is necessary for any privately conducted survey’s for data privacy.

ODK Aggregate Server Setup Using Digital Ocean :

  1. Create an Account in Digital Ocean. Get $50 coupon using this link
  2. Get a domain name for eg. “prizmadigital.com ” you can also get a free .com.np domain by applying for it here. Then create a subdomain for the purpose of accessing your site using the domain name. for example: “odk.prizmadigital.com”
  3. Go to Create Drop-down list and Click on Droplets

4. Choose Ubuntu 18.04.X (LTS x64)

5. Choose a Server Plan. For the tutorial purpose i’ll create a 2 GB RAM , 1 core CPU, 50 GB SSD drive Server plan. Which is enough for normal Field survey for data over 10000-15000 population.

6. You can add a block storage according to your need if storage gets exhausted later.

7. Choose a data center near your area. I am from Nepal so I chose the data center Banglore for my ODK server.

8. In “Select an additional option” field click on “User Data” tab

cloud-config.yml code

The cloud config code configures your ubuntu server. The script is once after the VM setup is complete and all the dependencies as well as all the necessary program like tomcat8, nginx, and jdk and postgresql are installed automatically.

9. For authentication you can create a ssh access to the server or use OTP (which will be emailed to you).

10. Create a hostname same as the subdomain name. i.e. odk.prizmadigital.com

11. You can add tags, add to a project and choose to take backups, then click on submit and the DO will start creating a server for you.

12. After the Server setup is completed you will get a IPV4 address silimar to 167.XXX.XXX.XXX . Copy this Ip address and and paste it to the A record of your sub domain’s DNS record.

13. Navigate to your odk website odk.yourdomain.com now you can see that the ODK aggregate is installed in your server.

14. Change the password for the aggregate using the login button at the top. The default admin username and passwords:

Username: administrator

Password: aggregate

Enabling HTTPS

  1. Click the Launch Console button to open a web-based console session.
Change root’s password

2. copy and paste the code replaing YOUR_EMAIL with your email ID and YOUR_DOMAIN using your domain name:

sudo certbot run --nginx --non-interactive --agree-tos -m YOUR_EMAIL --redirect -d YOUR_DOMAIN.

e.g. sudo certbot run –nginx –non-interactive –agree-tos -m [email protected] –redirect -d odk.prizmadigital.com.

Your Server now can make a secure connection using Lets Encrypt Suto SSL.

3. Now check your domain and login 🙂

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here