For app publishers

Secrets

Keys and passwords the app reads at start. Never shown again once saved.

What this is

A secret is a key, token or password the app needs, for example the key that lets it talk to a payment service. Secrets are stored encrypted and handed to the app when it starts. Once you save one, cyantula never shows it again. You can only replace it.

Settings that are not private, such as a web address, are variables. They live under Variables. To deploy is to put a version of the app online. A new secret only takes effect after a deploy.

Where to find it

  1. Open the Apps page and click your app.
  2. Switch to Advanced at the top of the app page.
  3. Click the card Build & deploy, then Secrets.

This page is only in the Advanced view. In the Simple view the same values are in What this app needs.

A number next to Secrets counts required secrets that are still empty.

What you see

Secrets (with the number of secrets next to it) and two buttons at the top right:

  • Import .env: reads a .env file from your computer. A .env file is a plain text file where each line is NAME=value. It can hold secrets and variables.
  • + Add secret.

Under them, an explanation of the page and coloured notices when something applies.

The table:

  • Name: the name as the app's code reads it. A small dot means the app's code reads it. A name without the dot is no longer read by the app. Its value is kept until you remove it. A grey line may explain what it is for.
  • Value: a box that shows dots. A saved secret shows ••••••• (set — type to replace). An empty one shows value needed. The small ✕ inside the box empties the value.
  • Dev value: only when the app has a dev address. It says same as live until you give the dev address its own value.
  • Required: a tick box. A required secret must have a value, or the deploy waits.
  • A ☰ menu at the end of each row.

The ☰ menu offers Read a file into the value, Empty the value, Remove the dev value (when a dev address has its own value), Rename this variable and Remove this variable. Reading a file is for a key that is a file, such as a certificate. The contents go into the box. Nothing is saved until you click Save.

Under the table: the Redeploy live tick box (and Redeploy dev when a dev address exists) and the save button. The save button reads Save & redeploy, Save only, or Save (N required still empty).

How to add a secret

  1. Click + Add secret.
  2. A window called Add a secret opens. Under What is it?, Secret is selected.
  3. Under Name, type the name as the app's code reads it. If you do not know it, check the provider's instructions or ask whoever built the app. Capital letters, digits and underscores only.
  4. Under Value, paste the key. It shows as dots. Click Show to check what you pasted. It is only shown here, only now.
  5. To use a file, click Read a file into the value instead of pasting.
  6. Leave Required ticked if the app cannot run without it.
  7. Click Add secret. A note at the bottom of the window says what will happen: the addresses restart now, or the value waits for the next deploy.

You know it worked when the secret appears in the table with ••••••• (set — type to replace) and a green message appears.

How to replace a secret

  1. Click in the Value box of the secret. It is empty even though a secret is saved.
  2. Paste the new key. It replaces the old one.
  3. Click the save button.
  4. A message says Saved — the live app is deploying the new configuration now.

If you leave the box empty, the saved secret stays as it is.

How to remove or empty a secret

  • Empty: ☰ menu, Empty the value (or click the ✕). A window asks Empty …? Click Empty it. The secret stays without a value. If it is required, the app needs one before it deploys again.
  • Remove: ☰ menu, Remove this variable. A window asks Remove … everywhere? Click Remove. If the app still reads it, the next deploy asks for it again.

When something looks wrong

  • The deploy is paused until every required secret below has a value. Fill in the rows that say value needed.
  • N required variables still have no value — they are on the Variables tab. Click Go to Variables.
  • The dev address is paused until its required variables have a value. Only the dev address is affected.
  • No secrets yet, with + Add your first secret and Import .env: nothing is stored yet.
  • That did not work — and a reason. Nothing was changed. Try again. If a file is too big for a value, the message says to upload it as a file. See Storage.
  • … already exists — change its value in the table instead. The name is taken.
  • cyantula sets … itself on every deploy — your app can read it as it is. You cannot add a name that cyantula already provides.
  • A blue bar The live app is still running the previous configuration. Deploy it to apply the saved values. with Deploy live: you saved without redeploying. Click it when ready.
  • … is busy right now and asked for the redeploy to wait. The new values go live as soon as the app is free.

Good to know

  • Only people who manage the app can see and change secrets.
  • A saved secret can never be read back, not even by you. Keep the original somewhere safe, or get a new one from the provider.
  • If you paste a key into a Variables box by mistake, it is shown in plain text. Use + Add secret for keys and passwords.
  • Removing a secret cannot be undone.
  • Importing a .env file works as it does under Variables: you see what would change before anything is saved.