Skip to content

Deployment

Most people run Ryot with Docker Compose. This page covers what Ryot needs from the machine it runs on, how to put it behind a reverse proxy, and how to deploy it on other platforms.

Requirement Details
Operating system Linux on amd64 or arm64. The image is ignisda/ryot on Docker Hub, also published as ghcr.io/ignisda/ryot.
Database PostgreSQL 15 or later.
Security Landlock and seccomp support in the host kernel. See plugin runtime requirements.
Storage A persistent volume at /home/ryot/storage, or S3-compatible storage. See File storage.
Processes Exactly one Ryot server per database. A second server fails to start while the first is running.

The Helm chart asks Kubernetes for half a CPU core and 1 GiB of memory for Ryot, which is a good starting point for a personal server. These are reservations, not limits: none of the supplied deployments cap Ryot’s CPU, memory or number of processes. Leave room for PostgreSQL and anything else running on the same machine.

Plugins run in separate, locked-down processes, and Ryot sizes their memory from what it can see: the container’s memory limit if it has one, otherwise the machine’s memory. By default, plugins share the smaller of 1,536 MiB and half of that memory. You can set a different amount with SANDBOX_MEMORY_BUDGET_MIB, up to half of the visible memory. A plugin that uses too much memory fails only its own task. This budget only covers plugins, not Ryot as a whole.

Ryot runs two imports at a time and queues the rest, so one person importing a large library does not hold everyone else up. Change this with SANDBOX_IMPORT_CONCURRENCY.

Ryot’s plugins run inside a sandbox that depends on the Linux kernel’s Landlock and seccomp features. If either protection cannot be applied, plugins fail to run. The sandbox also relies on how the image is built, so:

  • Keep the image’s users. The server runs as UID/GID 1001 and plugin processes as UID/GID 1002.
  • Allow the image’s setuid launcher. Do not enable no-new-privileges and do not mount the launcher with nosuid.
  • Keep /run/ryot-sandboxd and the application directories under /home/ryot writable.

Most people put Ryot behind a reverse proxy that handles HTTPS. Whatever proxy you use:

  • Set FRONTEND_URL to the public address people open in their browser.
  • Pass the original Host header through, and set X-Forwarded-Proto to the protocol the visitor used (https).
  • Set X-Forwarded-For to the single address of the visitor, replacing anything the visitor sent. Sign-in and shared-link rate limits use it. Requests without a usable address share one limit.
  • Pass /api/auth/* and the Authorization header through unchanged, and never cache sign-in or token responses.
  • Allow large request bodies. Restoring a backup uploads a file of up to 1,088 MiB.

Caddy sets the forwarding headers for you and ignores the ones visitors send.

Caddyfile
ryot.example.com {
reverse_proxy ryot:8000
}

Ryot always writes logs to /home/ryot/logs/ryot.log inside the container. The file is rotated daily or when it reaches 10 MB, and older files are compressed. You can download current and older log files from Instance Admin → Server logs at <FRONTEND_URL>/instance-admin.

  • To keep logs when the container is replaced, mount a volume at /home/ryot/logs. Do not put logs in the storage volume.
  • Change the file, rotation or level with the SERVER_LOG_* variables in the configuration reference.
  • SERVER_LOG_LEVEL controls the log file and logs sent to OTEL_EXPORTER_OTLP_ENDPOINT. The console always shows info and above.
  • Each Ryot server must write to its own log file.

Ryot creates an encryption key the first time it starts and stores it in PostgreSQL. It protects plugin settings and personal Ryo provider keys. There is nothing to configure, and the key moves with the database when you replace the server.

Back up the database as a whole. If the key is missing while encrypted settings exist, Ryot refuses to start rather than quietly creating a new key. Account backups do not include this key or the encrypted settings.

The official Helm chart needs Helm 3.8 or later. It runs PostgreSQL for you by default, or can use your own database.

Terminal window
helm install ryot oci://ghcr.io/ignisda/charts/ryot \
--set secret.adminAccessToken.value="$(openssl rand -hex 16)" \
--set postgres.auth.password="$(openssl rand -hex 16)" \
--set config.frontendUrl="https://ryot.example.com"

Things to know:

  • The chart creates an 8 GiB volume for uploads at /home/ryot/storage. To use S3 instead, set persistence.enabled=false and pass the FILE_STORAGE_S3_* variables through secretEnv.
  • Put provider credentials such as RYOT_PLUGIN__RYOT__MEDIA__TMDB_ACCESS_TOKEN in secretEnv or secretEnvFrom, not config.extraEnv, which is stored in plain text.
  • Upgrades stop the old pod before starting the new one, so expect a short downtime.
  • The startup probe gives Ryot 30 minutes to finish upgrading its data before Kubernetes restarts it. For a large library, raise startupProbe.failureThreshold and Helm’s --timeout.
  • Kubernetes’ Restricted pod security standard is not compatible, because the sandbox launcher needs allowPrivilegeEscalation: true. Keep the chart’s UID/GID 1001 and RuntimeDefault seccomp settings.

The chart’s README covers external databases, ingress and secrets, and VALUES.md lists every value.

  1. Create a PostgreSQL database.

    Terminal window
    flyctl postgres create ryot-db
  2. Copy the repository’s fly.toml, set its app key to a unique name, and launch it. The file does not choose Machine resources, so pick them in Fly’s settings.

    Terminal window
    flyctl launch
  3. Connect the database to the app.

    Terminal window
    fly postgres attach --app <app> ryot-db
  4. Set the admin access token and the public address.

    Terminal window
    fly secrets set SERVER_ADMIN_ACCESS_TOKEN="$(openssl rand -hex 16)" FRONTEND_URL='https://<app>.fly.dev'
  5. Optional: store files in S3 instead. The supplied fly.toml mounts a ryot_storage volume at /home/ryot/storage, which keeps uploads on that one Machine. Use S3-compatible storage if you run more than one Machine or want backups handled by your storage provider.

The fly.toml already checks /api/system/health.

  1. Create an empty Railway project.
  2. Add a PostgreSQL service.
  3. Add a Docker image service for ignisda/ryot.
  4. Reference DATABASE_URL from the database service.
  5. Set SERVER_ADMIN_ACCESS_TOKEN to a long random value.
  6. Generate a domain and set FRONTEND_URL to its public address.
  7. Give Ryot permanent file storage: attach a volume at /home/ryot/storage, or set the S3 variables.
  8. Optional: set the health check path to /api/system/health.

This example needs Dokku’s global domain, PostgreSQL and Let’s Encrypt plugins. Replace ryot if you want a different app name.

Terminal window
dokku apps:create ryot
dokku postgres:create ryot-service
dokku postgres:link ryot-service ryot
dokku ports:set ryot http:80:8000
dokku config:set --no-restart ryot SERVER_ADMIN_ACCESS_TOKEN="$(openssl rand -hex 16)"
dokku domains:add ryot "ryot.$(cat /home/dokku/VHOST)"
dokku config:set --no-restart ryot FRONTEND_URL="https://ryot.$(cat /home/dokku/VHOST)"
dokku letsencrypt:enable ryot
dokku git:from-image ryot ignisda/ryot:v11

Mount persistent storage at /home/ryot/storage, or configure S3, so uploads survive redeploys.

These platforms offer ready-made Ryot templates. They are run by third parties, so check that they deploy a current version and follow the requirements above.

Deploy Ryot on Pethost. The template starts Ryot and PostgreSQL, generates SERVER_ADMIN_ACCESS_TOKEN and the database password, sets FRONTEND_URL, and serves Ryot over HTTPS at an address under your account’s domain.

Open the address and create your first account. For a private server, then add USERS_ALLOW_REGISTRATION=false to the project’s .env file and deploy again to stop new sign-ups.

The database volume is kept across deploys and included in nightly backups. To deploy from a terminal instead, see Pethost’s step-by-step guide.