Hosting Vikunja in a subdirectory


I am trying to install Vikunja on a test server and have the frontend accessible at http://localhost/vikunja/, however it tries to load resources from absolute URLs such as /js/… and /images/…, resulting in 404s. I’ve tried setting the publicPath in vue.config.js, which fixes the paths in index.html, but the paths in the javascript seem to be unaffected.
Is there any way to set the base URL for the frontend, and if not, is this planned for a future release?


Hi Yannick!

What paths are not relative? Setting the publicPath (+rebuild) should be enough.

I’m not sure if this can be made configurable in a reliable way, maybe with some kind of workaround and probably not with all install methods. The problem is we can’t make it relative for everyone since accessing things like /tasks/1234 directly won’t work anymore. The path would need to be changed in the compiled index.html file.



I’ve tried to install vikunja to, but no success so far. I’m using the latest releases. The backend has been installed from the deb package and is running in the default port with the default config. I’m using apache2 and Ubuntu.

I’ve set up the reverse proxy exactly as instructed here: Reverse Proxy | Vikunja. However when I visit or the frontend sends a request to https//, the backend crashes:

2022/08/31 17:54:37 Using config file: /etc/vikunja/config.yml
2022-08-31T17:54:37.917237034Z: INFO	▶ migration/Migrate 030 Ran all migrations successfully.
2022-08-31T17:54:37.917421663Z: INFO	▶ models/RegisterReminderCron 031 Mailer is disabled, not sending reminders per mail
2022-08-31T17:54:37.917499694Z: INFO	▶ cmd/func2 032 Vikunja version v0.16.0
⇨ http server started on [::]:3456
2022-08-31T17:54:41.912532733Z: - 	▶ echo recover.go:92 [PANIC RECOVER] interface conversion: interface {} is nil, not string goroutine 6 [running]:, 0x1000, 0x0, 0x16850c0, 0xc0000c80a0)
	/srv/app/pkg/mod/ +0x105
panic(0x1275340, 0xc0000c51d0)
	/usr/local/go/src/runtime/panic.go:969 +0x1b9, 0x13d4426, 0x15, 0x11efd80)
	/go/src/ +0x86d, 0x13d75b9, 0x17, 0xc0000367d0, 0xe)
	/go/src/ +0x1a5, 0xc0000c80a0, 0x0, 0x0)
	/go/src/ +0x477*Echo).add.func1(0x16850c0, 0xc0000c80a0, 0x13dde75, 0x1b)
	/srv/app/pkg/mod/ +0x62, 0xc0000c80a0, 0x0, 0x7f5aa25f3280)
	/srv/app/pkg/mod/ +0x483, 0xc0000c80a0, 0x0, 0x0)
	/srv/app/pkg/mod/ +0x142, 0xc0000c80a0, 0x0, 0x0)
	/srv/app/pkg/mod/ +0x130*Echo).ServeHTTP(0xc00000c5a0, 0x1663ca0, 0xc0000dc000, 0xc00013a200)
	/srv/app/pkg/mod/ +0x182
net/http.serverHandler.ServeHTTP(0xc0002600e0, 0x1663ca0, 0xc0000dc000, 0xc00013a200)
	/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0000c8000, 0x1667de0, 0xc000250000)
	/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2969 +0x36c

goroutine 1 [chan receive]:, 0x209e430, 0x0, 0x0)
	/go/src/ +0x1dd*Command).execute(0x1fc6ec0, 0xc0001101b0, 0x0, 0x0, 0x1fc6ec0, 0xc0001101b0)
	/srv/app/pkg/mod/ +0x2c2*Command).ExecuteC(0x1fc6ec0, 0x44dfca, 0x1fe3f60, 0xc000000300)
	/srv/app/pkg/mod/ +0x375*Command).Execute(...)
	/go/src/ +0x31
	/go/src/ +0x25

goroutine 21 [select]:
database/sql.(*DB).connectionOpener(0xc000280d00, 0x1667de0, 0xc000333700)
	/usr/local/go/src/database/sql/sql.go:1126 +0xf5
created by database/sql.OpenDB
	/usr/local/go/src/database/sql/sql.go:740 +0x12a

goroutine 22 [select]:*Cron).run(0xc000142b40)
	/srv/app/pkg/mod/ +0x545
created by*Cron).Start
	/srv/app/pkg/mod/ +0xa5

goroutine 23 [IO wait]:
internal/poll.runtime_pollWait(0x7f5a7998ec50, 0x72, 0x0)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058e018, 0x72, 0x0, 0x0, 0x13c0370)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*FD).Accept(0xc00058e000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:394 +0x1fc
net.(*netFD).accept(0xc00058e000, 0x7f5aa25f4fb8, 0x50, 0x50)
	/usr/local/go/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc00038e120, 0x29e8d60800, 0x7f5a79972b48, 0xc000067cf0)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).AcceptTCP(0xc00038e120, 0xe993a020f3f74801, 0x0, 0x0)

2022-08-31T17:54:41.912671272Z: WEB 	▶ XX.XXX.XX.XXX  GET 500 /api/v1/info 524.497µs - Mozilla/5.0 (Windows NT 10.0; rv:104.0) Gecko/20100101 Firefox/104.0

I’m not sure how to debug this. Could you point me to the right direction, please?


The panic seems unrelated to the proxy config. I’d guess there’s something wrong with your openid config.

Running the frontend on a sub path is not really supported out of the box so you’d need to change the path and rebuild it yourself.