Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

The server says what’s wrong in plain words, at start-up or in its log. The messages below are the server’s own, quoted; find yours, then the fix. Start with:

drusite-server check-config          # or: docker compose run --rm drusite check-config
curl -s https://notes.example.com/readyz
docker compose logs --tail 100 drusite   # or: kubectl logs deploy/drusite

The server won’t start

Configuration

The server saysFix
no login method is enabled. Turn on at least one of [auth.password], [auth.passkeys], [auth.magic_link] or an [auth.oidc.<id>] provider.Turn one on: Sign-in methods.
public_url … must use https (plain http is allowed only for localhost)Use your HTTPS address. For a test on your own machine, http://localhost:8080 works.
[auth.passkeys] needs public_url to use a domain name, not an IP addressPasskeys belong to a domain. Use a name (localhost for testing), or turn passkeys off.
[auth.magic_link] is enabled but [smtp] isn't configuredAdd [smtp], or turn magic links off.
checking the SMTP serverWith magic links on, the server tries the SMTP server at start-up. Check host, port, tls and the credentials.
unknown field \…``A key the server doesn’t have: a typo, or a setting from another version. The configuration reference has the right names.
… and …_file are both set; use oneA key and its _file form are both set, perhaps one in the file and one in the environment.
environment variable DRUSITE__…: …A DRUSITE__ variable that doesn’t name a setting, or a value of the wrong type.
[ai.defaults] chat = "…" must be "provider/model", naming a provider under [ai.providers]The default names a provider ID you haven’t defined.
[ai.providers] ID "ask" is taken by [ask.chat]; use anotherask is reserved for [ask.chat].
[…] base_url is needed for an openai-compatible providerSelf-hosted providers need their address.
[…] api_key is needed for …Vendors need a key: api_key_file.
[search.embeddings] provider Anthropic doesn't make embeddingsUse another provider for embeddings.
[web] dir … has no web app in itPoint dir at a built ui/dist-web, or leave it to the image.
[publish] tls_cert is for the public listener; set listen tooTLS is served only on [publish] listen.

Database

The server saysFix
connecting to PostgreSQLThe URL, the network or the password. With Compose, is the postgres service healthy?
Drusite needs PostgreSQL 16 or newer; this server is …Upgrade PostgreSQL.
the database role is a superuser or has BYPASSRLS, so row-level security wouldn't separate workspaces.Connect as an ordinary role: PostgreSQL.
pgvector isn't installed on this PostgreSQL serverInstall pgvector 0.8 or newer, or use the pgvector/pgvector image.
pgvector isn't enabled in database "…" and this role can't enable itAs an administrator, in that database: CREATE EXTENSION vector;
Drusite needs pgvector 0.8 or newer; this server has …ALTER EXTENSION vector UPDATE; after upgrading pgvector’s package.
the database has pending migrations and migrate_on_start is off; run \drusite-server migrate``Run it, or turn migrate_on_start back on.
the database isn't migrated; run \drusite-server migrate` first`A server command was run before the server ever started. Start the server once, or run migrate.

Keys

The server saysFix
[keys] source is env, but DRUSITE_MASTER_KEY isn't setSet it, or use source = "file". Make a key with drusite-server keys generate.
can't read /run/secrets/…The key file isn’t mounted where path says.
each entry is id:key / key "…" isn't URL-safe base64 / key "…" is N bytes, not 32The key was changed or cut short. Use what keys generate printed, whole.
checking the key sourceWith OpenBao or Vault: its address, the token (expired?), the mount, the key’s name, and the policy’s encrypt and decrypt paths.

Object store

The server saysFix
checking the object store can be writtenThe bucket doesn’t exist, the credentials are wrong, or they can’t write, read and delete. Object storage.
[storage] set both access_key_id and secret_access_key, or neitherSet the pair, or neither to use the AWS_* variables or a role.

/readyz says failing

The log names the check (readiness check failed, with check set to database, storage or keys) and its error. A storage check that fails only on AWS, while uploads work, usually means the credentials can’t list the bucket: see Object storage.

Reverse proxies

What people seeLikely cause
The app connects, then shows offline every minute or soThe proxy’s WebSocket or read timeout. Raise it to an hour: Reverse proxies.
Sync never connects, but the web app’s pages loadThe proxy doesn’t pass WebSockets on /api/v1/sync (Upgrade and Connection headers).
Attachments fail above a certain size (often 1 MB or 100 MB)The proxy’s body limit (client_max_body_size, Caddy’s max_size, Traefik’s buffering middleware), or [attachments] max_bytes.
Ask’s answers appear all at once at the end, or time outThe proxy buffers responses. Turn buffering off for the server (proxy_buffering off).
Signing in from an app loops back to a login page that isn’t Drusite’sA forward-auth or SSO layer in front of the server. Remove it, and use OIDC inside Drusite instead.
Agents can’t sign in/.well-known/oauth-protected-resource, /oauth/… or /mcp aren’t passed through.

Signing in

The sign-in page saysCause
this server doesn't let anyone create an accountSign-up is off and there’s no invitation for this email. Accounts.
this link has expired or was already used; ask for a new oneRecovery and magic links work once. Make another with account recover.
finish signing in in the browser you started inThe sign-in began in one browser and the link was opened in another.
that email and password don't match an accountWrong password, or the account has no password: it may use a passkey or OIDC.
requests from other sites aren't allowedA request came from another origin: usually public_url doesn’t match the address in the browser.

Single sign-on

The sign-in page saysCause
the sign-in was cancelled or refused at the providerThe provider refused: the person isn’t allowed the application there, or the redirect URI doesn’t match. The provider’s own log says which.
the provider sent no ID token / the provider's ID token didn't verifyThe client isn’t an OIDC client (openid scope missing), or the issuer is wrong.
your account at the provider isn't in a group allowed to use this serverallowed_groups: the person isn’t in one, or the groups aren’t in the ID token (check groups_claim and the provider’s mapper).
your email address isn't one allowed to use this serverallowed_email_domains: the email isn’t in one, or the provider doesn’t say it’s verified.
this server doesn't let anyone create an accountA first sign-in, with auto_create off and no invitation.
The server logs OIDC discovery for … failingThe issuer is wrong. It must match the provider’s exactly, trailing slash included (Authentik has one, Keycloak and Google don’t).

Sync and the apps

The app saysCause
The workspace needs a newer appThe workspace is end-to-end encrypted and the app speaks sync protocol 1. Update the app.
Changes from this device couldn’t be checked. Restart Drusite.The server refused a push it couldn’t attribute to this device. Restarting makes the device write as a new peer.
You can view this workspace but not edit it.The person is a viewer; the edit is rolled back.
A new canvas can’t be madeThe server is older than 1.0.
Search by meaning finds nothing newThe embedding model is down or changed; the server re-embeds in the background, and sweeps for missed pages every ten minutes.
Ask isn’t set upNo chat model: Ask your notes.

Still stuck

Search the issues, or open one with the server’s version (/api/v1/version), what you ran, and the log lines around the error. Remove addresses, emails and tokens from logs first. Security problems go privately, as SECURITY.md says.