Install and run the instance
Server Operator Manual
Operators attach backing services, apply the checked entity-first release through a one-off process, and run the app with only its restricted runtime database credential.
Default deployment shape
Nyalin's smallest supported runtime is one application process, PostgreSQL, and S3-compatible object storage for media and derived remote-cache bytes.
Search backends and SMTP are optional attached services. Do not add Redis, NATS, Sidekiq, or a separate queue/cache service for the default deployment shape.
Required runtime configuration
NYALIN_DATABASE_URLpoints at PostgreSQL and is secret-bearing.NYALIN_PUBLIC_ORIGINis the public HTTP(S) origin used for generated URLs.NYALIN_BIND_ADDRorPORTcontrols the listening socket.NYALIN_ACTOR_KEY_ENCRYPTION_KEYis required before creating local accounts or signing outbound ActivityPub delivery.NYALIN_OBJECT_STORAGE_*attaches S3-compatible storage for uploads and remote/cache derivatives.
Generate the actor key-encryption key
Run the built-in admin command as a one-off process, then store the printed assignment in your secret store:
cargo run -p nyalin-app --no-default-features --features server -- generate-actor-key-encryption-key --key-id actor-key-2026-06Treat the printed value as secret material. Do not commit it to .env files, docs, logs, screenshots, or support tickets.
Local development runbook
- Run scripts/local-dev-smoke.sh for a disposable end-to-end check. It starts MinIO plus a dedicated tmpfs-backed PostgreSQL 18 project; do not start the shared development PostgreSQL first.
- The smoke init hook provisions per-run applying/runtime roles and the only application database, then the harness marks that database as disposable.
- The harness applies the checked entity-first release with schema admin, then starts Dioxus with only the runtime credential.
- On exit, the harness destroys its dedicated PostgreSQL container and network. Set all three documented database overrides only when intentionally testing an already-provisioned external database.
- Do not use the legacy migration crate, a predecessor workflow, or a disposable candidate database as a fallback.
- The app verifies the full runtime contract before workers or the request listener starts; a mismatch is a release/configuration failure.
Optional services
- SMTP: set
NYALIN_EMAIL_DELIVERY_MODE=smtpand the SMTP host, port, security, sender, and optional credentials. Plain SMTP is only for trusted local/internal relays such as Mailpit. - Search: set
NYALIN_SEARCH_BACKENDtotypesenseormeilisearchplus the matching endpoint and API key. PostgreSQL remains authoritative; search indexes are rebuildable derived data.
Backups and operations
- Back up PostgreSQL; it holds authoritative accounts, notes, sessions, moderation state, federation state, jobs, and cache metadata.
- Back up object storage for uploaded media and processed derivatives according to your retention policy.
- Back up NYALIN_ACTOR_KEY_ENCRYPTION_KEY separately. Losing it makes stored ActivityPub actor private keys undecryptable.
- Ship logs through stdout/stderr or tracing-compatible process logs; do not write application-managed log files containing secrets.
- No upgrade procedure exists before the first real deployment. The first supported catalog will be the full entity-derived empty-target schema; a later ADR must define upgrades from that real deployed state.