Manage secrets

Secrets store confidential information such as passwords, SSH private keys or SSL certificates. Secrets are mounted into virtual files that are accessible inside your container, typically in /run/secrets/. For more information, see https://docs.docker.com/engine/swarm/secrets/.

If you are currently using an .env file (a dotfile containing environment variables) you can use secrets for this purpose. Simply copy the contents of your .env file into the secret, and then load the environment from the appropriate file mounted inside the container, before running your app.

Add a secret to a swarm

  1. On the Control page, click the cluster name.

  2. Click the Secrets heading, then click NEW SECRET.

  3. Enter the secret Name and Data (the secret contents), then click SAVE.

Delete a secret from a swarm

  1. On the Control page, click the cluster name.

  2. Click the Secrets heading, then click DELETE beside the secret.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Submit a request for support Submit a request for support