Most agents will require access to sensitive information, such as API keys, passwords, and other secrets.
To keep this information secure, we recommend using Pipecat Cloud’s secret management feature.Secrets are created as “sets” of key-value pairs, and defined at the user / organization level.
This means that secrets can be shared across all agent deployments within the same user workspace or organization.To access secrets, your deployment must specify the secret set to use.
pipecat cloud secrets set my-secrets SECRET_NAME secret-value SECRET_NAME_2 secret-value-2
This command will create or modify the secret set with the name my-secrets, and add or update the key-value pairs SECRET_NAME and SECRET_NAME_2.You can add additional secrets to the set by specifying more key-value pairs.
Copy
Ask AI
pipecat cloud secrets set my-secrets SECRET_NAME_3 secret-value-3
Whenever a secret is added or updated in an existing set, any deployments
using that set will need to be redeployed to access the new values.
Secret sets are created in a specific region. By default, secrets are created in us-west if no region is specified.
Regions are currently in beta. To request access, contact us at
help@daily.co.
Copy
Ask AI
pipecat cloud secrets set my-secrets SECRET_NAME secret-value --region us-east
Secret set names are globally unique, but each secret set exists in only one
region. Secrets must be in the same region as the agents that use them. For
multi-region deployments, create separate secret sets for each region (e.g.,
my-secrets-us-west, my-secrets-us-east).
Running this command will prompt you for account credentials.
You can optionally encode your credentials in base64 with the --base64encode flag.Like regular secret sets, image pull secrets are region-specific. Specify the region with the --region flag:
Unlike secret sets, image pull secrets can not be updated. You must delete and
recreate the secret if you need to change the credentials. Image pull secrets
must also be in the same region as the agents that use them.
Name it (e.g., “pcc-images”) and set permissions (e.g. “Read & Write”)
Copy and save the generated token securely
Step 2: Make Your Docker Hub Image Private
Go to your repository on Docker Hub
Click “Settings”
Under “Visibility,” change from “Public” to “Private”
Save changes
Step 3: Set Up Image Pull Secret in Pipecat Cloud
Copy
Ask AI
# Create image pull secretpipecat cloud secrets image-pull-secret my-image-pull-secret https://index.docker.io/v1/# Enter your Docker Hub username when prompted# Enter your access token (not password) when prompted
dockerhub-access is the name of your image pull secret, so name it whatever
you’d like.
Step 4: Deploy Your Agent with the Image Pull SecretUpdate your pcc-deploy.toml file:
Secrets are mounted as environment variables in your agent process.For example, if you define a secret with the key MY_SECRET, you can access it in your agent code like so:
If you prefer to manage secrets outside of Pipecat Cloud, you can use environment variables or other secret management tools.You could, for example, set environment variables in your Dockerfile:
Copy
Ask AI
FROM dailyco/pipecat-base:latest# Enable bytecode compilationENV UV_COMPILE_BYTECODE=1# Copy from the cache instead of linking since it's a mounted volumeENV UV_LINK_MODE=copy# Set the secret as an environment variableENV MY_SECRET=secret-value# Install the project's dependencies using the lockfile and settingsRUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ uv sync --locked --no-install-project --no-dev# Copy the application codeCOPY ./bot.py bot.py
We recommend using Pipecat Cloud’s built-in management for the most secure and versatile method of managing secrets.