Vikunja with nginx-reverse-proxy

Hi!

I use Vikunja with a docker on Debian. everything works fine in the browser, but in the desktop application -

It was not possible to find or use the Vikunja installation at "vikunja.mysite.net ". Please check if the URL has the correct format and if you can access it with direct access, and try again.

I set it up like this: docker run -dit -e VIRTUAL_HOST=vikunja.mysite.net -e VIRTUAL_PORT=3456 -e LETSENCRYPT_HOST=vikunja.mysite.net -e LETSENCRYPT_EMAIL=r3drum@yandex.ru -e VIKUNJA_CORS_ENABLE=true -e VIKUNJA_SERVICE_PUBLICURL=vikunja.mysite.net -p 3456:3456 --name=vikunja --hostname=vikunja --restart=unless-stopped -v /home/user/vikunja/config.yml:/app/vikunja/config.yml:ro -v /home/user/vikunja/files:/app/vikunja/files -v /home/user/db:/db vikunja/vikunja

Edited the config in the container: it looks like this:

cors:
    enable: true
service:
    publicurl: vikunja.mysite.net

The proxy config (vikunja.conf in /etc/nginx/conf.d/, path include in nginx.conf) looks like this:

server {
    listen       80;
    server_name  vikunja.mysite.net;

    location / {
        proxy_pass http://localhost:3456;
        client_max_body_size 20M;
    }
}

Please help me, what am I doing wrong?! I tried all the examples from the documentation - it doesn’t work

Does it work if you enter vikunja.mysite.net/api/v1 as the desktop url?

1 Like

Omg, yes, it works! Thanks a lot

Well that looks like a bug. I’ll take a look.

The problem with having to enter the full url is now fixed in 84197dd9c1, please check with the next unstable build (should be ready for deployment in ~45min, also on try).

I can’t start the unstable container (with the same command) - 2024-04-22T03:16:44.360647934Z: CRITICAL ▶ migration/initMigration 002 Could not connect to db: could not open database file [uid=1000, gid=0]: open /db/vikunja.db: permission denied

I added the --user key to the docker run; created the db/vikunja.db file also changed the owner, but all this did not help

I recreated all the files and tried to repeat it again - but the application shows Network Error ;(

What kind of Network Error? From Vikunja or your browser or nginx? Can you share a screenshot?

I’m sorry for the long answer
I have now checked the latest stable release - everything is fine, there are no errors, I was able to connect both the mobile and desktop applications
Thank you very much

Glad you got it working!

1 Like