New Install - No register button

docker-compose.yml

version: '3'

services:
  api:
    image: vikunja/api
    environment:
      VIKUNJA_REDIS_ENABLED: 1
      VIKUNJA_REDIS_HOST: 'redis:6379'
      VIKUNJA_CACHE_ENABLED: 1
      VIKUNJA_CACHE_TYPE: redis
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - redis
    restart: unless-stopped
  redis:
    image: redis:4.0.8-alpine
    ports:
      - 3456:3456
    volumes:
      - ./files:/app/vikunja/files
    restart: unless-stopped
  frontend:
    image: vikunja/frontend
    ports:
      - 8087:80
    env_file:
      - .env
    depends_on:
      - redis
      - api
    restart: unless-stopped

.env

VIKUNJA_API_URL=http://192.168.1.89:3456/api/v1
VIKUNJA_SERVICE_ENABLEREGISTRATION=1

Login Screen:

startup log:

$ docker-compose up
Starting vikunja_redis_1 ... 
Starting vikunja_redis_1 ... done
Starting vikunja_api_1 ... 
Starting vikunja_api_1 ... done
Starting vikunja_frontend_1 ... 
Starting vikunja_frontend_1 ... done
Attaching to vikunja_redis_1, vikunja_api_1, vikunja_frontend_1
redis_1     | 1:C 20 Oct 11:57:27.244 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1     | 1:C 20 Oct 11:57:27.244 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1     | 1:C 20 Oct 11:57:27.244 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
api_1       | usermod: no changes
redis_1     | 1:M 20 Oct 11:57:27.245 * Running mode=standalone, port=6379.
redis_1     | 1:M 20 Oct 11:57:27.245 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | 1:M 20 Oct 11:57:27.245 # Server initialized
api_1       | 2021/10/20 11:57:27 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
redis_1     | 1:M 20 Oct 11:57:27.245 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
frontend_1  | usermod: no changes
api_1       | 2021/10/20 11:57:27 Using default config.
redis_1     | 1:M 20 Oct 11:57:27.245 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1     | 1:M 20 Oct 11:57:27.245 * DB loaded from disk: 0.000 seconds
redis_1     | 1:M 20 Oct 11:57:27.245 * Ready to accept connections
api_1       | 2021/10/20 11:57:27 Redis initialized
api_1       | 2021-10-20T11:57:27.943212896Z: INFO	▶ migration/Migrate 049 Ran all migrations successfully.
api_1       | 2021-10-20T11:57:27.94333164Z: INFO	▶ models/RegisterReminderCron 04a Mailer is disabled, not sending reminders per mail
api_1       | 2021-10-20T11:57:27.943418472Z: INFO	▶ models/RegisterOverdueReminderCron 04b Mailer is disabled, not sending overdue per mail
api_1       | 2021-10-20T11:57:27.943489132Z: INFO	▶ cmd/func2 04c Vikunja version v0.18.1
api_1       | 2021-10-20T11:57:27.943780714Z: INFO	▶ [EVENTS] 050 Adding handler, topic=poison, handler_name=poison.logger
api_1       | 2021-10-20T11:57:27.943805639Z: INFO	▶ [EVENTS] 052 Adding handler, handler_name=list.created.list.counter.increase, topic=list.created
api_1       | 2021-10-20T11:57:27.943816618Z: INFO	▶ [EVENTS] 053 Adding handler, topic=list.created, handler_name=list.created.send.list.created.notification
api_1       | 2021-10-20T11:57:27.943824859Z: INFO	▶ [EVENTS] 054 Adding handler, handler_name=list.deleted.list.counter.decrease, topic=list.deleted
api_1       | 2021-10-20T11:57:27.943832012Z: INFO	▶ [EVENTS] 055 Adding handler, handler_name=task.created.task.counter.increase, topic=task.created
api_1       | 2021-10-20T11:57:27.943839234Z: INFO	▶ [EVENTS] 056 Adding handler, topic=task.created, handler_name=task.created.task.created.mentions
api_1       | 2021-10-20T11:57:27.943847137Z: INFO	▶ [EVENTS] 057 Adding handler, handler_name=task.comment.edited.handle.task.comment.edit.mentions, topic=task.comment.edited
api_1       | 2021-10-20T11:57:27.943859604Z: INFO	▶ [EVENTS] 058 Adding handler, handler_name=namespace.deleted.namespace.counter.decrease, topic=namespace.deleted
api_1       | 2021-10-20T11:57:27.943879273Z: INFO	▶ [EVENTS] 059 Adding handler, handler_name=task.deleted.task.counter.decrease, topic=task.deleted
api_1       | 2021-10-20T11:57:27.943888776Z: INFO	▶ [EVENTS] 05a Adding handler, handler_name=task.deleted.task.deleted.notification.send, topic=task.deleted
api_1       | 2021-10-20T11:57:27.943896153Z: INFO	▶ [EVENTS] 05b Adding handler, handler_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
api_1       | 2021-10-20T11:57:27.943903843Z: INFO	▶ [EVENTS] 05c Adding handler, handler_name=user.export.requested.handle.user.data.export, topic=user.export.requested
api_1       | 2021-10-20T11:57:27.943911381Z: INFO	▶ [EVENTS] 05d Adding handler, handler_name=user.created.increase.user.counter, topic=user.created
api_1       | 2021-10-20T11:57:27.943919033Z: INFO	▶ [EVENTS] 05e Adding handler, topic=team.created, handler_name=team.created.team.counter.increase
api_1       | 2021-10-20T11:57:27.943933656Z: INFO	▶ [EVENTS] 05f Adding handler, handler_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
api_1       | 2021-10-20T11:57:27.943953873Z: INFO	▶ [EVENTS] 060 Adding handler, handler_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created
api_1       | 2021-10-20T11:57:27.943964385Z: INFO	▶ [EVENTS] 061 Adding handler, handler_name=team.member.added.team.member.added.notification, topic=team.member.added
api_1       | 2021-10-20T11:57:27.943974128Z: INFO	▶ [EVENTS] 062 Adding handler, handler_name=namespace.created.namespace.counter.increase, topic=namespace.created
api_1       | 2021-10-20T11:57:27.943981718Z: INFO	▶ [EVENTS] 063 Adding handler, handler_name=team.deleted.team.counter.decrease, topic=team.deleted
api_1       | 2021-10-20T11:57:27.943990524Z: INFO	▶ [EVENTS] 064 Adding handler, handler_name=task.updated.task.updated.mentions, topic=task.updated
api_1       | 2021-10-20T11:57:27.944714969Z: INFO	▶ [EVENTS] 07b Starting handler, subscriber_name=list.created.list.counter.increase, topic=list.created
api_1       | 2021-10-20T11:57:27.944741226Z: INFO	▶ [EVENTS] 07c Starting handler, topic=task.created, subscriber_name=task.created.task.counter.increase
api_1       | 2021-10-20T11:57:27.944755711Z: INFO	▶ [EVENTS] 07d Starting handler, subscriber_name=namespace.deleted.namespace.counter.decrease, topic=namespace.deleted
api_1       | 2021-10-20T11:57:27.944782763Z: INFO	▶ [EVENTS] 07e Starting handler, subscriber_name=task.assignee.created.task.assigned.notification.send, topic=task.assignee.created
api_1       | 2021-10-20T11:57:27.944795812Z: INFO	▶ [EVENTS] 07f Starting handler, subscriber_name=poison.logger, topic=poison
api_1       | 2021-10-20T11:57:27.944806982Z: INFO	▶ [EVENTS] 080 Starting handler, subscriber_name=task.comment.created.task.comment.notification.send, topic=task.comment.created
api_1       | 2021-10-20T11:57:27.944819842Z: INFO	▶ [EVENTS] 081 Starting handler, subscriber_name=user.created.increase.user.counter, topic=user.created
api_1       | 2021-10-20T11:57:27.944838963Z: INFO	▶ [EVENTS] 082 Starting handler, subscriber_name=team.created.team.counter.increase, topic=team.created
api_1       | 2021-10-20T11:57:27.944863122Z: INFO	▶ [EVENTS] 083 Starting handler, subscriber_name=team.member.added.team.member.added.notification, topic=team.member.added
api_1       | 2021-10-20T11:57:27.944875189Z: INFO	▶ [EVENTS] 084 Starting handler, subscriber_name=team.deleted.team.counter.decrease, topic=team.deleted
api_1       | 2021-10-20T11:57:27.944885763Z: INFO	▶ [EVENTS] 085 Starting handler, subscriber_name=list.deleted.list.counter.decrease, topic=list.deleted
api_1       | 2021-10-20T11:57:27.94489631Z: INFO	▶ [EVENTS] 086 Starting handler, subscriber_name=namespace.created.namespace.counter.increase, topic=namespace.created
api_1       | 2021-10-20T11:57:27.944909058Z: INFO	▶ [EVENTS] 087 Starting handler, subscriber_name=task.updated.task.updated.mentions, topic=task.updated
api_1       | 2021-10-20T11:57:27.944921385Z: INFO	▶ [EVENTS] 088 Starting handler, subscriber_name=task.comment.edited.handle.task.comment.edit.mentions, topic=task.comment.edited
api_1       | 2021-10-20T11:57:27.944944859Z: INFO	▶ [EVENTS] 089 Starting handler, subscriber_name=task.created.task.created.mentions, topic=task.created
api_1       | 2021-10-20T11:57:27.944959283Z: INFO	▶ [EVENTS] 08a Starting handler, topic=task.deleted, subscriber_name=task.deleted.task.counter.decrease
api_1       | 2021-10-20T11:57:27.944970976Z: INFO	▶ [EVENTS] 08b Starting handler, subscriber_name=task.deleted.task.deleted.notification.send, topic=task.deleted
api_1       | 2021-10-20T11:57:27.944989017Z: INFO	▶ [EVENTS] 08c Starting handler, topic=user.export.requested, subscriber_name=user.export.requested.handle.user.data.export
api_1       | 2021-10-20T11:57:27.945012455Z: INFO	▶ [EVENTS] 08d Starting handler, subscriber_name=task.assignee.created.task.assignee.subscribe, topic=task.assignee.created
api_1       | 2021-10-20T11:57:27.945025698Z: INFO	▶ [EVENTS] 08e Starting handler, subscriber_name=list.created.send.list.created.notification, topic=list.created
api_1       | ⇨ http server started on [::]:3456

You don’t have the api exposed to the outside. The browser you’re using to access the frontend needs to be able to access it. Take a look at the docs for examples of this with or without a reverse proxy.

Because the browser you’ll use to access the Vikunja frontend uses that url to make the requests, it has to be able to reach that ip + port from the outside.

Putting everything in a private network won’t work.

Not sure I understand what this means? The browser is able to hit the application internally and render the login page, what does “accessing from outside” have to do with it?

Your browser needs to be able to reach the api at http://192.168.1.89:3456/api/v1. With the compose config you sent that won’t work because you don’t have the port of the api exposed to outside of the docker network.

The frontend communicates with the api through the browser, not internally.

Hi @kolaente
OK, got it. I screw up the previous docker-compose it seems. Here is the updated one but I still don’t see the register button:

version: '3'

services:
  api:
    image: vikunja/api
    environment:
      VIKUNJA_REDIS_ENABLED: 1
      VIKUNJA_REDIS_HOST: 'redis:6379'
      VIKUNJA_CACHE_ENABLED: 1
      VIKUNJA_CACHE_TYPE: redis
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - redis
    ports:
      - 3456:3456
    restart: unless-stopped
  redis:
    image: redis:4.0.8-alpine
    restart: unless-stopped
  frontend:
    image: vikunja/frontend
    ports:
      - 8087:80
    env_file:
      - .env
    depends_on:
      - redis
      - api
    restart: unless-stopped

When I go to: http://192.168.1.89:3456/api/v1, I get this:
image

I’ve added in the nginx proxy but same situation:

version: '3'

services:
  api:
    image: vikunja/api
    environment:
      VIKUNJA_REDIS_ENABLED: 1
      VIKUNJA_REDIS_HOST: 'redis:6379'
      VIKUNJA_CACHE_ENABLED: 1
      VIKUNJA_CACHE_TYPE: redis
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - redis
    ports:
      - 3456:3456
    restart: unless-stopped
    env_file:
      - .env
  redis:
    image: redis:4.0.8-alpine
    restart: unless-stopped
  frontend:
    image: vikunja/frontend
    depends_on:
      - redis
      - api
    restart: unless-stopped
  proxy:
    image: nginx:1.15.8-alpine
    ports:
      - 8087:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
      - redis
    restart: unless-stopped

Does it work if you change the URL on the login screen manually, to the one you configured?

Yes, sorry - thought I had replied about that.

Does it work if you configure VIKUNJA_API_URL with a / at the end?

I believe I have it setup now with an external domain access. However the issue now is that it isn’t persisting the redis DB when bringing down the system. Seems to be deleting the Redis DB. My config directory is empty.

vikunja$ docker-compose down
Stopping vikunja_proxy_1    ... done
Stopping vikunja_frontend_1 ... done
Stopping vikunja_api_1      ... done
Stopping vikunja_redis_1    ... done
Removing vikunja_proxy_1    ... done
Removing vikunja_frontend_1 ... done
Removing vikunja_api_1      ... done
Removing vikunja_redis_1    ... done
Removing network vikunja_default

You don’t have a redis data mount on your config. See the docker hub redis page for that.

You won’t need it though, redis is only used as a cache - it is completely fine it the things stored on it don’t persist a restart.

You might not even need redis if you’re not using this instance with many people.

OK, I had to set a volume for redis to store data. Here is the working updated docker-compose.yml file:

version: '3'

services:
  api:
    image: vikunja/api
    environment:
      VIKUNJA_REDIS_ENABLED: 1
      VIKUNJA_REDIS_HOST: 'redis:6379'
      VIKUNJA_CACHE_ENABLED: 1
      VIKUNJA_CACHE_TYPE: redis
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - redis
    ports:
      - 3456:3456
    restart: unless-stopped
  redis:
    image: redis:4.0.8-alpine
    restart: unless-stopped
    volumes:
      - redis_data:/data
  frontend:
    image: vikunja/frontend
    depends_on:
      - redis
      - api
    restart: unless-stopped
    env_file:
      - .env
  proxy:
    image: nginx:1.15.8-alpine
    ports:
      - 8087:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
      - redis
    restart: unless-stopped
volumes:
  redis_data:
    external: false

oh, I thought redis was an alternate data store. So I have to use maria, mysql etc. for persistence as a requirement?

Yes, you have to use a database. If you don’t configure anythin (like you did in your last compose file) it will use sqlite.

But where is sqlite persistent (or it isn’t). Shouldn’t it have created something in the files directory?

Per this, it would create a .db file in the current directory where docker-compose up is ran from, is this correct? I don’t see that file created.

image

The sqlite file is created next to the binary. In docker, that is at /app/vikunja/vikunja.db. To prevent it from getting lost every time you restart the container you’ll have to mount it to your host. You can change the path with the config variable you linked but will need to create a mount to the host either way.

ok, I’ve managed to get a docker-compose.yml created that seems to be working. Maybe I’m new to Vikunja and need to read the documentation but I’m not able to see another users in the same team to assign a task to.

version: '3'

services:
  db:
    image: jbergstroem/mariadb-alpine
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    env_file:
      - .env
    volumes:
      - mariadb_data:/var/lib/mysql
    restart: unless-stopped
  api:
    image: vikunja/api
    env_file:
      - .env
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - db
      - redis
    ports:
      - 3456:3456
    restart: unless-stopped
  redis:
    image: redis:4.0.8-alpine
    restart: unless-stopped
    volumes:
      - redis_data:/data
  frontend:
    image: vikunja/frontend
    depends_on:
      - db
      - redis
      - api
    restart: unless-stopped
    env_file:
      - .env
  proxy:
    image: nginx:1.15.8-alpine
    ports:
      - 8087:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - db
      - api
      - frontend
      - redis
    restart: unless-stopped
volumes:
  redis_data:
    external: false
  mariadb_data:
    external: false

Did you share the list or namespace with that team?

1 Like

And it was as simple as that :slight_smile:

Sorry, been caught up with the install and only doing some basic persistence verification.

Looks to be working well. Will open new topics if anything else arises.

1 Like