How to set up Vikunja on Cloudflare Tunnel

Hello.

I want to ask, if is possible to set up fully working stack with notifications, etc on Cloudflare tunnel?

I am running all apps via Cloudflared, but I was not able to get Vikunja working.

Thank you for your help.

From my limited understanding of cloudflare tunnel, it should work. You said you tried it, what does not work?

I did manage to get it done via Cloudflare tunnel.

Front end works well, but I am not getting any notifications, when I set them up.

version: '3'

services:
  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: mypass
      MYSQL_USER: mypass
      MYSQL_PASSWORD: mypass
      MYSQL_DATABASE: mypass
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped
  api:
    image: vikunja/api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: mypass
      VIKUNJA_DATABASE_TYPE: mypass
      VIKUNJA_DATABASE_USER: mypass
      VIKUNJA_DATABASE_DATABASE: mypass
      VIKUNJA_SERVICE_ENABLETASKATTACHMENTS: 1
      VIKUNJA_SERVICE_ENABLEREGISTRATION: 1
      VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: 1
      VIKUNJA_MAILER_ENABLED: 1
      VIKUNJA_MAILER_FORCESSL: 0
      VIKUNJA_MAILER_HOST: smtp.postmarkapp.com
      VIKUNJA_MAILER_PORT: 587
      VIKUNJA_MAILER_USERNAME: myapi
      VIKUNJA_MAILER_PASSWORD: myapi
      VIKUNJA_MAILER_FROMEMAIL: myapi
      VIKUNJA_SERVICE_FRONTENDURL: myapi
      VIKUNJA_SERVICE_TIMEZONE: Europe/Bratislava
    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

And nginx.conf

server {
    listen 80;

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

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

Any ideas, why notifications are not working?

Glad you figured it out.

Can you verify if your mail config works using the vikunja testmail command?

Yes, email is working perfectly with Postmark.

What timezone are you in? What timezone is your server in?

Europe/Bratislava.

I run timedatectl set-timezone Europe/Bratislava.
And server is in Frankfurt, so the same timezone.

But in my portainer logs, there is 2 hours difference. My time is 12:00 and in logs 10:00

Please find logs here in gdrive:

https://drive.google.com/drive/folders/1ogr-nDQv3x4109mBJNuGeIBGFSyp_POE

Can you check if the reminders arrive with a two hour difference?

No, they did not come at all.

Do you have email reminders enabled for your user?

Yes, I did enable those.

Do you want me to send you access?

Sure. Either here in the forum via DM or at konrad@vikunja.io.

Since this would be hands on support similiar to the managed service I’d like to send you an invoice for the effort after your problem is fixed.

Perfect. You got an email

I have been using Vikunja exposed to public internet via CloudflareTunnels for quite some time. I deploy containerized through Nomad scheduler. You can take a look at homelab.setup/vikunja.nomad.j2 at main · rounakdatta/homelab.setup · GitHub and see if the repository helps! :slightly_smiling_face:

Email notifications work well!

So you have : VIKUNJA_SERVICE_ENABLEEMAILREMINDERS = “true”
but mine config is VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: 1 and reminders not working.

Going to try to change that.

And thank you very much!

1 Like

It did not work at all. I really don’t know why. I only received notification about due date.

I let Kolaente to take a look on that.