Kresus

Install with Docker

Warning: read before running any docker image

By default docker exposes the port 9876 to 0.0.0.0, which will make your Kresus instance exposed to the whole world. If you are behind a reverse-proxy such as nginx or apache, prefer -p 127.0.0.1:9876:9876 to make it visible to your reverse-proxy only. This documentation will however use -p 9876:9876 in all examples below, to remain generic.

Run a pre-built image

The Docker images already bundles all the required dependencies, including the full Woob install. At each boot, Woob will try to update; if you have any problem with modules you should then try to simply restart the image.

This pre-built image exposes several data volumes. It is not mandatory to mount them, but it would let you persist your personal data across reboots of the Docker image.

Note: if you clone Woob, it is suggested to use the master (development) branch, which is more likely to be up to date than the stable branch.

The following environment variable can be used:

Here is an example of command line to run to start Kresus in production in a Docker image, with the same UNIX user as current:

mkdir -p /opt/kresus/data
mkdir -p /opt/kresus/woob
touch /opt/kresus/config.ini
# Edit /opt/kresus/config.ini to fill database items (see the administration documentation "With a config.ini file")
git clone https://gitlab.com/woob/woob.git /opt/kresus/woob

docker run -p 9876:9876 \
    -e LOCAL_USER_ID=`id -u` \
    --restart unless-stopped \
    -v /opt/kresus/data:/home/user/data \
    -v /opt/kresus/woob:/woob \
    -v /opt/kresus/config.ini:/opt/config.ini \
    -v /etc/localtime:/etc/localtime \
    --name kresus \
    -ti -d bnjbvr/kresus

Use docker-compose

The docker-compose directory contains all elements to easily run kresus:

Functionalities:

Prerequisites:

Method

Build the Docker image

Stable image

The image for the latest stable version of Kresus can be downloaded through the Docker hub. This is the image called bnjbvr/kresus.

You can also build it yourself. You will need nodejs (preferably LTS version or later) and npm to build the image from scratch.

git clone https://framagit.org/kresusapp/kresus && cd kresus
docker build -t myself/kresus -f support/docker/Dockerfile-stable support/docker/.

You can then use it:

docker run -p 9876:9876 -v /opt/kresus/data:/home/user/data -ti -d myself/kresus

Nightly image

There is also a nightly image, with the latest updates, which is built every night from the Git repository. Be warned that this image is experimental and can contain a lot of bugs or corrupt your data, as the main branch can be instable from time to time. This image will fetch the latest sources from the online Git repository and will not use any local sources.

To build a Nightly image built for a use in production (after version 0.16):

./scripts/docker/nightly.sh

Or before version 0.16:

make docker-nightly

This command will build an image named bnjbvr/kresus-nightly.

Then, to start it, you can use the same docker run command as before, with the correct image name:

docker run -p 9876:9876 \
    -e LOCAL_USER_ID=`id -u` \
    --restart unless-stopped \
    -v /opt/kresus/data:/home/user/data \
    -v /opt/kresus/woob:/woob \
    -v /opt/kresus/config.ini:/opt/config.ini \
    -v /etc/localtime:/etc/localtime \
    --name kresus \
    -ti -d bnjbvr/kresus-nightly