Fresh install, stuck at login page

Hi,

After some work I was able to install Vikunja and have it kind of run.

First, my instance is running on a Raspberry Pi 4, running Raspbian Buster. So, it’s 32 bits (ARVv7l).
Second, for ease of use I use Docker exclusively. With Portainer as my GUI.

I’ve created a “stack” in Portainer, using this compose:

version: '2'
services:
  api:
    image: vikunja/api:latest
    container_name: vikunja_api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_USER: root
      VIKUNJA_DATABASE_DATABASE: vikunja_db
      VIKUNJA_DATABASE_PASSWORD: supersecret
      VIKUNJA_DATABASE_TYPE: mysql
    volumes:
      - vikunja_data:/app/vikunja/files
    restart: unless-stopped
  db:
    image: yobasystems/alpine-mariadb:latest
    container_name: vikunja_db
    environment:
      MYSQL_ROOT_PASSWORD: supersecret
      MYSQL_DATABASE: vikunja_db
      MYSQL_PASSWORD: password
      MYSQL_CHARSET: utf8
      MYSQL_USER: vikunja
    volumes:
      - vikunja_db:/var/lib/mysql
    restart: unless-stopped
  frontend:
    image: vikunja/frontend:latest
    container_name: vikunja_web
    ports:
    - '680:80'
    restart: unless-stopped

Note, because I use a Raspberry Pi, this image of MariaDB: yobasystems/alpine-mariadb:latest has worked for me in the past.

Normally I don’t need to deploy a reverse proxy as I already have one (NGINX), and my idea is that once everything run. I add the reverse proxy rule to route myVikunjadomain to server:680

So I “deploy this stack”. Everything seems to start normally. API log is:

usermod: no changes
2021/04/19 09:50:27 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
2021/04/19 09:50:27 Using default config.
2021-04-19T09:50:27.077672206Z: CRITICAL	▶ migration/Migrate 002 Migration failed: dial tcp xxxxxxxxxxx:3306: connect: connection refused
2021/04/19 09:50:29 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
2021/04/19 09:50:29 Using default config.
2021-04-19T09:50:29.626284706Z: INFO	▶ migration/Migrate 03c Ran all migrations successfully.
2021-04-19T09:50:29.632906445Z: INFO	▶ models/RegisterReminderCron 03d Mailer is disabled, not sending reminders per mail
2021-04-19T09:50:29.634229633Z: INFO	▶ models/RegisterOverdueReminderCron 03e Mailer is disabled, not sending overdue per mail
2021-04-19T09:50:29.634342521Z: INFO	▶ cmd/func2 03f Vikunja version v0.16.0+131-b4d726f5a8
2021-04-19T09:50:29.635746524Z: INFO	▶ [EVENTS] 043 Adding handler, handler_name=poison.logger, topic=poison
2021-04-19T09:50:29.636199778Z: INFO	▶ [EVENTS] 045 Adding handler, handler_name=team.member.added.team.member.added.notification, topic=team.member.added
2021-04-19T09:50:29.636420831Z: INFO	▶ [EVENTS] 046 Adding handler, handler_name=list.created.list.counter.increase, topic=list.created
2021-04-19T09:50:29.636712531Z: INFO	▶ [EVENTS] 047 Adding handler, handler_name=list.created.send.list.created.notification, topic=list.created
2021-04-19T09:50:29.636864492Z: INFO	▶ [EVENTS] 048 Adding handler, handler_name=namespace.created.namespace.counter.increase, topic=namespace.created
2021-04-19T09:50:29.63703412Z: INFO	▶ [EVENTS] 049 Adding handler, handler_name=task.created.task.counter.increase, topic=task.created
2021-04-19T09:50:29.637195118Z: INFO	▶ [EVENTS] 04a Adding handler, topic=task.deleted, handler_name=task.deleted.task.counter.decrease
2021-04-19T09:50:29.637365246Z: INFO	▶ [EVENTS] 04b Adding handler, handler_name=task.deleted.task.deleted.notification.send, topic=task.deleted
2021-04-19T09:50:29.637525966Z: INFO	▶ [EVENTS] 04c Adding handler, handler_name=team.deleted.team.counter.decrease, topic=team.deleted
2021-04-19T09:50:29.637684705Z: INFO	▶ [EVENTS] 04d Adding handler, handler_name=team.created.team.counter.increase, topic=team.created
2021-04-19T09:50:29.637897999Z: INFO	▶ [EVENTS] 04e Adding handler, handler_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
2021-04-19T09:50:29.638058275Z: INFO	▶ [EVENTS] 04f Adding handler, handler_name=user.created.increase.user.counter, topic=user.created
2021-04-19T09:50:29.638222903Z: INFO	▶ [EVENTS] 050 Adding handler, handler_name=list.deleted.list.counter.decrease, topic=list.deleted
2021-04-19T09:50:29.638391197Z: INFO	▶ [EVENTS] 051 Adding handler, topic=namespace.deleted, handler_name=namespace.deleted.namespace.counter.decrease
2021-04-19T09:50:29.638608232Z: INFO	▶ [EVENTS] 052 Adding handler, handler_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
2021-04-19T09:50:29.638764841Z: INFO	▶ [EVENTS] 053 Adding handler, handler_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created
2021-04-19T09:50:29.642031452Z: INFO	▶ [EVENTS] 066 Starting handler, subscriber_name=task.deleted.task.deleted.notification.send, topic=task.deleted
2021-04-19T09:50:29.642333615Z: INFO	▶ [EVENTS] 067 Starting handler, subscriber_name=team.deleted.team.counter.decrease, topic=team.deleted
2021-04-19T09:50:29.642580075Z: INFO	▶ [EVENTS] 068 Starting handler, subscriber_name=user.created.increase.user.counter, topic=user.created
2021-04-19T09:50:29.642779036Z: INFO	▶ [EVENTS] 069 Starting handler, subscriber_name=namespace.deleted.namespace.counter.decrease, topic=namespace.deleted
2021-04-19T09:50:29.642984515Z: INFO	▶ [EVENTS] 06a Starting handler, topic=task.created, subscriber_name=task.created.task.counter.increase
2021-04-19T09:50:29.643058736Z: INFO	▶ [EVENTS] 06b Starting handler, subscriber_name=task.deleted.task.counter.decrease, topic=task.deleted
2021-04-19T09:50:29.643187883Z: INFO	▶ [EVENTS] 06c Starting handler, subscriber_name=team.created.team.counter.increase, topic=team.created
2021-04-19T09:50:29.643434602Z: INFO	▶ [EVENTS] 06e Starting handler, subscriber_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
2021-04-19T09:50:29.64344875Z: INFO	▶ [EVENTS] 06f Starting handler, subscriber_name=list.deleted.list.counter.decrease, topic=list.deleted
⇨ http server started on [::]:3456
2021-04-19T09:50:29.643348714Z: INFO	▶ [EVENTS] 06d Starting handler, subscriber_name=namespace.created.namespace.counter.increase, topic=namespace.created
2021-04-19T09:50:29.643977967Z: INFO	▶ [EVENTS] 070 Starting handler, subscriber_name=list.created.list.counter.increase, topic=list.created
2021-04-19T09:50:29.644118761Z: INFO	▶ [EVENTS] 071 Starting handler, subscriber_name=team.member.added.team.member.added.notification, topic=team.member.added
2021-04-19T09:50:29.644207353Z: INFO	▶ [EVENTS] 072 Starting handler, subscriber_name=list.created.send.list.created.notification, topic=list.created
2021-04-19T09:50:29.644254278Z: INFO	▶ [EVENTS] 073 Starting handler, subscriber_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
2021-04-19T09:50:29.644337648Z: INFO	▶ [EVENTS] 074 Starting handler, subscriber_name=poison.logger, topic=poison
2021-04-19T09:50:29.64434737Z: INFO	▶ [EVENTS] 075 Starting handler, subscriber_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created

So, in my browser I go to myserver:680

An emply “Info” box, no register button. I can trick it to go to register by browsing to myserver:680/register but it registers nothing. What am I missing ?

The frontend will make its calls to the api through http requests using the FQDN. This means having the api and frontend on the same default docker network alone will not be sufficient. They will have to talk to each other through domain resolution.

You will have to configure your routing setup so that the request to <vikunja-service> will route to the frontend and <vikunja-service>/api/v1 will route the api

The issue you are facing is therefore that the frontend is not able to communicate with the api. A specific error pointing this out here would be nice I guess, but for now this is what happens when the frontend calls to the api lead nowhere.

You should either use the nginx setup provided in the docs (easiest way) or integrate the routing to your existing proxy setup.

If I remember correctly something caldav and something else needs to be pointed to the api aswell. Feel free to use the provided nginx.conf as a blueprint.

In my case I was able to adapt it for traefik-v2 quite well.

Also just as a heads up, you seem to be defining a proper mysql-user with a password but then pass root credentials to vikunja anyway. Nothing breaking but maybe nice to know :slight_smile:

1 Like

@tojoker94 already explained most of it. The big part is the frontend actually makes calls to the api through the browser, not an internal docker network.

There are a few examples in the docs which explain what paths need to be exposed the outside world.

Also, you probably want to configure the db to properly handle utf-8 since you’re using mariadb which does not do this out of the box.