Skip to content

Environment variables and secrets

Values per environment, secrets encrypted with your project's key, build-time values and deploy tokens.

Applies to EngineCloud
View as Markdown
On this page
  1. Commands
  2. Plain values and secrets
  3. From other products
  4. Deploy tokens

Variables belong to an environment: production, preview, development or one you create. A deploy takes a snapshot of its environment’s variables when it is made; changing a variable affects the next deploy, never a running one, until you redeploy or run run env apply.

Commands

Terminal
npx @sypnia/run env set NEXT_PUBLIC_SHOP_NAME "La Espiga" --env production
npx @sypnia/run env set DATABASE_URL --secret --env production    # asked without echo
npx @sypnia/run env ls --env production                            # secrets show as ••••
npx @sypnia/run env pull --env development > .env.local            # plain values for local work; secrets only with --include-secrets and permission

Plain values and secrets

Plain variableSecret
Visible after savingyesnever; only replaced or deleted
Storedencrypted at restencrypted with the project’s own key (AWS KMS), in AWS Systems Manager Parameter Store
Available at build timeif listed in build.envonly if marked --build, masked in logs
Reaches your codein process.env at run timethe same, decrypted by the runtime’s role, never written to the artifacts

Names starting with NEXT_PUBLIC_, PUBLIC_ or VITE_ are embedded in browser code by your framework: Run refuses to store a secret under those names.

From other products

Connecting Sypnia Data, Files or Mail to an app adds their variables (SYPNIA_DATA_URL, the publishable key as plain, the secret key as a secret) to the environments you choose.

Deploy tokens

A deploy token lets CI deploy one app to chosen environments, and nothing else: run tokens create --app laespiga --env preview,production. It is shown once, stored hashed, and revoked with run tokens revoke. For GitHub Actions, Run can trust the workflow’s OIDC token instead, so no secret is stored in GitHub.

  1. Commands
  2. Plain values and secrets
  3. From other products
  4. Deploy tokens

    Search pages, sections and terms