ByteBite Docs
Infrastructure

Secrets

Secret inventory, storage locations, and rotation policy — no values.

Secrets

This page inventories credentials and secrets by name only. Never commit secret values to Git or documentation.

Policy

RuleDetail
GitSecrets must never enter the repository
DocumentationDocument names, consumers, and storage — never values
ScopeMinimum required permissions for each credential
RotationRotate at provider/UI level; update Dokploy env or host files

Storage models

ModelUsed forExample
Dokploy environment variablesApplication runtime secretsDATABASE_URL, SENTRY_DSN
Host filesystem (restricted permissions)Infrastructure secrets Traefik readsCloudflare DNS API token
Local .env (git-ignored)Developer workstation onlyLocal Postgres password

Secret inventory

Secret / credentialConsumerStorage locationScope / permissionsRepository policyStatus
DATABASE_URLmigrate, APIDokploy env (staging)Internal PostgreSQL access.env.example shows format only; never real staging credsActive (staging)
Cloudflare DNS API tokenTraefik (letsencrypt-cloudflare)Host: /etc/dokploy/traefik/secrets/cloudflare-dns-api-tokenZone Read + DNS Edit on getbytebite.co onlyNever in GitActive (staging)
SENTRY_DSNAPI (via @bytebite/observability)Dokploy envProject-specific DSNOptional locally; placeholder in .env.exampleConfigured (optional)
STAGING_BASIC_AUTH_USERSTraefik (compose labels)Dokploy env (staging compose)Shared staging HTTP BasicAuthGenerate with infrastructure/scripts/staging-htpasswd.sh; never commitActive (staging)
BETTER_AUTH_SECRETAPI (Better Auth)Dokploy env (staging); local .envStaff session signingPlaceholder in .env.example (local/test only; never a production default)Active
STRIPE_SECRET_KEYAPI (future)Dokploy env (planned)Stripe APIEmpty placeholders in .env.exampleNot implemented
STRIPE_PUBLISHABLE_KEYStorefront (future)Build-time env (planned)Public keyEmpty placeholderNot implemented
STRIPE_WEBHOOK_SECRETAPI (future)Dokploy env (planned)Webhook verificationEmpty placeholderNot implemented
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEYAPI (SES send, scaffold)Dokploy env (planned)SES send permissionsEmpty placeholders; no-op without valuesScaffolded (optional)
AWS_REGIONAPI (SES send, scaffold)Dokploy env (planned)SES regionEmpty placeholder; required together with keys + from-addressScaffolded (optional)
SES_FROM_EMAILAPI (SES send, scaffold)Dokploy env (planned)Verified senderEmpty placeholder; no-op without valueScaffolded (optional)
TWILIO_ACCOUNT_SID / TWILIO_AUTH_TOKENAPI (SMS send + status stub)Dokploy env (planned)SMS send; webhook HMACEmpty placeholders; no-op / 503 without valuesScaffolded (optional)
TWILIO_MESSAGING_SERVICE_SIDAPI (unused placeholder)Dokploy env (planned)Messaging serviceEmpty placeholder; sends use sender ByteBite in codeUnused
S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEYAPILocal .env (MinIO defaults)S3 bucket accessDev placeholders onlyLocal dev only
MAPBOX_ACCESS_TOKENAPIDokploy env (planned); local .envSearch + permanent geocodingEmpty placeholder; suggest/quote/delivery checkout 503 without it; pickup still runsActive (optional)
ACME account keysTraefikacme.json, acme-cloudflare.jsonLet's Encrypt accountHost filesystem onlyActive
Restic repository passwordRestic backup / restoreHost: /etc/bytebite/backups/restic-passwordRestic repository encryptionNever in repository; off-host credential manager requiredActive (staging)
B2 S3-compatible credentials (backup)ResticHost: /etc/bytebite/backups/restic.envDedicated backup storage bucket accessNever in repositoryActive (staging)
Dokploy admin credentialsDokploy UIDokploy internalFull deployment accessNot in repositoryActive
SSH keysServer accessOperator workstationsServer administrationNot in repositoryActive

Cloudflare DNS API token

AttributeValue
File/etc/dokploy/traefik/secrets/cloudflare-dns-api-token
Permissions600, root:root
Container mount/run/secrets/cloudflare-dns-api-token via CF_DNS_API_TOKEN_FILE
Required scopesZone Read + DNS Edit on getbytebite.co
Optional hardeningSource IP restriction to 88.99.0.118/32

The token value must never appear in documentation.

Restic and B2 backup credentials

PostgreSQL off-host backups use Restic with Backblaze B2. Credentials are stored on BYTEBITE-APP-01 under /etc/bytebite/backups/:

FileConsumerPermissions
/etc/bytebite/backups/restic.envResticRoot-owned, restrictive
/etc/bytebite/backups/restic-passwordResticRoot-owned, restrictive
AttributeDetail
restic.env containsRepository target, credential environment, password-file reference
restic-password containsRestic repository encryption password
Repository policyNever commit to Git
Off-host copyRestic password must exist in a secure off-host credential manager

Never document or reproduce the contents of these files. Losing both the VM and the Restic encryption password makes encrypted backups unrecoverable from B2 alone.

B2 backup credentials are dedicated to backup storage and are separate from future application media S3 credentials.

Rotation (conceptual)

  1. Generate new credential at the provider (Cloudflare, Stripe, etc.).
  2. Update Dokploy environment or host filesystem file.
  3. Restart affected services (API containers for app secrets; dokploy-traefik for DNS token).
  4. Verify with Validation smoke tests.
  5. Revoke old credential at provider.

For Traefik DNS token rotation, also verify wildcard TLS issuance after restart.

Staging BasicAuth (STAGING_BASIC_AUTH_USERS) rotation: generate a new hash, update Dokploy, redeploy the compose application (restart is not enough), then verify unauthenticated 401 and authenticated health checks.

  • TLS — Cloudflare token usage
  • Security — trust boundaries
  • Operations — rotation procedures
  • .env.example — local placeholder names (no real secrets)

On this page