CLI Reference
The odeion binary has five subcommands:
serve(the default): starts the HTTP server. Runningodeionwith flags but no subcommand is a shorthand forodeion serve.psql: opens apsqlsession against the embedded database.doctor: collects a diagnostic bundle for bug reports.reset-password: generates a password recovery link for a user when an admin is locked out.config: read and write server settings as YAML. See Configuration.
Database migrations run automatically on server startup.
odeion serve
Section titled “odeion serve”Starts the HTTP server.
| Flag | Env Variable | Default | Description |
|---|---|---|---|
--database-url | DATABASE_URL | (required) | PostgreSQL connection URL, or local for embedded postgres |
--port | ODEION_PORT | 8080 | HTTP port |
--data-dir | ODEION_DATA_DIR | Platform default | Persistent data directory for databases, caches, logs, and thumbnails |
--version | Print version info and exit |
The server always binds to 0.0.0.0 on the specified port.
# Start with an external PostgreSQL databaseodeion serve --database-url "postgres://user:pass@localhost/odeion"
# Start with embedded postgres (data stored in --data-dir)odeion serve --database-url local --port 3000
# Using environment variablesDATABASE_URL=local ODEION_PORT=3000 odeion serveodeion psql
Section titled “odeion psql”Opens a psql session connected to the embedded PostgreSQL database. Only works while odeion serve is running. Requires the psql client binary on PATH (the official Docker image ships it).
By default connects as a read-only role (odeion_ro) that only has SELECT on the schema. Pass --full-access to connect as the superuser.
| Flag | Default | Description |
|---|---|---|
--data-dir | Matches serve | Must point at the same data directory the server is using |
--database-url | local | Only local is supported. For external DBs, use psql directly |
--full-access | false | Connect as the superuser instead of the read-only role |
Arguments after -- are forwarded to psql verbatim:
# Interactive read-only sessionodeion psql
# Run a one-off queryodeion psql -- -c 'SELECT count(*) FROM users'
# Full admin access (for writes / DDL)odeion psql --full-access -- -c 'VACUUM ANALYZE'
# Execute a scriptodeion psql --full-access -- -f migration.sqlodeion doctor
Section titled “odeion doctor”Collects a diagnostic bundle (system info, embedded postgres state, redacted logs, admin settings) into a single zip suitable for attaching to a bug report or sending to support.
# Default: all sections, redacted, unencryptedodeion doctor
# Server is broken, grab everything elseodeion doctor --no-db
# Encrypt for secure transfer to supportodeion doctor --age-recipient=age1qz...zk2See Debugging for the full flag list, what’s collected, how redaction works, and how the age encryption flow works.
odeion reset-password
Section titled “odeion reset-password”Generates a one-time password recovery link for a user. Intended as an escape hatch when the only admin is locked out and there’s no other admin to issue a reset through the UI. Requires the server to be running (or a --database-url pointing at the external database).
| Flag | Default | Description |
|---|---|---|
<username> (positional) | (required) | The username of the account to reset. |
--expires-in | 24h | How long the recovery link is valid. |
--data-dir | $ODEION_DATA_DIR | Must match the serve process. |
--database-url | local | Connect to the embedded postgres, or an external DSN. |
odeion reset-password adminodeion reset-password alice --expires-in=1hThe command prints the reset token, expiry time, and (when base_url is set in system_settings) a full URL to open in a browser. If the account was locked, the lock is cleared at the same time.
Version
Section titled “Version”odeion --versionPrints the version number, git commit hash, and build timestamp.