kutt
Kutt is a free modern URL shortener.
About this chart
kutt
Kutt is a free modern URL shortener.
TL;DR;
helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/kutt
Or install it from the OCI registry:
helm install my-release oci://ghcr.io/christianhuth/helm-charts/kutt
Introduction
This chart bootstraps the free modern URL shortener called Kutt using the Helm package manager.
Prerequisites
- Kubernetes 1.29+
- The CloudNativePG operator if the bundled PostgreSQL database is used (
postgresql.enabled: true, the default)
Installing the CloudNativePG operator
The chart bundles a PostgreSQL cluster as a custom resource of the CloudNativePG operator (via the upstream chart cnpg/cluster). The operator itself is not part of this chart, as it is installed once per Kubernetes cluster:
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update
helm upgrade --install cnpg cnpg/cloudnative-pg --namespace cnpg-system --create-namespace --wait
Valkey (valkey/valkey) is bundled as a regular subchart and doesn't need an operator.
Installing the Chart
To install the chart with the release name my-release:
helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/kutt
The chart is also published as an OCI artifact which can be installed like this:
helm install my-release oci://ghcr.io/christianhuth/helm-charts/kutt
These commands deploy Kutt on the Kubernetes cluster in the default configuration. The Values section lists the values that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall the my-release deployment:
helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuring the Dependencies
Kutt needs a PostgreSQL database and optionally uses a Redis-compatible cache. Both are either bundled with the chart or provided externally. Passwords are read from Secrets, using existing Secrets is recommended for production.
PostgreSQL
Create a Secret of type kubernetes.io/basic-auth containing the credentials of the database owner. The username has to match postgresql.cluster.initdb.owner:
kubectl create secret generic kutt-database \
--type=kubernetes.io/basic-auth \
--from-literal=username=kutt \
--from-literal=password='<password>'
postgresql:
cluster:
initdb:
database: kutt
owner: kutt
secret:
name: kutt-database
If no Secret is referenced, the operator generates a random password and stores the credentials in the Secret <release>-postgresql-app. All other settings of the PostgreSQL cluster (e.g. postgresql.cluster.instances, postgresql.cluster.storage, backups) are passed to the upstream chart. See its values for all options.
Valkey
By default Valkey requires the inline password kutt for the user default, which Kutt authenticates as. For production, create a Secret containing the password and reference it in your values:
kubectl create secret generic kutt-valkey --from-literal=password='<password>'
valkey:
auth:
enabled: true
usersExistingSecret: kutt-valkey
aclUsers:
default:
permissions: "~* &* +@all"
passwordKey: password
password: ""
All other settings are passed to the upstream chart, see its values. Set valkey.enabled: false (and leave externalRedis.hostname empty) to run Kutt without a cache.
External Services
postgresql:
enabled: false
externalDatabase:
hostname: postgresql.example.com
port: 5432
database: kutt
username: kutt
existingSecret: kutt-database
existingSecretPasswordKey: password
valkey:
enabled: false
externalRedis:
hostname: redis.example.com
port: 6379
existingSecret: kutt-redis
existingSecretPasswordKey: password
Instead of existingSecret you can set password, which lets the chart create the Secret.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity settings for pod assignment |
| autoscaling.enabled | bool | false | Enable Horizontal POD autoscaling |
| autoscaling.maxReplicas | int | 100 | Maximum number of replicas |
| autoscaling.minReplicas | int | 1 | Minimum number of replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization percentage |
| deploymentStrategy | object | {} | Update strategy for the deployment |
| externalDatabase.database | string | "kutt" | Name of the database to use |
| externalDatabase.existingSecret | string | "" | Name of an existing Secret containing the password of the user |
| externalDatabase.existingSecretPasswordKey | string | "password" | Key in the existing Secret containing the password |
| externalDatabase.hostname | string | "" | Hostname of the external PostgreSQL database. Used if postgresql.enabled is false. |
| externalDatabase.password | string | "" | Password of the user. Ignored if externalDatabase.existingSecret is set. |
| externalDatabase.port | int | 5432 | Port of the external PostgreSQL database |
| externalDatabase.username | string | "kutt" | Name of the user to use |
| externalRedis.existingSecret | string | "" | Name of an existing Secret containing the password |
| externalRedis.existingSecretPasswordKey | string | "password" | Key in the existing Secret containing the password |
| externalRedis.hostname | string | "" | Hostname of an external Redis or Valkey server. Used if valkey.enabled is false. |
| externalRedis.password | string | "" | Password of the user default. Ignored if externalRedis.existingSecret is set. Leave empty if the server does not require authentication. |
| externalRedis.port | int | 6379 | Port of the external server |
| extraEnv | list | [] | additional environment variables to be added to the pods |
| extraEnvFrom | list | [] | load additional environment variables from ConfigMaps or Secrets |
| fullnameOverride | string | "" | String to fully override "kutt.fullname" |
| image.pullPolicy | string | "Always" | image pull policy |
| image.registry | string | "docker.io" | image registory |
| image.repository | string | "kutt/kutt" | image repository |
| image.tag | string | "v3.2.6" | Overrides the image tag |
| imagePullSecrets | list | [] | If defined, uses a Secret to pull an image from a private Docker registry or repository. |
| ingress.annotations | object | {} | Additional annotations for the Ingress resource |
| ingress.className | string | "" | IngressClass that will be be used to implement the Ingress |
| ingress.enabled | bool | false | Enable ingress record generation |
| ingress.hosts | list | see values.yaml | An array with the hosts configuration |
| ingress.tls | list | [] | An array with the tls configuration |
| kutt.admin.emails | string | "" | Comma seperated list of email addresses that can access admin actions on settings page |
| kutt.config.disallowAnonymousLinks | bool | false | Disable anonymous link creation |
| kutt.config.disallowRegistration | bool | false | Disable registration |
| kutt.config.enableRateLimit | bool | false | Enable rate limitting for some API routes. If Redis is enabled uses Redis, otherwise, uses memory. |
| kutt.config.linkCustomAlphabet | string | "" | Alphabet used to generate custom addresses. Default value omits o, O, 0, i, I, l, 1, and j to avoid confusion when reading the URL. |
| kutt.config.linkLength | int | 6 | Generated link length |
| kutt.config.siteName | string | "Kutt" | The name of the site where Kutt is hosted |
| kutt.database.client | string | "pg" | Which database client to use. This Chart currently only supports PostgreSQL: pg or pg-native. NOTE: pg-native is not installed by default, create your own image to use it. |
| kutt.database.pool.max | int | 10 | Maximum number of database connection pools. Only if you use Postgres or MySQL. |
| kutt.database.pool.min | int | 0 | Minimum number of database connection pools. Only if you use Postgres or MySQL. |
| kutt.database.useSsl | bool | false | Whether use SSL for the database connection. Only if you use Postgres or MySQL. |
| kutt.domain.customDomainUseHttps | bool | false | Use HTTPS for links with custom domain |
| kutt.domain.defaultDomain | string | "localhost:3000" | The domain that this website is on |
| kutt.domain.useFirstIngressHost | bool | false | If you use an ingress to expose Kutt you can simply set this to true to use the first hostname defined in the ingress. |
| kutt.jwt.existingSecret | string | "" | Use existing secret for JWT secret key. The secret has to contain the key JWT_SECRET. When it's set the kutt.jwt.key is ignored. |
| kutt.jwt.key | string | "secret-jwt-key" | make sure to replace with your own secret key |
| kutt.mail.contactEmail | string | "" | Support email to show on the app |
| kutt.mail.enabled | bool | false | Enable emails, which are used for signup, verifying or changing email address, resetting password, and sending reports. If is disabled, all these functionalities will be disabled too. |
| kutt.mail.existingSecret | string | "" | Use existing secret for password details. The secret has to contain the key MAIL_PASSWORD. When it's set the kutt.mail.password is ignored. |
| kutt.mail.from | string | "" | The email address Kutt will send emails from. |
| kutt.mail.host | string | "smtp.example.com" | The host of the external SMTP server that Kutt should use to send emails. |
| kutt.mail.password | string | "" | The password to authenticate to the smtp host when sending emails. |
| kutt.mail.port | int | 465 | The port used to connect to the smtp host. |
| kutt.mail.reportEmail | string | "" | The email address that will receive submitted reports. |
| kutt.mail.secure | bool | false | If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
| kutt.mail.username | string | "[email protected]" | The username to authenticate to the smtp host when sending emails. |
| kutt.recaptcha.existingSecret | string | "" | Use existing secret for ReCaptacha secrets. The secret has to contain the keys RECAPTCHA_SITE_KEY and RECAPTCHA_SECRET_KEY. When it's set the kutt.recaptcha.siteKey and kutt.recaptcha.secretKey is ignored. |
| kutt.recaptcha.secretKey | string | "" | Invisible reCaptcha secret key. Create one in https://www.google.com/recaptcha/intro/ |
| kutt.recaptcha.siteKey | string | "" | Invisible reCaptcha site key. Create one in https://www.google.com/recaptcha/intro/ |
| nameOverride | string | "" | Provide a name in place of kutt |
| nodeSelector | object | {} | Node labels for pod assignment |
| podAnnotations | object | {} | Annotations to be added to exporter pods |
| podSecurityContext | object | {} | pod-level security context |
| postgresql.cluster.imageName | string | "ghcr.io/cloudnative-pg/postgresql:18-standard-trixie" | PostgreSQL image. The tag only pins the major version, so restarted instances get the latest minor version. |
| postgresql.cluster.imagePullPolicy | string | "Always" | Pull the image on every start to get the latest minor version of the major version |
| postgresql.cluster.initdb.database | string | "kutt" | Name of the database to create |
| postgresql.cluster.initdb.owner | string | "kutt" | Name of the user owning the database |
| postgresql.cluster.instances | int | 3 | Number of PostgreSQL instances (one primary, the others are replicas) |
| postgresql.cluster.storage.size | string | "8Gi" | Size of the PVC of each instance |
| postgresql.enabled | bool | true | Enable a PostgreSQL cluster managed by the CloudNativePG operator. Requires the operator to be installed in the cluster (see README). |
| postgresql.version.postgresql | string | "18" | PostgreSQL major version. Has to match the major version of postgresql.cluster.imageName. |
| replicaCount | int | 1 | Number of replicas |
| resources | object | {} | Resource limits and requests for the pods. |
| revisionHistoryLimit | int | 10 | The number of old ReplicaSets to retain |
| route.main.additionalRules | list | [] | Additional custom rules that can be added to the route |
| route.main.annotations | object | {} | Add annotations to the route |
| route.main.apiVersion | string | "gateway.networking.k8s.io/v1" | Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2 |
| route.main.enabled | bool | false | Enables or disables the route |
| route.main.filters | list | [] | Filters define the filters that are applied to requests that match this rule. |
| route.main.hostnames | list | [] | Hostnames to be matched |
| route.main.httpsRedirect | bool | false | adds a filter for redirecting to https (HTTP 301 Moved Permanently). To redirect HTTP traffic to HTTPS, you need to have a Gateway with both HTTP and HTTPS listeners. Matches and filters do not take effect if enabled. Ref. https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/ |
| route.main.kind | string | "HTTPRoute" | Set the route kind Valid options are GRPCRoute, HTTPRoute |
Deploy kutt with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kutt 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 chartkutt is pinned at v10.1.2 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