Docs

Secrets

Secrets are created through the PocketHost instance dashboard and are automatically made available in the PocketBase runtime environment, including pb_hooks. Use secrets to securely store API keys and other sensitive information that should not be embedded in your source code.

Reserved names

Some secret names also change how PocketHost runs your instance:

SecretWhat it does
PB_ENCRYPTION_KEYEncrypts your PocketBase settings. See Settings Encryption.
PH_CORS_ORIGINSLimits which websites can call your instance from a browser. Applies within seconds, no restart. See CORS Origins.

PocketHost also sets a few environment variables of its own, such as PH_INSTANCE_URL. A secret with the same name is replaced. See What PocketHost Adds.

Other secrets take effect the next time your instance starts. To apply a change right away, power the instance off and on.