pocketone.yaml reference
Every section the pocketone binary understands, from pocketone config --json. Each extension owns its own section. pocketone config check checks a file. How the file works (where it's found, .env secrets) is on the Config page.
api-tokens:
Turns the api-tokens extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.api-tokens.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
app:
The single app, for every command that opens it: data dir, dev mode, encryption, JS engine, hooks, migrations, and the .env names it may read (env_allow). Not used on a multisite host.
| Key | Type | Default | Description |
|---|---|---|---|
dir |
string | The data folder (pb_data). Default: pb_data next to the executable. The --dir flag wins. | |
dev |
bool | Dev mode: logs and SQL statements printed to the console. The --dev flag wins. | |
encryption_env |
string | Name of the environment variable holding a 32-character key that encrypts the app settings. The --encryptionEnv flag wins. | |
query_timeout |
duration | Default timeout for SELECT queries, such as 30s. The --queryTimeout flag wins. | |
hooks_dir |
string | The JS hooks folder. Default: pb_hooks next to pb_data. The --hooksDir flag wins. | |
jsvm |
string | The JS engine for pb_hooks and pb_migrations: quickjs (PocketOne's, the default) or goja (PocketBase's own, for pure PocketBase compatibility: pages, $mcp, $apiTokens and JS contracts are off). The --jsvm flag wins. | |
hooks_pool |
int | Only with jsvm: goja: how many JS runtimes are kept ready for hooks. Default 15. The --hooksPool flag wins. | |
migrations_dir |
string | The migrations folder. Default: pb_migrations next to pb_data. The --migrationsDir flag wins. | |
env_allow |
list of string | Names from the .env the app and its JS hooks may read. Default none. | |
js_limits.memory |
int | The app's JS memory: the JS heap plus the Go objects JS holds, such as 128MiB. Default 64MiB. | |
js_limits.task_time |
duration | JS time one stretch of a task (a request, a hook, a cron job, each part between awaits) may use, Go calls and waits not counted, such as 10s. Default 5s. | |
js_limits.task_wall |
duration | Wall time one stretch of JS may take, sync Go calls included, such as 60s; an async handler's awaits end a stretch and don't count. Default 30s. | |
js_limits.await_time |
duration | How long an async handler (a request, a hook, a cron job) may take in all, awaits included, such as 30m; past it, or when the client goes away, the handler stops at its next await. Default 15m. |
autotls:
Automatic HTTPS certificates (ACME): auto, email, CA, domains, DNS-01, certificate storage. The --autotls* flags win.
| Key | Type | Default | Description |
|---|---|---|---|
auto |
bool | Get certificates through ACME (CertMagic). Flag: --autotls. | |
email |
string | ACME account email, for expiry notices from the CA. Flag: --autotlsEmail. | |
ca |
string | letsencrypt (default), letsencrypt-staging, zerossl, or an ACME directory URL. Flag: --autotlsCA. | |
storage |
string | Where certificates are kept. Default pb_data/.autotls. | |
domains |
list of string | Extra domains to get at start; wildcards (*.example.com) need dns. Flag: --autotlsDomains. | |
dns.provider |
string | DNS provider for DNS-01 challenges (needed for wildcards): cloudflare. Flag: --autotlsDNS. | |
dns.api_token |
string | The provider's API token. Write $VAR to read it from the .env beside the file. | |
dns.api_token_env |
string | Or: the environment variable holding the token. Default CF_API_TOKEN. Flag: --autotlsDNSTokenEnv. |
Owned by Auto TLS.
backups:
Turns the backups extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.backups.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
bulkmail:
Turns the bulkmail extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.bulkmail.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
cache:
The cache (cache/v1): one store for every app in the process (memory, disk tier), and caps per bucket.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | Turns the cache off when false; extensions then run uncached. | |
eviction |
string | Which values leave memory (or disk) first when the store reaches its ceiling: lru, mru, fifo or lifo. | |
max_memory |
int | Memory for every bucket together, such as 512MiB. Default 128MiB. | |
disk |
bool | Turns on a disk tier in pb_cache/cache, next to pb_data (on a multisite host, the host's own pb_cache). | |
disk_path |
string | Puts the disk tier in a cache folder there instead of pb_cache, and turns it on. Relative: to the app's folder (the one holding pb_data) when the app has the process to itself, the working directory when several apps share it (Pocker). | |
max_disk |
int | Size of the disk tier for every bucket together, such as 10GiB. Default 1GiB. | |
defaults.eviction |
string | Which of the bucket's entries go first when it's full: lru, mru, fifo or lifo. | |
defaults.max_items |
int | Most entries the bucket holds. | |
defaults.max_memory |
int | Most bytes of keys and values the bucket holds in memory, such as 32MiB (the default). | |
defaults.max_disk |
int | Most bytes of disk files the bucket's keys point at, each counted in full, such as 256MiB (the default). | |
defaults.ttl |
int | How long an entry lives unless the code says otherwise, such as 10m. | |
buckets |
map of object | Caps per bucket name, over what its code asks for. |
Owned by Cache.
deploy:
Turns the deploy extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.deploy.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
desktop:
How pocketone desktop build names and sizes the desktop app built from this folder.
| Key | Type | Default | Description |
|---|---|---|---|
name |
string | The app's name: the window title and the executable's name. Default: the folder's name. | |
id |
string | Reverse-DNS app id (dev.example.notes): names the app's data folder on each user's machine and its single-instance lock. Default: app.pocketone. |
|
width |
int | The window's starting width. Default: 1024. | |
height |
int | The window's starting height. Default: 768. | |
sign.macos.identity |
string | The signing identity in your keychain, as security find-identity -v -p codesigning shows it: Developer ID Application: Your Name (TEAMID). | |
sign.macos.notary_profile |
string | The notarytool keychain profile (xcrun notarytool store-credentials |
|
sign.windows.command |
string | The command that signs one executable in place; {file} is its path. signtool on Windows, osslsigncode anywhere, or your signing service's tool. | |
sign.linux.gpg_key |
string | The GPG key to sign with (its email or id). Each build gets |
Owned by Desktop.
docker:
Runtime provider docker: each instance in its own container with the PocketBase (pb:) or PocketOne (p1:) binary of its version (image, binary cache and manifest, instance root, default version, idle stop, limits).
| Key | Type | Default | Description |
|---|---|---|---|
socket |
string | The Docker socket. Default $DOCKER_HOST when it is unix://, else /var/run/docker.sock. | |
image |
string | Base image the binaries run in, such as alpine:3.20. Required; pulled when missing. | |
binaries |
string | Folder of the release binary cache and its releases.json. Required. | |
versions |
list of string | The minors this host serves, such as pb:0.36 or p1:0.0 (latest patch of each, from docker update). | |
root |
string | Folder with one folder per instance ( |
|
home |
string | The instance folder inside the container. Default /home/pockethost. | |
default_version |
string | Version for instances that name none, such as p1:0.0.*. Empty: such instances fail. | |
min_upstream |
string | Oldest upstream PocketBase release served. Default 0.23.0; lower it only for releases you cache yourself. | |
idle_ttl |
duration | Stop a container after this long without requests. Default 10m. | |
max_concurrent_starts |
int | Containers starting at once. Default 4. | |
start_timeout |
duration | How long a container gets to answer its health check. Default 60s. | |
nano_cpus |
int | CPU limit per container in billionths of a CPU (1000000000 = one CPU). 0: no limit. | |
pids_limit |
int | Process limit per container. 0: Docker's default. | |
nofile |
list of int | Open-file limit per container: [soft, hard]. Empty: Docker's default. | |
cap_drop |
list of string | Linux capabilities to drop, such as [ALL]. | |
no_new_privileges |
bool | Set no-new-privileges on every container. | |
network |
string | Docker network for the containers. Default the bridge. | |
adopt_image |
string | Also adopt running unlabeled containers of this image named after an instance id (taking over from another manager). |
Owned by Docker.
edges:
The fleet: this edge's id and a fixed list of the other edges (id, internal_url, region).
| Key | Type | Default | Description |
|---|---|---|---|
self |
string | This edge's id, such as lax-1. | |
list |
list of object | The other edges: id, internal_url (where this edge reaches it) and optional region. |
Owned by Edge.
firewall:
Peers allowed to connect, trusted proxies and client-IP headers, trusted clients, the rate-limit header prefix. Turns the firewall on.
| Key | Type | Default | Description |
|---|---|---|---|
allow_cidrs |
list of string | Peers (IPs or CIDRs) allowed to connect; others get 403. Empty: everyone. | |
trusted_proxies |
list of string | Peers whose client-IP headers are believed. | |
client_ip_headers |
list of string | Headers read, in order, for the client IP from a trusted proxy. Default CF-Connecting-IP, True-Client-IP, X-Forwarded-For, X-Real-IP. | |
trusted_clients |
list of string | Client IPs or CIDRs that get the trusted rate limits on every instance. | |
trusted_client_headers |
list of string | Headers a trusted client uses to name its end user's IP, so each user gets their own limits. Default X-Client-IP. | |
rate_limit_header_prefix |
string | Prefix of the rate-limit response headers. Default X-RateLimit. |
Owned by Firewall.
instances:
Where a multi-instance host's instances come from (a YAML file), and dev mode (serve unknown hostnames).
| Key | Type | Default | Description |
|---|---|---|---|
file |
string | instances.yaml |
The instances file (id, hosts and settings for each instance), reloaded when it changes. |
dev |
bool | Also serve unknown hostnames: each becomes an instance named after it, in dev mode, with its folder made on first use. |
Owned by Multisite.
kv:
Turns the kv extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.kv.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
lifecycle:
Instance data on this host: how often disk use is measured and last-request times are reported.
| Key | Type | Default | Description |
|---|---|---|---|
measure_every |
duration | 24h0m0s |
How old an instance's disk measurement may get before it is measured again. Default 24h. |
report_every |
duration | 1h0m0s |
How often changed last-request times are reported to the sink. Default 1h. |
concurrency |
int | 2 |
How many instances are measured at once. Default 2. |
Owned by Stats.
llm:
Cloud models for $llm (the llm.* contracts); providers and keys are set in Settings → LLM.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | false turns the extension off on this app ($llm and the llm.* contracts are gone). |
Owned by LLM.
llm-chat:
Turns the llm-chat extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.llm-chat.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
llm-search:
Turns the llm-search extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.llm-search.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
mcp:
Turns the mcp extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.mcp.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
mothership:
A community mothership: serve: true makes this app one; url, login and self make a host follow one.
| Key | Type | Default | Description |
|---|---|---|---|
serve |
bool | This app is the mothership: it serves instance.watch/v1 to its edges (and keeps the edges and instances collections). | |
apex |
string | On the mothership: makes |
|
url |
string | On an edge: the mothership's URL. Required there. | |
email |
string | Superuser email this edge logs in with; use a $VAR from the .env. | |
password |
string | Superuser password; use a $VAR from the .env. | |
self |
string | This edge's edge_id, such as lax-1. Default: the edges section's self. Required on an edge. | |
internal_url |
string | Where other edges reach this one. Set: the edge registers itself when the mothership has no record for it. | |
region |
string | Region recorded when the edge registers itself. | |
heartbeat |
duration | How often this edge marks itself online. Default 15s; negative: never. | |
max_hosts |
int | Most hostnames an edge keeps answers for (its cache bucket mothership.hosts). Default 50000. |
Owned by Mothership.
multisite:
Serve many instances (a multisite host) instead of a single app. The runtimes are the providers of runtime/v1.
Owned by Multisite.
pages:
Turns the pages extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.pages.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
pitr:
Point-in-time restore: on by default, retention, snapshot interval. The --pitr and --pitrRetention flags win.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. The --pitr flag wins. | |
retention |
duration | How far back a restore can go. Default 72h. The --pitrRetention flag wins. | |
snapshot_interval |
duration | How often a full copy is taken. Default 24h. Shorter: faster restores, more storage. |
Owned by PITR.
pocker:
Runtime provider pocker: instances run as isolates in this process (root folder, hooks pool, egress allow list, instance limit defaults).
| Key | Type | Default | Description |
|---|---|---|---|
root |
string | ./pb_root |
The folder holding one folder per instance: |
hooks_pool_size |
int | 2 |
Ignored: each instance has one JS VM (ext/jsvm). Kept so existing configs load. |
max_js_execution |
duration | 30s |
Longest any single JS call (hook, route, cron job, migration) may run. |
max_js_allocation |
int | 67108864 |
Largest result a JS built-in may allocate in one step, such as 64MiB. |
max_call_stack_size |
int | 2000 |
Deepest JS recursion allowed. |
max_sleep |
duration | 10s |
Longest a JS sleep() call may wait. |
max_query_duration |
duration | 30s |
Longest an SQL statement without its own deadline may run. |
http_send_max_timeout |
duration | 1m0s |
Longest timeout a JS $http.send call may use. |
http_send_max_body |
int | 10485760 |
Largest response body a JS $http.send call may read, such as 10MiB. |
max_concurrent_js |
int | 16 |
JS calls an instance runs at once; more wait up to max_js_execution, then fail. |
egress_allow |
list of string | Private networks (CIDRs) instances may still connect to. Default none: public addresses only. | |
isolate_config |
map of map of interface | Every instance's config, in pocketone.yaml's shape: one section per extension the instances run, such as api-tokens: {enabled: false}. Each takes what an instance's extensions. |
Owned by Pocker.
providers:
Which extension provides a contract when several do.
Owned by Standard Set.
rate_limits:
Default rate limits for every instance (per instance: extensions.firewall.rate_limits). Turns the firewall on.
| Key | Type | Default | Description |
|---|---|---|---|
ip_hourly |
int | Requests per hour from one client IP to one instance. Default 1000. | |
instance_hourly |
int | Requests per hour to one instance from everyone. Default 10000. | |
ip_concurrent |
int | Requests one client IP may have open on one instance at once. Default 15. | |
instance_concurrent |
int | Requests one instance may have open at once. Default 250. | |
file_weight |
number | What a /api/files request costs, as a share of a request. Default 0.1. | |
trusted.ip_hourly |
int | Requests per hour from one trusted client IP to one instance. | |
trusted.instance_hourly |
int | Requests per hour to one instance. | |
trusted.ip_concurrent |
int | Requests one trusted client IP may have open on one instance at once. | |
trusted.instance_concurrent |
int | Requests one instance may have open at once. | |
off |
bool | No rate limiting. The default in dev mode unless rate_limits is set. |
Owned by Firewall.
remotes:
Turns the remotes extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.remotes.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
s3redirect:
Signed S3 redirects for file downloads: enabled, URL lifetime. The --s3Redirect and --s3RedirectTTL flags win.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false (it only acts when S3 file storage is on). Flag: --s3Redirect. | |
ttl |
duration | How long each signed URL stays valid. Default 5m, max 7 days. Flag: --s3RedirectTTL. |
Owned by S3 Redirect.
server:
The serve command: http, https and CORS origins, and for a single app its static files, pages, hooks watching and automigrate.
| Key | Type | Default | Description |
|---|---|---|---|
http |
string | Plain HTTP address, such as 127.0.0.1:8090. Single app: the --http default (the flag wins). Many instances: redirects to https when https is set. | |
https |
string | HTTPS address. Single app: the --https default (the flag wins). Many instances: the main address. | |
origins |
list of string | Allowed CORS origins. Single app: the --origins default (the flag wins). | |
plain |
list of string | Many instances only: extra plain HTTP addresses with no redirect. | |
tls.cert |
string | Many instances only: the certificate file, reloaded when it changes. | |
tls.key |
string | Many instances only: the private key file, reloaded when it changes. | |
shutdown_timeout |
duration | Many instances only: how long in-flight requests get to finish at stop. | |
public_dir |
string | Single app only: the static files folder. Default: pb_public next to the executable. The --publicDir flag wins. | |
index_fallback |
bool | Single app only: serve index.html for a missing static path, for single-page apps. On unless false. The --indexFallback flag wins. | |
pages_dir |
string | Single app only: the pages folder, served when it exists. Default: pb_pages next to pb_data. The --pagesDir flag wins. | |
hooks_watch |
bool | Single app only: restart the app when a pb_hooks file changes. On unless false. The --hooksWatch flag wins. | |
automigrate |
bool | Single app only: write a migration file when you change collections in the dashboard. On unless false. The --automigrate flag wins. |
settings:
Turns the settings extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.settings.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
storage:
A default S3 bucket for apps without their own (on a multisite host, one folder per instance): backends and mounts for uploads, backups, PITR history.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On for every instance unless false; an instance's extensions.storage.enabled overrides it. | |
backends |
map of object | Named S3-compatible destinations: endpoint, bucket, region, access_key, secret, prefix, force_path_style. | |
mounts |
map of string | Filesystem kind (storage, backups, litestream, ...) to backend name. | |
bucket.endpoint |
string | S3 endpoint URL. | |
bucket.bucket |
string | Bucket name. | |
bucket.region |
string | Bucket region (auto for R2). | |
bucket.access_key |
string | Access key id. | |
bucket.secret |
string | Secret key; use a $VAR from the .env. | |
bucket.prefix |
string | Prepended to every key, to share a bucket. | |
bucket.force_path_style |
bool | Path-style addressing, for MinIO and similar servers. | |
uploads |
bool | Deprecated: with bucket, false keeps uploads off it. | |
backups |
bool | Deprecated: with bucket, false keeps backups off it. |
Owned by S3 Fallback.
templates:
Turns the templates extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.templates.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
uicache:
Turns the uicache extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.uicache.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
vacuum:
Defaults for compacting the app's SQLite databases (VACUUM): on or off, and how often. The app's admins change them in Settings.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | Compact the databases on a schedule, until the app's admins change it in Settings. | |
every |
string | 168h |
How often, e.g. 24h or 168h (weekly). |
Owned by Vacuum.
wasm:
Turns the wasm extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.wasm.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Owned by Standard Set.
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.