Add-on Environment Variables
When you attach an add-on, Watasu injects connection details into your app as config vars. This page lists them per add-on. Read these like any other config var (watasu config --app my-app), but don’t overwrite them — the add-on resets them on its next reconcile.
PostgreSQL
Section titled “PostgreSQL”| Variable | Purpose |
|---|---|
DATABASE_URL | Full Postgres connection string |
PGHOST | Hostname |
PGPORT | Port |
PGDATABASE | Database name |
PGUSER | Username |
PGPASSWORD | Password |
DATABASE_URL is what most ORMs and frameworks read. The discrete PG* variables are for tools (psql, pg_dump) and code that builds connections programmatically.
Valkey
Section titled “Valkey”| Variable | Purpose |
|---|---|
REDIS_URL | Redis-protocol connection URL |
The REDIS_URL name is intentional — Valkey speaks the Redis protocol, and existing libraries that look for REDIS_URL work unchanged.
Object Storage
Section titled “Object Storage”Object storage exports a wide set of S3-compatible variables so that whichever name your SDK looks for, it finds:
| Variable | Purpose |
|---|---|
S3_BUCKET | Bucket name (legacy/short form) |
AWS_S3_BUCKET | Bucket name (AWS-style) |
AWS_ACCESS_KEY_ID | Credential ID |
AWS_SECRET_ACCESS_KEY | Credential secret |
AWS_ENDPOINT_URL | Endpoint (this isn’t AWS — it’s the Watasu-managed S3-compatible endpoint) |
AWS_ENDPOINT_URL_S3 | Same as above, S3-specific override |
AWS_REGION | Region label expected by AWS SDKs |
AWS_DEFAULT_REGION | Same value, alternate name some SDKs read |
AWS_S3_REGION | Same value, S3-specific override |
AWS_S3_URL | Convenience URL combining bucket + endpoint |
Most SDKs (boto3, aws-sdk-*, rclone, minio, etc.) pick these up automatically.
ClickHouse
Section titled “ClickHouse”ClickHouse exports a connection URL plus discrete connection components. Use a standard ClickHouse client library; it’ll find what it needs.
Redpanda
Section titled “Redpanda”Redpanda exports broker addresses and SASL credentials. Use any Kafka-compatible client library.
Aliases
Section titled “Aliases”When you attach an add-on with --as <ALIAS>, every variable that add-on would normally export gets prefixed with ALIAS_:
watasu addons:attach reporting-db --app my-app --as REPORTINGNow your app sees both:
DATABASE_URL— the original primaryREPORTING_DATABASE_URL— the new alias
This is how you give one app multiple databases of the same kind, and it’s how PostgreSQL CLI commands target a specific database (watasu pg:psql REPORTING_DATABASE_URL).