> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webapp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SECRET ENV

`SECRET ENV [secret name...]`

The `SECRET ENV` instruction adds values from secrets to the runner's
environment.

Secrets are useful for storing sensitive information. They can hold passwords,
API keys, or other private credentials. For security reasons, it is good
practice to not keep this information within source code. Managing private data
using secrets allows easy authentication with other services on your behalf.

Webapp.io has a secrets manager built into the platform. This makes entering and
editing secrets as simple as 1, 2, 3:

**Step 1:** Navigate to the secrets tab in your webapp.io account.

<img src="https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/secrets_1.png?fit=max&auto=format&n=s6-eR6DYSUsnelQ0&q=85&s=4f27885cd15aa1520fee40b54cbfe122" alt="View of secrets page in webapp.io" width="1894" height="732" data-path="resources/secrets_1.png" />

**Step 2:** Click ‘NEW’ in the top right corner. Follow the prompts to choose a
secret name, value, and destination repository.

<img src="https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/secrets_2.png?fit=max&auto=format&n=s6-eR6DYSUsnelQ0&q=85&s=218388921976adfd670d41e40f626669" alt="View of dialogue box prompting secret creation in webapp.io" width="1900" height="771" data-path="resources/secrets_2.png" />

**Step 3:** All done!

<img src="https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/secrets_3.png?fit=max&auto=format&n=s6-eR6DYSUsnelQ0&q=85&s=643ac145066584453cd71e5f26f4cac4" alt="View of created secret in webapp.io" width="1895" height="631" data-path="resources/secrets_3.png" />

### Examples

* Use `SECRET ENV ENV_FILE` to expose your dotfile env `.env` and then use
  `RUN echo "$ENV_FILE" | base64 -d > ~/.env` to decode the uploaded env file to
  the specific location.

### Who can create secrets?

Only owners of an organization's webapp.io account can create and edit secrets.
Permissions can be edited in the members tab, which can be found in the settings
dropdown menu. The members tab displays all users in an organization.

<img src="https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/secrets_4.png?fit=max&auto=format&n=s6-eR6DYSUsnelQ0&q=85&s=81dde7130bb06692a8e2fa2ed7f1017a" alt="View of webapp.io, highlighting the members tab within the settings menu" width="1884" height="923" data-path="resources/secrets_4.png" />

Click on the name of a user to display their permissions. Only users with
owner-level access can create secrets. An organization’s owner(s) can edit
permissions for other users.

<img src="https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/secrets_5.png?fit=max&auto=format&n=s6-eR6DYSUsnelQ0&q=85&s=666a3d634ccf2282a25dca4b052d4c58" alt="View of how permissions are visible below a member's name in webapp.io's members tab" width="1882" height="924" data-path="resources/secrets_5.png" />
