Unable to start incus (error parsing config)

Hi,

I am no longer able to start the incus.service daemon due to an incorrect value of the key loki.api.url (= 10.0.0.1:3100) which I set via the web ui.

I’m running Incus 6.8 on Arch Linux with kernel 6.12.8.
Here is there relevant log from journalctl:

Jan 04 13:29:04 pod002 incusd[1669]: time="2025-01-04T13:29:04+01:00" level=warning msg="AppArmor support has been disabled because of lack of kernel support"
Jan 04 13:29:04 pod002 incusd[1669]: time="2025-01-04T13:29:04+01:00" level=warning msg=" - AppArmor support has been disabled, Disabled because of lack of kernel support"
Jan 04 13:29:05 pod002 incusd[1669]: time="2025-01-04T13:29:05+01:00" level=error msg="Failed to start the daemon" err="parse \"10.0.0.1:3100\": first path segment in URL cannot contain colon"
Jan 04 13:29:05 pod002 incusd[1669]: Error: parse "10.0.0.1:3100": first path segment in URL cannot contain colon
Jan 04 13:29:05 pod002 systemd[1]: incus.service: Main process exited, code=exited, status=1/FAILURE

I can’t reset the value via incus config because the API is not reachable.
I tried deleting the following records from the database in /var/lib/incus/database/global/db.bin, but they reappear every time I try to restart the daemon:

7|loki.loglevel|warning
10|loki.api.url|10.0.0.1:3100

Thank you.

Ah, that’s pretty odd that it didn’t complain about that when you first set it…

Anyway, you can write a file at /var/lib/incus/database/patch.global.sql containing:

DELETE FROM config WHERE key='loki.api.url';

And then start the Incus daemon again. That will apply the database patch and then start up at which point you can fix your configuration.

It worked. Thanks man!