Troubleshooting & FAQ
This page is for administrators and developers diagnosing setup or runtime issues.
Port 3000 or 9000 Already in Use
Section titled “Port 3000 or 9000 Already in Use”Get-NetTCPConnection -LocalPort 3000,9000 -ErrorAction SilentlyContinue | Select-Object LocalPort, OwningProcessnpm run stopss -tulpn | grep -E ':(3000|9000)\b'npm run stopPostgreSQL Authentication Failure
Section titled “PostgreSQL Authentication Failure”- Verify
DATABASE_URLin.envmatches your PostgreSQLpostgresuser password. - On Linux, if peer authentication rejects password login, run
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'your-password';"or letnpm run setupconfigure the database viasudo -u postgres. - On Windows, ensure PostgreSQL bin directory is on
PATHifpsqlorpg_dumpfails.
Missing MinIO Binary
Section titled “Missing MinIO Binary”Download the official MinIO binary to ./bin/minio.exe (Windows) or ./bin/minio (Linux, with chmod +x ./bin/minio). See Installation.
Lost Admin Setup Token
Section titled “Lost Admin Setup Token”The token is shown once and cannot be recovered. Run:
node scripts/setup.mjs --action=resetThen run npm run setup to generate a new token.
Migrations Failing
Section titled “Migrations Failing”Run npm run db:migrate manually and inspect the output. For local test databases, reset cleanly with npm run db:reset:test.
SSE Not Updating Behind a Proxy
Section titled “SSE Not Updating Behind a Proxy”Reverse proxies buffer responses by default. Ensure flush_interval -1 (Caddy) or proxy_buffering off; proxy_cache off; (Nginx) is configured on /api/events. See Domain & HTTPS.
Attachment Uploads Failing Through a Proxy
Section titled “Attachment Uploads Failing Through a Proxy”Ensure MINIO_PUBLIC_URL in .env points to your dedicated https://files.<domain> subdomain rather than a path rewrite, and that the proxy forwards Host and TLS headers cleanly.
/documentation returns Docs not built. Run npm run docs:build.
Section titled “/documentation returns Docs not built. Run npm run docs:build.”The embedded static documentation bundle in documentation-dist/ has not been built yet. Run npm run docs:build (or npm run build for a full production build), or run npm run setup and select Repair to rebuild it automatically.
Easy Mode & Installer Issues
Section titled “Easy Mode & Installer Issues”- Port already in use: Easy mode picks free high ports automatically (
15432+for PostgreSQL,19000+for MinIO). If app port3000is busy, accept the prompt to switch to3001+or setPORTin.env. - Running as
rooton Linux: PostgreSQL refuses to initialize or start asroot. Re-runnpm run setupas a normal user, or accept the installer’s prompt to create a dedicatedpatchworkuser. - No network or behind a proxy: Set
HTTPS_PROXY(andNO_PROXYif needed), or place the downloaded MinIO binary and.sha256suminto./data/cache/for offline verification. - SHA-256 checksum mismatch: The installer deletes partial/corrupt files automatically. Re-run
npm run setup; if behind an intercepting proxy, download the.exe/binary and.sha256summanually and verify locally. - Low disk space: Easy mode requires at least ~600 MB free for PostgreSQL binaries, MinIO (~105 MB), and the Next.js build.
- Windows antivirus blocking
./bin/minio.exe: Add an exclusion for./binand./datain Windows Security (Virus & threat protection), then runnpm run setup -- --action=repair. - PostgreSQL or MinIO won’t start: Run
npm run setup -- --action=repairto clear stalepostmaster.pid/.patchwork*.pidfiles, re-verify./bin/minio, and re-check.env. - Presigned attachment URLs failing: Verify
MINIO_PUBLIC_URLin.envmatches the exact origin your browser uses (http://localhost:<port>,http://<lan-ip>:<port>, orhttps://files.<domain>).