Skip to content
Website

Troubleshooting & FAQ

This page is for administrators and developers diagnosing setup or runtime issues.

Terminal window
Get-NetTCPConnection -LocalPort 3000,9000 -ErrorAction SilentlyContinue | Select-Object LocalPort, OwningProcess
npm run stop
  • Verify DATABASE_URL in .env matches your PostgreSQL postgres user password.
  • On Linux, if peer authentication rejects password login, run sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'your-password';" or let npm run setup configure the database via sudo -u postgres.
  • On Windows, ensure PostgreSQL bin directory is on PATH if psql or pg_dump fails.

Download the official MinIO binary to ./bin/minio.exe (Windows) or ./bin/minio (Linux, with chmod +x ./bin/minio). See Installation.

The token is shown once and cannot be recovered. Run:

Terminal window
node scripts/setup.mjs --action=reset

Then run npm run setup to generate a new token.

Run npm run db:migrate manually and inspect the output. For local test databases, reset cleanly with npm run db:reset:test.

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.

  • Port already in use: Easy mode picks free high ports automatically (15432+ for PostgreSQL, 19000+ for MinIO). If app port 3000 is busy, accept the prompt to switch to 3001+ or set PORT in .env.
  • Running as root on Linux: PostgreSQL refuses to initialize or start as root. Re-run npm run setup as a normal user, or accept the installer’s prompt to create a dedicated patchwork user.
  • No network or behind a proxy: Set HTTPS_PROXY (and NO_PROXY if needed), or place the downloaded MinIO binary and .sha256sum into ./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 .sha256sum manually 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 ./bin and ./data in Windows Security (Virus & threat protection), then run npm run setup -- --action=repair.
  • PostgreSQL or MinIO won’t start: Run npm run setup -- --action=repair to clear stale postmaster.pid / .patchwork*.pid files, re-verify ./bin/minio, and re-check .env.
  • Presigned attachment URLs failing: Verify MINIO_PUBLIC_URL in .env matches the exact origin your browser uses (http://localhost:<port>, http://<lan-ip>:<port>, or https://files.<domain>).