Choose a deployment profile
| Profile | Database | Media and working data | Use |
|---|---|---|---|
| Single host | SQLite at PISCES_DATA_DIR/pisces.sqlite |
Persistent directory on the same host | Local development or a single server |
| PostgreSQL | PISCES_DATABASE_URL |
The same persistent Pisces data directory available to serving and worker processes | A shared database and multiple processes |
The checkout includes a Dockerfile for a Linux image. You can also build a native release with npm ci --prefix editor, npm run build --prefix editor, and cargo build --locked --release. Install target/release/pisces where the service can run it. Provision a writable data directory for the service user.
This documentation site is a static Astro deployment. The Pisces CMS itself needs a persistent Rust service and the storage described here.
Route public and admin traffic
Assign explicit hostnames to public sites. Configure a separate admin hostname and inject a strong PISCES_ADMIN_TOKEN at service startup. The token must be at least 24 bytes. Admin requests use an HTTPS origin and a signed session. The operator can manage every site on the instance.
The following non-secret values illustrate a host-native deployment. Replace the example domains with your DNS names.
export PISCES_DATA_DIR=/var/lib/pisces
export PISCES_LISTEN=127.0.0.1:8040
export PISCES_ADMIN_HOST=admin.example.org
pisces site-create journal --title "Field Journal" --hostname journal.example.org
# Inject PISCES_ADMIN_TOKEN through the service environment before starting.
pisces serve
Put a TLS reverse proxy on the public network and preserve the incoming Host header. For Caddy on the same host, the two DNS names can share an upstream.
journal.example.org, admin.example.org {
reverse_proxy 127.0.0.1:8040
}
Run network deployments with the normal token-backed admin. --local-edit is a loopback development shortcut. If you put a CDN in front of Pisces, keep admin, API, preview, and personalized responses out of shared caches, and preserve host routing.
Configure storage and recovery
For PostgreSQL, provision a database and supply its connection string as the PISCES_DATABASE_URL service secret. Pisces applies its database migrations on connection. Give the web and job services the same database and a shared mount at PISCES_DATA_DIR.
| Service | Command | Configuration |
|---|---|---|
| Web | pisces serve --no-jobs |
Database secret, shared data directory, TLS admin settings, and optional plugin worker image |
| Jobs | pisces worker |
Same database secret and data directory, plus any mail and plugin worker settings its jobs need |
Ensure the database connection budget accounts for each process’s SQLx pool. Keep SQLite on one host, and use its supported backup mechanism or quiesce writes before copying the database. Use coordinated snapshots for the database and media.
A portable site archive and an instance backup serve different purposes. A site export contains site records, including form definitions and retained entries. Move the site’s uploads separately, and install and review extension packages and grants on the destination. An instance backup also protects database state such as pending jobs and the package registry. Exercise restore on a scratch instance before changing production traffic.
pisces site-export journal /path/to/journal.pisces.json
# Run the next command against the destination instance's data and database.
pisces site-restore /path/to/journal.pisces.json --uploads /path/to/journal-uploads
Run background jobs and Wasm workers
pisces serve starts the job loop by default. Run pisces serve --no-jobs and a supervised pisces worker to split HTTP and queue processing. Configure PISCES_SENDMAIL with an absolute path to a sendmail-compatible command and PISCES_MAIL_FROM with a fixed address wherever delivery runs.
Build the isolated worker image from the same Pisces source as the running service, and use its immutable image ID. The Docker client and daemon must be accessible to the process launching Wasm workers. Podman is supported through PISCES_CONTAINER_ENGINE=podman. Access to the container engine is privileged operational access.
docker build -t pisces:local .
export PISCES_PLUGIN_WORKER_IMAGE="$(docker image inspect pisces:local --format '{{.Id}}')"
Set the image for the web process when it renders dynamic blocks or screens forms, and for the job process when it handles Wasm form actions. A worker starts a restricted Linux container per invocation. Keep the image free of secrets and monitor container-engine capacity.
Check a rollout
- Check
/healthzfor a basic HTTP liveness signal, then request a known public article, upload, and sitemap to exercise site routing, storage, and rendering. - On the admin hostname, sign in and check a draft and a published post. Verify the public hostname keeps operator routes inaccessible.
- If using forms or Wasm, run a representative submission or block and check the actual action outcome. Confirm the worker and web processes have their intended configuration.
- Inspect Telemetry for site and instance latency, database waits, rendering, job traces, and sandbox timing. Its bounded history is kept per process in memory.
Scale planning is covered in Architecture.