The Secrets workspace tool lets you securely store sensitive information your app needs as encrypted environment variables.
Secrets workspace tool
How to access Secrets
Add App Secrets
Edit App Secrets
View App Secrets
Delete App Secrets
Add Account Secrets
Edit Account Secrets
View Account Secrets
Link Account Secrets
Delete Account Secrets
Access Method | Who | Can See Names | Can See Values |
---|---|---|---|
Multiplayer | Multiplayer collaborator | ✓ | ✓ |
Multiplayer | Organization member (Owner role) | ✓ | ✓ |
Multiplayer | Organization member (Non-owner) | ✓ | |
Cover Page | Any visitor | ||
Remix | Owner/collaborator remixing own Replit App | ✓ | ✓ |
Remix | Non-owner/collaborator remixing Replit App | ✓ | |
Remix | Anyone remixing from cover page | ✓ | |
Organization Remix | Organization member with Owner role | ✓ | ✓ |
Organization Remix | Organization member without Owner role | ✓ |
Secret | Description |
---|---|
DATABASE_URL | SQL database connection string |
PGHOST | PostgreSQL hostname |
PGUSER | PostgreSQL username |
PGPASSWORD | PostgreSQL password |
PGDATABASE | PostgreSQL database name |
PGPORT | PostgreSQL port |
printenv
in the Shell workspace tool or print them from your code.
Environment Variable | Description |
---|---|
REPLIT_DOMAINS | Comma-separated list of all domains associated with your Replit App |
REPLIT_USER | Username of the current editor, which may vary in Multiplayer sessions |
REPLIT_DEPLOYMENT | Set to 1 if the code is running in a deployment, unset otherwise |
REPLIT_DEV_DOMAIN | Development URL on the replit.dev domain, which is different from the Deployment URL |
os.environ
object or running printenv
in the Shell.