Kerberos.io on Docker

Cédric Verstraeten
4 min readApr 22, 2020

So you want to install Kerberos.io to your Docker host? Awesome, let us show you how easy it is. You will be amazed. Click, click, 💥.

First things first

Over the years we have tried to make Kerberos.io available to as much devices and hardware as possible. Thanks to Docker, this significantly simplified this very challenging task. By now we have distributed over 1 Million Kerberos.io copies around the globe; wonderful. Nowadays you can deploy Kerberos.io to any device that can run Docker: your local PC, server, VM, Raspberry Pi, Orange Pi, and the list goes on.

Let's start

Ok so let's get started with this Docker installation. What do we need? Before you start, you need to make sure you have docker installed to your working environment. If you have no clue how to do it, try this..

Sorry that was kind of rude, although as being a developer or technical person this is normal behaviour. Sorry again.

So if you really don't have an idea how to get started, check out this documentation page of Docker. Assuming that this will get you up and running, we can move forward to the actual Docker installation.

Downloading the Docker image

A best practice is to first download the Kerberos.io Docker image. You can do this by executing following command.

docker pull kerberos/kerberos

Before pulling the image, Docker will first identify the host architecture, based on this it will select the right Docker image.

After you've pulled the image you will see something like this.

root@local:~# docker pull kerberos/kerberos
Using default tag: latest
latest: Pulling from kerberos/kerberos
aad63a933944: Already exists
c5e7bf247a6c: Pull complete
1bbe32e19ae1: Pull complete

e84752bc230a4: Pull complete
88d578759c3a: Pull complete
17ae8bca3929: Pull complete
Digest:
sha256:c9112ee0d99da03c60e4cd3e07c4aad502ad81c053fc565089fcf05eaae42ee0
Status: Downloaded newer image for kerberos/kerberos:latest
docker.io/kerberos/kerberos:latest

Run the container

As we now have the Docker image, we can run the Kerberos Docker container, using following command. This will run Kerberos on your Docker host.

docker run --name camera1 -p 80:80 -p 8889:8889 -d kerberos/kerberos

So what is this command actually doing? Pretty straight forward:

  1. Run a Docker container using the kerberos/kerberos Docker image.
  2. Expose ports 80 (web interface) and port 8889 (livestream) to the Docker host.
  3. Run in daemon mode (-d).
  4. Give a unique name for your Kerberos container (--name).

When opening your favourite web browser, you can navigate to the ip address of your Docket container (port 80). The first time you will land on the welcome page. This page will ask you a couple of details. For more information read the documentation page.

Persist data and configurations

Instead of just running the run command, you can also assign volumes to the Kerberos Docker container. This makes it possible to restart, remove, stop the container but keep the data (configuration, recordings) which the Kerberos container generated.

The good things about is that you can, at all times, destroy the Kerberos Docker container, and create it again. When assigning the volumes, you will restore the state of the Kerberos Docker container.

docker run --name camera1 \
-p 80:80 -p 8889:8889 \
-v ~/kerberos/config:/etc/opt/kerberosio/config \
-v ~/kerberos/capture:/etc/opt/kerberosio/capture \
-v ~/kerberos/logs:/etc/opt/kerberosio/logs \
-v ~/kerberos/webconfig:/var/www/web/config \
-d kerberos/kerberos

After running above command, you will create a couple of directories in your home directory, and mount them into the Kerberos Docker container. The first part is the path on the host system, and the second path is inside the Docker container.

~/kerberos/config:/etc/opt/kerberosio/config

If the directory ~/kerberos/config is empty, the Kerberos Docker container will pre-populate the directories.

Have fun

Congrats, at this point you have learned enough to setup your Kerberos.io video surveillance system on your Docker host. If you would have questions or remarks do not hesitate to reach out, or check out documentation website ;).

--

--

Cédric Verstraeten

Passionated by and evangelising technology throughout our universe. Developer Relations @microsoft and co-founder @kerberosio .