Example Traefik config for PathPrefix does not appear to work?

Can anyone confirm that the Traefik V2 example config works for them?

I can get Vikunja running fine if I specify a second subdomain for the API, but I’d rather just use a single subdomain for both.

The config using labels doesn’t work for me:

Either using it as labels or converting it to .yml and specifying the rule in a file. I just can’t get the PathPrefix element to point to the API container. It works just fine either locally, or using a second subdomain.

I’m also confused about running the API on the same port; I can do that easily via Docker and specifying the port 1234:3456 (api) 1234:80 (front end) but this isn’t how the example is set up?

The demo instance and my own one run with traefik 2 and the config from the docs.

Can you verify that traefik picks up the container at all? Can you reach at least one of them through traefik? What do you see in traefiks dashboard about the vikunja containers?

Did you try that? You will get port conflicts. You can’t run two services in the same port. How should the kernel networking stack decide what packet to route to which service?

Also, despite having set a 32 character JWT Secret Key in the config I’m seeing this?

That’s a client issue. Are you accessing the api directly without the frontend?

The jwt secret you set in the config is only used to sign the user api tokens.

I was yeah. That makes sense. For some reason I was expecting some ‘ok’ type output.

No I didn’t.

I can access only the front end container. If I switch it to a subdomain, the whole lot works. I may just leave it like that… but it’s frustrating that it works for others and not for me!

Can you share your config?

Will drop you a PM, hope that’s ok?

We figured it out: The issue was caused by a cors header middleware. Once removed everything worked.


I think the issue was that with some other services on my network I have had to strip headers & add new ones back in. But everything works fine with Vikunja without doing that.

Once I removed the middleware everything worked fine.

For anyone reading in future, check nothing’s happening with/to your headers!

1 Like