klonkt.

Troubleshooting

Common issues when self-hosting Klonkt, and how to fix them.

The fediverse / ActivityPub isn't working

No followers come through from Mastodon, nothing federates, your profile looks empty to remote servers.

Pages look broken or unstyled — only individual posts work

The homepage / archive render oddly behind a proxy, but a single post URL is fine.

The homepage is a 404, but individual posts work

yoursite.com/ returns 404, yet yoursite.com/your-post-slug loads fine.

This is almost always your reverse proxy or tunnel — not Klonkt. The app's homepage is never a 404: it shows your feed, or a setup/welcome page if no site exists yet. A 404 means the bare / request never reaches the app (while deeper paths do). Confirm by hitting the app directly, bypassing the proxy, on the machine running Klonkt:

curl -i http://localhost:3000/

The site shows 502 Bad Gateway

The proxy (Caddy/nginx) returns 502 — it reached the proxy, but the app behind it didn't answer.

Unlike a 404, a 502 means the proxy is configured right (it is forwarding) but the upstream is down or unreachable. Check, in order, on the proxy host:

Where do I see the logs?

Klonkt logs to standard output (the console) — there's no separate log file. Where that goes depends on how you run it:

For a 502 or a site that won't start, the cause is almost always the first error at boot here — an old Node version, a missing .env value, or a port already in use.

I changed .env but nothing changed

The config is read once, at startup. Restart the app: pm2 restart klonkt (or docker compose up -d, or your service manager).

better-sqlite3 / native module errors

"Cannot find module", "was compiled against a different Node.js version", crashes on boot.

The database driver is a native module tied to your Node version. After installing or switching Node, rebuild it:

npm rebuild better-sqlite3

A manual build also needs compiler tools present (build-essential + python3 on Debian/Ubuntu). The Docker image and the one-command installer handle this for you.

I'm locked out / forgot the admin password

Reset it from the server (no email needed) — it prints a new password:

npm run reset-admin

HTTPS certificate won't issue

Port 3000 is already in use

Set a free port in .env: PORT=3001 (then point your reverse proxy at that port). The one-command installer picks a free port automatically.

A new follower sees an empty profile on Mastodon

Klonkt automatically sends your recent posts to a new follower, so their timeline fills in. Older posts appear gradually as Mastodon refreshes — this is normal: Mastodon doesn't fetch a full history on follow. New posts always federate immediately (with PUBLIC_BASE_URL set).

Audio won't play / ffmpeg

ffmpeg is bundled — you don't install it separately. If you want a lightweight blog / photo / EPK / links site with no audio at all, set KLONKT_AUDIO=off.

Sessions, cookies & login security

How logins work, and two things to get right in production:


Still stuck? Email info@robingenis.com or open an issue on GitHub.

← back to install