dub

by m11s

Helm chartv0.3.3App 0.1.0Verified publisher

Deploy Dub, a self-hosted link management platform

About this chart

dub Helm Chart

Dub is an open-source link management platform — short links, analytics, and team workspaces.

Installation

helm repo add m11s https://m11s-io.github.io/helm-charts
helm repo update
helm install dub m11s/dub -n dub --create-namespace -f values.yaml

Configuration

Required

KeyDescription
dub.appUrlPublic URL of this Dub instance (e.g. https://dub.example.com)
auth.existingSecret.nameSecret containing NEXTAUTH_SECRET, ENCRYPTION_KEY, CRON_SECRET
db.existingSecret.nameSecret containing DATABASE_URL (full MySQL connection string)

Redis

Dub requires a Redis-compatible store. Two options:

Option A — Upstash REST endpoint

redis:
  upstash:
    restUrl: https://your-instance.upstash.io
    existingSecret:
      name: dub-redis
      tokenKey: upstash-redis-token

Option B — redis-http-proxy sidecar (wraps a standard Redis as an Upstash-compatible REST endpoint)

redis:
  srh:
    enabled: true
    connectionString: redis://redis.cache.svc:6379
    existingSecret:
      name: dub-srh
      tokenKey: srh-token

QStash (background jobs)

QStash enables webhooks, bulk imports, and cron jobs. Leave the secret unset to disable background jobs.

qstash:
  url: https://qstash.upstash.io
  existingSecret:
    name: dub-qstash
    tokenKey: qstash-token
    currentSigningKeyKey: qstash-current-signing-key
    nextSigningKeyKey: qstash-next-signing-key

Email

# Resend (preferred)
email:
  resend:
    existingSecret:
      name: dub-email
      apiKeyKey: resend-api-key

# SMTP fallback
email:
  smtp:
    host: smtp.example.com
    port: 587
    user: [email protected]
    existingSecret:
      name: dub-smtp
      passwordKey: smtp-password

Storage (S3-compatible)

storage:
  endpoint: https://s3.example.com
  baseUrl: https://assets.example.com
  publicBucket: dub-public
  privateBucket: dub-private
  existingSecret:
    name: dub-storage
    accessKeyIdKey: storage-access-key-id
    secretAccessKeyKey: storage-secret-access-key

Tinybird (analytics)

tinybird:
  apiUrl: https://api.tinybird.co
  existingSecret:
    name: dub-tinybird
    apiKeyKey: tinybird-api-key

HTTPRoute (Gateway API)

httpRoute:
  enabled: true
  parentRefs:
    - name: public-gateway
      namespace: gateway
  hostnames:
    - dub.example.com

Parameters

ParameterDescriptionDefault
replicaCountNumber of pod replicas1
service.typeKubernetes Service typeClusterIP
service.portPort the Service listens on3000
httpRoute.enabledEnable a Gateway API HTTPRoutefalse
httpRoute.parentRefsGateways the HTTPRoute attaches to; required when enabled[]
httpRoute.hostnamesHostnames the HTTPRoute matches[]
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request512Mi
resources.limits.memoryMemory limit1Gi
envExtra non-sensitive environment variables{}
extraEnvExtra env var objects (name/value or name/valueFrom)[]
extraEnvFromExtra envFrom sources (configMapRef, secretRef)[]

Source

Deploy dub with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dub on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdub is pinned at v0.3.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply