Skip to main content
For a container you control, choose the token-and-instructions path in capy deploy. It emits SECRETS_BLOB and PROJECT_KEY. Put both in the container environment and make capy run the entrypoint.

Install Capy in the image

The npm package is the simplest choice for a Node application:
For an image that does not otherwise need Node, install the released native binary in a build stage. The installer selects the platform binary, verifies the published checksum when it is available, and falls back to npm only when needed.
The native-only example disables npm fallback because only the executable is copied into the final image. Exclude .env, .env.pre-capy.old, and local Capy state from the image with .dockerignore. Build the image without the runtime pair. Supply it when the container starts:
/etc/my-app/capy-runtime.env should contain only deployment configuration and be readable by the account that starts the container:

Compose and Kubernetes

Keep the pair outside the application repository. For Compose, point at an externally managed env file:
For Kubernetes, create or update a cluster secret through your normal secret-management workflow and inject it into the container:
The image entrypoint decrypts at container startup, then starts the child process. It contacts the Capy service once at that point and does not read local .env in deployed mode. With the emitted SECRETS_BLOB / PROJECT_KEY names, any same-named variable already present in the container takes precedence; remove stale plaintext duplicates when the Capy value must be used.

Updates and revocation

Create a distinct pair for each environment. When values change, mint a new pair from the correct Capy branch, update the external secret store, and restart the workload. Revoke unused pairs with capy deploy revoke <deploy-id>; already-running containers retain their environment until they restart.

Running your app

Runtime-pair mode detection and precedence.
Last modified on October 2, 2026