Skip to main content
Fastify runs on Node, so it reads Enkryptify secrets straight from process.env. There is no client bundle, so every secret stays on the server.

Local development

To run your app locally with Enkryptify secrets, install the Enkryptify CLI and link it to your project, then prefix your usual start script with ek run --:
Replace dev with whatever script starts your app. ek run fetches your project’s secrets and injects them as environment variables for that command only.

Accessing secrets in Fastify

Read injected values directly from process.env:
For typed, validated configuration, the @fastify/env plugin checks process.env against a schema so missing or malformed variables fail fast at startup. You no longer need dotenv or a .env file; ek run provides the variables.

Deploying

Run your server under ek run (for example ek run -- node server.js) wherever you control the process, or use a sync to push secrets into your host’s environment.