As far as I know ODK Central needs to be installed under the the root user.
Very straightforward steps are described if you use DigitalOcean using ready image with preinstalled Ubuntu+Docker from Marketplace.
If you want to install into your own server or any other Virtual Machine, there are two important points you should pay attention.
- After installing Docker allow ports 2375 and 2376
- Install ODK Central Server using root user
Follow these steps to install ODK Central into your own virtual machine where only Ubuntu is installed:
Step 1. Install Docker Engine using the repository on Ubuntu
Set up the repository. Update the apt package index
sudo apt update
Install packages to allow apt to use a repository over HTTPS:
sudo apt install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Use the following command to set up the stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Update the apt package index again
sudo apt update
Install the latest version of Docker Engine and container:
sudo apt install docker-ce
Verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
Step 2. Configuring Docker
Run this command to download the current stable release of Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/docker-compose
Step 3. Configuring firewall for Docker
Enable the UFW firewall to allow only SSH (port 22, rate limited) and 2375/2376 for unencrypted/encrypted communication with the Docker daemon, respectively.
Install UFW
sudo apt install ufw
The following sets up a firewall (this is the first important point):
sudo ufw allow ssh
sudo ufw allow 2375
sudo ufw allow 2376
sudo ufw enable
sudo ufw status
Type y when asked to proceed with operation.
Step 4. Obtain the ODK Central software and installing it on the server
Make sure that you are using root account. If needed change into root account (this is the second important point):
sudo -i
Now you can continue from git clone https://github.com/getodk/central
command in official documentation on how to install ODK Collect.
Hope this helps other enthusiast who wants to test ODK Central Server in their own VM. But I would suggest to use DigitalOcean for production.
Kind regards,
Odil