shlink
by m11s
Deploy Shlink, a self-hosted URL shortener
About this chart
shlink
Helm chart for Shlink — a self-hosted URL shortener.
Usage
helm upgrade --install shlink m11s/shlink \
--set shlink.defaultDomain=s.example.com \
--set geolite.existingSecret.name=shlink-geolite
Configuration
Required
| Key | Description |
|---|---|
shlink.defaultDomain | The short domain served by this instance (e.g. s.example.com) |
Database
Shlink supports two mutually exclusive backends — pick one:
Option A — SQLite (default, no external DB required)
SQLite stores data in /etc/shlink/data. Persistence is enabled by default
through data:
data:
enabled: true
size: 1Gi
storageClassName: null
The PVC is annotated helm.sh/resource-policy: keep so it survives helm uninstall.
Option B — External database (recommended for production)
Set db.driver to postgres, mysql, or mssql and point at your database server.
The data PVC also holds GeoLite and runtime files; set data.enabled: false
to use ephemeral storage for those files.
db:
driver: postgres
host: postgres.dbs.svc
name: shlink
user: shlink
existingSecret:
name: shlink-db # must contain key db-password
GeoLite
GeoLite is used for visitor geolocation. Supply a license key or skip the download:
geolite:
existingSecret:
name: shlink-geolite # must contain key geolite-license-key
# OR skip geolocation entirely:
geolite:
skipDownload: true
Initial API key
initialApiKey:
existingSecret:
name: shlink-api-key # must contain key initial-api-key
Redis
redis:
enabled: true
servers: redis://redis.cache.svc:6379
existingSecret:
name: shlink-redis # must contain keys redis-user, redis-password
HTTPRoute (Gateway API)
httpRoute:
enabled: true
parentRefs:
- name: public-gateway
namespace: gateway
hostnames:
- s.example.com
Deploy shlink with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has shlink 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartshlink is pinned at v0.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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