Skip to content

FAQ

Organised by what you see. Each entry gives a cause and a fix; for a systematic path see Troubleshooting.

The backend exits immediately, mentioning NATS

Section titled “The backend exits immediately, mentioning NATS”

NATS_URL is required and there is no embedded NATS:

终端窗口
nats-server -js
NATS_URL=nats://127.0.0.1:4222 go run main.go -e dev

With Compose, make sure the nats container is healthy first; the bundled file already has the dependency, but custom orchestration does not.

The environment is selected with -e, not a subcommand:

终端窗口
go run main.go -e dev # correct
go run main.go dev # unknown command

Backend 8080, frontend 3000, docs site 4321, Compose nginx 80. Override with PORT / HTTP_PORT; the frontend reports its port on startup.

DB_TYPE accepts sqlite, mysql, and postgres; the latter two need a full DB_DSN. SQLite needs none and defaults to app/server/db/app.db.

The first boot seeds admin with ADMIN_PASSWORD; when unset, a random password is printed:

终端窗口
docker compose -f deploy/docker-compose.yml logs backend | grep -i admin
Section titled “Signed out immediately, or the cookie is not stored”
  • Plain HTTP while MASTER_COOKIE_SECURE=true: use false locally, keep true with TLS in production
  • Mixing 127.0.0.1 and localhost: the cookie domain differs, pick one
  • The proxy does not forward X-Forwarded-Proto, so the backend thinks it is not HTTPS

Intentional. The seeded password is single-use, and all its sessions are revoked after the change.

Two options. If another administrator can sign in, reset via the API (requires user:update):

终端窗口
curl -s -X POST http://localhost:8080/api/v1/auth/reset_password \
-H "Authorization: Bearer $SID" \
-H 'Content-Type: application/json' \
-d '{"username":"admin","new_password":"a-new-strong-password"}'

The target user’s sessions are revoked immediately. If nobody can sign in, back up and write a new bcrypt hash directly into the database.

Default async moderation publishes first and reviews in the background. If the site is set to manual, every new post is pending until approved.

The space is login or level gated and the viewer’s level is too low. The response names the required and current level; the author and reviewers with report:manage bypass it.

XP is derived: deleting a post, unliking, un-favouriting, un-featuring, or a rejected review removes it. After changing XP rules, recompute existing users:

终端窗口
go run main.go -e prod recompute-xp

One comment yields at most one notification (author > mention > watch, de-duplicated). If they are missing, check whether the proxy cuts /api/v1/notifications/stream; idle streams need a keepalive and a longer read timeout. See Realtime.

The proxy’s client_max_body_size is smaller than the upload limit. The backend defaults to upload_max_size=10485760 (10 MiB); nginx defaults to 1 MiB:

client_max_body_size 10m;

With local storage, a recreated container without the feedchamber_uploads volume loses files. With S3, confirm storage_provider=s3 and the credentials. Switching storage needs a restart.

The API is RPC style: writes are POST with an action suffix (/create, /{id}/update, /{id}/delete). Do not guess REST paths.

  • 1001/1002/1003/1014: missing, malformed, expired, or revoked credential → sign in or refresh
  • 1013 / HTTP 403: authenticated but not allowed
  • A banned account asking for protected resources gets 404, deliberately hiding existence

Always page and page_size (snake_case). A page_size below 1 or above page_max_size (default 100) falls back to 20 rather than being clamped; pageSize is ignored.

Requires mcp_enabled=true, api_key_enabled=true, and a valid API key. Both switches default to off.

Write tools are disabled by default and enabled individually in the admin MCP page. Tools listed in mcp_disabled_tools are also blocked.

Tool failures use isError: true in the result; the JSON-RPC error object is reserved for protocol problems (unknown method, invalid params). Handle the two layers separately.