Skip to main content

Setup Vikunja using Docker Compose

Vikunja is an Open-Source, self-hosted To-Do list application for all platforms. It is licensed under the GPLv3.

This guide is assuming you are installing Vikunja on a fresh Debian based OS such as Ubuntu, Debian or Turnkey Core. You can edit the docker-compose.yml to change the port and database passwords however, it is not required unless port 80 is being used by another service. Do NOT modify or change anything in the nginx.conf file even if you change the port in the docker-compose.yml file.

  1. Install docker - apt install docker.io -y
  2. Install docker compose - apt install docker-compose -y
  3. cd /
  4. mkdir docker
  5. mkdir vikunja
  6. cd /docker/vikunja
  7. create docker-compose.yml - touch docker-compose.yml
  8. nano docker-compose.yml - copy the content below into the file then press crtl x then y then enter.
  9. create nginx.conf - touch nginx.conf - If that creates a directory, remove it rm d nginx.conf then use cat > nginx.conf
  10. nano nginx.conf - copy the content from the below example into the file then press ctrl x then y then enter on your keyboard.
  11. run docker-compose up -d

When the install finishes you should see these files and folders in /docker/vikunja directory.

Navigate to the IP of your machine and register an account on Vikunja. There is no admin account.

Find the ip by typing the following into the terminal:

ip addr

Current docker-compose.yml stack.

version: '3'

services:
  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: supersecret
      MYSQL_USER: vikunja
      MYSQL_PASSWORD: secret
      MYSQL_DATABASE: vikunja
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped
  api:
    image: vikunja/api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: secret
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_DATABASE: vikunja
    volumes: 
      - ./files:/app/vikunja/files
    depends_on:
      - db
    restart: unless-stopped
  frontend:
    image: vikunja/frontend
    restart: unless-stopped
  proxy:
    image: nginx
    ports:
      - 8022:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
    restart: unless-stopped

Paste this into the nginx.conf using nano

server {
    listen 80;

    location / {
        proxy_pass http://frontend:80;
    }

    location ~* ^/(api|dav|\.well-known)/ {
        proxy_pass http://api:3456;
        client_max_body_size 20M;
    }
}