Server-wide limits #
Open /admin/limits as an administrator to configure the server defaults
without editing your startup command or restarting the server.
Available settings #
- Per-user change-log and blob-storage quotas, and the maximum single upload size (bytes).
- Apps per user and changes per push.
- Change-history retention and orphaned-blob GC grace (days).
- Monthly bundle-call allowance and per-service monthly allowances.
- Share-count, payload-size, and recipient caps.
- Rate-limit windows (milliseconds) and request counts for sync, authentication, blob uploads, share creation, service proxying, and account archives.
The page shows each effective server default and whether it comes from a saved admin override or the startup configuration. Blank inputs remove individual saved overrides. Reset all limits to startup defaults removes every saved limit/rate override; it does not change service credentials or proxy settings.
Precedence and persistence #
For resource limits, the order is:
Built-in default → startup configuration → saved server default → effective tier preset → per-user override → applicable add-ons.
The effective tier catalog itself comes from /admin/billing's saved catalog,
or startup options.tiers when no catalog is saved. See Tier management.
Saved server defaults live in the existing admin settings table, persist across
restarts, and are read before each request. Stable live references keep existing
router contexts and authentication rate-limit buckets current. Scheduled pruning
and blob GC refresh settings before each sweep, even if the server has received
no requests. The admin's on-demand blob GC also reads the saved grace period.
The standalone civ api gc blobs --once command also reads the saved grace
period from the database on each sweep: explicit --grace-days wins over the
saved blobGcGraceDays, then the built-in seven-day default applies. Zero is an
explicit override, not an unset value. Custom servers invoking the lower-level
maintenance functions must supply their resolved settings themselves.
Rate-limit overrides use the same startup/saved precedence. Per-user and tier rate resolvers apply to sync, share creation, blob uploads, service proxying, and account archives. Authentication rates are IP-based and remain server-wide. Changing settings does not reset rate counters. Blob-GC grace also remains server-wide, rather than an editable tier limit.
The CLI's --max-db-bytes and --max-blob-bytes remain supported as startup
fallbacks. Saved admin defaults win over them, including saved zero values.
Validation and zero values #
Values must be finite, safe, non-negative whole numbers. Push size and rate-limit windows/counts must be positive.
Zero has field-specific semantics:
- Storage, bundle, and share caps: no cap.
- Change-history retention: retain history indefinitely (no pruning).
- Apps per user: blocks creation of new apps.
- Blob-GC grace: permits deletion as soon as a quarantined blob is eligible.
Per-service bundle quotas use unique service=number lines, for example:
podcast.podcastindex=2000
ai.claude=100
Blank uses the startup quota map. Override with no per-service caps saves an explicit empty map, removing startup per-service caps while retaining the shared monthly pool. Tier and per-user quota maps may still take precedence.
The built-in backend provides a service usage store, so bundle quotas work even without billing tiers. Custom backends without that store display a warning; configuring an allowance there does not enable enforcement.
Safety and audit #
Lowering quotas can block new writes but does not delete existing data. Shortening retention or blob-GC grace can permanently delete data on the next maintenance sweep. The form requires explicit acknowledgement before shortening these settings, including resets to shorter startup defaults. Tier, user, and app-specific retention settings still apply.
Every save/reset records a server_limits_changed audit entry with the previous
and new overrides. Session-authenticated changes include the operator's user id;
static-token changes are marked admin_token without recording the token.