Skip to Content
Installationseqdesk doctor

seqdesk doctor

seqdesk doctor is a diagnostic subcommand of the seqdesk npm launcher. It walks an installed SeqDesk directory and prints a pass/warn/fail report covering the install layout, the runtime configuration, the database connection, and (if a URL is supplied) a small set of HTTP probes against the running app.

It does not modify anything. Run it as often as you like — after install, after an update, or whenever the app behaves oddly.

Usage

seqdesk doctor [--dir /path/to/seqdesk] [--url http://127.0.0.1:8000] \ [--timeout-ms 5000] [--json] [--help]
FlagDefaultDescription
--dir, -dcurrent directoryInstalled SeqDesk directory
--url, -uinferred from configRunning SeqDesk base URL for HTTP probes
--timeout-ms5000Timeout for PostgreSQL TCP and HTTP checks
--jsonoffPrint machine-readable JSON instead of text
--help, -hShow usage and exit

If --url is not supplied, doctor tries to derive one from runtime.nextAuthUrl (or app.port) in seqdesk.config.json. If neither is set, the HTTP checks are skipped with a warning.

Checks

Install layout

CheckNotes
Install directoryPath resolves and exists
package.jsonParseable; reports name@version
seqdesk.config.jsonPresent and valid JSON
start.shPresent and executable
node_modulesPresent
.next/staticPresent (warns if .next exists without static assets)

Runtime configuration

Read from seqdesk.config.json (runtime.* section, with flat-key fallbacks):

CheckStatus logic
runtime.databaseUrlMust parse as a valid PostgreSQL URL
PostgreSQL TCPTCP connect to host:port from databaseUrl (default port 5432)
runtime.directUrlOptional; warns if missing (falls back to databaseUrl)
runtime.nextAuthUrlWarns if missing
runtime.nextAuthSecretFails if missing
telemetryPass when telemetry.enabled === true, warn otherwise (informational only)

HTTP probes (when a URL is available)

CheckWhat it expects
GET /api/auth/providersJSON response with a credentials provider
GET /api/setup/statusconfigured: true (passes); exists: true warns; otherwise fails

When a URL was inferred (not passed via --url), an unreachable endpoint is reported as a warn, since the app may simply not be running. When --url was passed explicitly, the same failure is reported as a fail.

Output

Text (default)

SeqDesk doctor 1.1.82 Install dir: /opt/seqdesk App URL: http://127.0.0.1:8000 [PASS] Install directory - /opt/seqdesk [PASS] package.json - seqdesk@1.1.82 [PASS] seqdesk.config.json - parseable [PASS] start.sh - executable [PASS] node_modules - present [PASS] .next/static - present [PASS] runtime.databaseUrl - postgresql://seqdesk@127.0.0.1:5432/seqdesk [PASS] PostgreSQL TCP - 127.0.0.1:5432 reachable [WARN] runtime.directUrl - missing; databaseUrl will be used as fallback [PASS] runtime.nextAuthUrl - http://127.0.0.1:8000 [PASS] runtime.nextAuthSecret - set [WARN] telemetry - disabled [PASS] HTTP /api/auth/providers - credentials auth available [PASS] HTTP /api/setup/status - database configured Summary: 12 pass, 2 warn, 0 fail

JSON (--json)

The same data, structured for scripts:

{ "version": "1.1.82", "installDir": "/opt/seqdesk", "appUrl": "http://127.0.0.1:8000", "checks": [ { "name": "Install directory", "status": "pass", "detail": "/opt/seqdesk" } ], "summary": { "pass": 12, "warn": 2, "fail": 0 } }

Exit codes

CodeMeaning
0No failed checks (warnings allowed)
1At least one check failed
2Invalid command-line arguments

This makes doctor safe to run in CI and post-install hooks — wire it as a non-zero gate without parsing the text output.

When to run it

  • After a fresh install — confirm the layout is intact and the database is reachable before logging in for the first time.
  • After an update — see Automatic Updates. If the app fails to come back up, doctor narrows the failure to layout, DB, or HTTP.
  • In CI — run seqdesk doctor --json against a freshly provisioned instance to validate the install pipeline.
  • When troubleshooting — failures point at exact files and ports, which is usually faster than reading the app logs from scratch.

Manual install checklist

The seqdesk npm tarball ships a MANUAL_INSTALL.md checklist that walks through provisioning a fresh Linux machine, installing both with and without a hosted profile, starting the app, running doctor, verifying telemetry, and cleaning up. Use it for end-to-end manual smoke tests before relying on a new host.