A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own domain.
helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/shlink-backend
This chart bootstraps a self-hosted URL shortener called Shlink using the Helm package manager.
- Kubernetes 1.19+
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/shlink-backend
These commands deploy Shlink 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
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.
Key | Type | Default | Description |
---|---|---|---|
affinity | object | {} |
Affinity settings for pod assignment |
autoscaling.enabled | bool | false |
|
autoscaling.maxReplicas | int | 100 |
|
autoscaling.minReplicas | int | 1 |
|
autoscaling.targetCPUUtilizationPercentage | int | 80 |
|
config.database.auth.database | string | "" |
The database name to be used when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled |
config.database.auth.existingSecret | string | "" |
Use existing secret for password details (config.database.auth.password will be ignored and picked up from this secret). The secret has to contain the key database-password . |
config.database.auth.password | string | "" |
The password credential to be used when using an external database driver. |
config.database.auth.username | string | "" |
The username credential to be used when using an external database driver. |
config.database.driver | string | "sqlite" |
mysql, maria, postgres or sqlite. Will be set automatically when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled |
config.database.host | string | "" |
The host name of the database server when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled |
config.database.port | int | 0 |
The port in which the database service is running when using an external database driver. Default value is based on the value provided for DB_DRIVER. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled |
config.database.useEncryption | bool | false |
Whether it is desired to use an encrypted connection with the database or not |
config.general.basePath | string | "" |
The base path from which you plan to serve Shlink, in case you don’t want to serve it from the root of the domain. It has to start with a bar, like /shlink. Defaults to ''. |
config.general.cacheNamespace | string | "" |
A prefix used for all cache keys generated by Shlink. It’s important to set a unique value here if you have multiple Shlink instances sharing the same cache store (same server when not using redis, or same redis cluster), otherwise there could be collisions. Defaults to Shlink. |
config.general.defaultDomain | string | "" |
The default short domain used for this Shlink instance. For example s.test. |
config.general.initialApiKey | string | "" |
An API key that will be created once during container start-up, with admin permissions. |
config.general.isHttpsEnabled | bool | false |
Tells if Shlink is served with https or not (true or false). It’s still up to you to actually serve it with HTTPS. |
config.general.memoryLimit | string | "" |
The maximum amount of memory that every Shlink process can use. You can provide a number, which will be the amount of memory in bytes, or a number followed by K for kilobytes, M for megabytes or G for gigabytes. You can also provide -1 to set no memory limit. Defaults to 512M. |
config.general.timezone | string | "" |
A timezone code as defined in this list. All dates stored by Shlink (visits, short URL creation, etc) will be considered to be on this timezone. By default, the default timezone set in PHP config will be used, which is UTC in the case of the docker image. |
config.geolite.licenseKey | string | "" |
The license key used to download new GeoLite2 database files. Go to GeoLite2 license key to know how to generate it. Not providing a license key will completely disable visits geolocation. |
config.geolite.skipInitialDownload | bool | false |
If provided with value true, it will skip the initial GeoLite2 db file download, speeding-up the container start-up. As a side effect, first visits on this container will remain un-located until the file finishes downloading in background. |
config.matomo.auth.apiToken | string | "" |
The API token so that Shlink can call Matomo’s API |
config.matomo.auth.existingSecret | string | "" |
Use existing secret for the API token details (config.matomo.auth.apiToken will be ignored and picked up from this secret). The secret has to contain the key api-token . |
config.matomo.baseUrl | string | "" |
The external Matomo server URL. |
config.matomo.enabled | bool | false |
Enable the Matomo integration to sent visits |
config.matomo.siteId | string | "" |
The site ID to be used for Shlink visits. |
config.mercure.auth.existingSecret | string | "" |
Use existing secret for the JWT secret details (config.mercure.auth.jwtSecret will be ignored and picked up from this secret). The secret has to contain the key jwt-secret . |
config.mercure.auth.jwtSecret | string | "" |
The secret key that was provided to the mercure hub server, in order to be able to generate valid JWTs for publishing/subscribing to that server. |
config.mercure.enabled | bool | false |
Enable the Mercure Hub integration. |
config.mercure.internalHubUrl | string | "" |
An internal URL for a mercure hub. Will be used only when publishing updates to mercure, and does not need to be public. |
config.mercure.publicHubUrl | string | "" |
The public URL of a mercure hub server to which Shlink will sent updates. This URL will also be served to consumers that want to subscribe to those updates. |
config.qrCodes.codeForDisabledShortUrls | bool | true |
Whether generating QR codes should work for disabled short URLs. Disabled short URLs are those which reached the maximum amount of visits, have a validSince date in the future, or a validUntil date in the past. |
config.qrCodes.defaultColors.background | string | "#FFFFFF" |
The QR code background color. |
config.qrCodes.defaultColors.foreground | string | "#000000" |
The QR code foreground color. |
config.qrCodes.defaultErrorCorrection | string | "l" |
One of L (Low), M (Medium), Q (Quartile) or H (High), to determine the default error correction of generated QR codes when the errorCorrection query param is not provided. |
config.qrCodes.defaultFormat | string | "png" |
One of png or svg, to determine the default format of generated QR codes when the format query param is not provided. |
config.qrCodes.defaultLogoUrl | string | "" |
A URL pointing to a logo that will be placed in the middle of the QR code. This one is experimental, as some images might break the QR code. |
config.qrCodes.defaultMargin | int | 0 |
A value greater than 0 to determine the default margin of generated QR codes when the margin query param is not provided. |
config.qrCodes.defaultRoundBlockSize | bool | true |
Tells if the block size should be round on QR codes, making it more readable, but potentially adding some extra margin as a side effect. |
config.qrCodes.defaultSize | int | 300 |
A value between 50 and 1000 to determine the default size of generated QR codes when the size query param is not provided. |
config.rabbitmq.auth.existingSecret | string | "" |
Use existing secret for password details (config.rabbitmq.auth.password will be ignored and picked up from this secret). The secret has to contain the key rabbitmq-password . |
config.rabbitmq.auth.password | string | "" |
The password credential to be used when using an external database driver. |
config.rabbitmq.auth.username | string | "" |
The username credential to be used when using an external database driver. |
config.rabbitmq.enabled | bool | false |
enable RabbitMQ™ Integration |
config.rabbitmq.host | string | "" |
The RabbitMQ server host name |
config.rabbitmq.useSsl | bool | false |
Whether connection is encrypted with SSL/TLS or not. |
config.rabbitmq.vhost | string | "/" |
The RabbitMQ server VHost |
config.redirects.cacheLifetime | int | 30 |
Allows to set the amount of seconds that redirects should be cached when redirect status is 301 or 308. |
config.redirects.defaultBaseUrlRedirect | string | "" |
If a URL is provided here, when a user tries to access Shlink’s base URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. |
config.redirects.defaultInvalidShortUrlRedirect | string | "" |
If a URL is provided here, when a user tries to access an invalid short URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. |
config.redirects.defaultRegular404Redirect | string | "" |
If a URL is provided here, when a user tries to access a URL not matching any supported by the router, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. |
config.redirects.extraPathMode | string | "default" |
Determines how Shlink should match short URLs when they start with a known short code. Valid values are default, append and ignore. (See Extra path forwarding for more info). |
config.redirects.statusCode | int | 302 |
301, 302, 308 or 307 (last two since v3.5.0). Determines the status code that should be used on redirects from short to long URLs. Setting 308 or 307 implicitly makes requests to short URLs work regardless the HTTP method. |
config.redis.enabled | bool | false |
enable Redis™ Integration |
config.redis.pubSubEnabled | bool | false |
Tells if the configured redis instance/cluster should also be used to publish real-time updates via redis pub/sub. |
config.redis.sentinal.enabled | bool | false |
|
config.redis.sentinal.service | string | "" |
The name of the sentinel service if you want to use redis sentinel. If this value is provided, the servers provided in config.redis.servers will be considered sentinel instances. |
config.redis.servers | string | "" |
The comma-separated list of Redis servers when using external Redis servers. Will be ignored when you activate one of the integrated Redis subchart with redis.enabled |
config.robots.allowAllShortUrls | bool | false |
Whether all short URLs should be allowed via robots.txt or not. If set to true, the crawlable option set in individual short URLs will be ignored. |
config.robots.userAgents | string | "*" |
A comma-separated list of allowed user agents via robots.txt. |
config.trackingVisits.anonymizeRemoteAddr | bool | true |
Tells if IP addresses from visitors should be obfuscated before storing them in the database. See Tracking visits for more info. |
config.trackingVisits.disable | bool | false |
Tells if visits tracking should be completely disabled. See Tracking visits for more info. |
config.trackingVisits.disableIpTracking | bool | false |
Tells if tracking of the IP address (and therefore visitors location) should be disabled. See Tracking visits for more info. |
config.trackingVisits.disableReferrerTracking | bool | false |
Tells if tracking of the referrer should be disabled. See Tracking visits for more info. |
config.trackingVisits.disableTrackingFrom | string | "" |
A comma-separated list of IP address patterns from which all tracking should be disabled. It allows providing fixed IP addresses (100.200.80.40), CIDR blocks (192.168.10.0/24) or wildcard patterns (11.22..) |
config.trackingVisits.disableTrackingParam | string | "" |
The name of a query param that can be used to visit short URLs avoiding the visit to be tracked. This feature won’t be available if no value is provided. See Tracking visits for more info. |
config.trackingVisits.disableUaTracking | bool | false |
Tells if tracking of the user agent should be disabled. See Tracking visits for more info. |
config.trackingVisits.trackOrphanVisits | bool | true |
Tells if orphan visits should be tracked or not. See Tracking visits for more info. |
config.urlShortening.autoResolveTitles | bool | true |
Used to automatically resolve the short URL’s title based on the title-tag in the long URL |
config.urlShortening.defaultShortCodesLength | int | 5 |
The length you want generated short codes to have. It defaults to 5 and has to be at least 4, so any value smaller than that will fall back to 4. |
config.urlShortening.deleteShortUrlThreshold | string | "" |
The amount of visits on short URLs which will not allow them to be deleted. If not provided, this restriction will be disabled. |
config.urlShortening.multiSegmentSlugsEnabled | bool | false |
Allows to create and handle multi-segment custom slugs when true is provided. See multi-segment custom slugs for more information. |
config.urlShortening.shortUrlMode | string | "strict" |
Determines how to match short URLs. Valid values are strict or loose. See short URLs mode for more information. |
config.urlShortening.shortUrlTrailingSlash | bool | false |
Allows to enable support for trailing slashes in short URLs when true is provided. See short URLs trailing slash for more information. |
extraEnv | list | [] |
additional environment variables to be added to the pods. See https://shlink.io/documentation/environment-variables for a complete list. |
fullnameOverride | string | "" |
String to fully override "shlink-backend.fullname" |
image.pullPolicy | string | "Always" |
image pull policy |
image.registry | string | "docker.io" |
image registry |
image.repository | string | "shlinkio/shlink" |
image repository |
image.tag | string | "4.4.2" |
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 | {} |
|
ingress.className | string | "" |
|
ingress.enabled | bool | false |
|
ingress.hosts[0].host | string | "chart-example.local" |
|
ingress.hosts[0].paths[0].path | string | "/" |
|
ingress.hosts[0].paths[0].pathType | string | "ImplementationSpecific" |
|
ingress.tls | list | [] |
|
mariadb.auth.database | string | "shlink" |
The database name to be used when using the integrated MariaDB database. |
mariadb.auth.password | string | "shlink" |
The password credential to be used when using the integrated MariaDB database. |
mariadb.auth.username | string | "shlink" |
The username credential to be used when using the integrated MariaDB database. |
mariadb.enabled | bool | false |
enable integrated MariaDB™ subchart from Bitnami |
mysql.auth.database | string | "shlink" |
The database name to be used when using the integrated MySQL database. |
mysql.auth.password | string | "shlink" |
The password credential to be used when using the integrated MySQL database. |
mysql.auth.username | string | "shlink" |
The username credential to be used when using the integrated MySQL database. |
mysql.enabled | bool | false |
enable integrated MySQL™ subchart from Bitnami |
nameOverride | string | "" |
Provide a name in place of shlink-backend |
nodeSelector | object | {} |
Node labels for pod assignment |
podAnnotations | object | {} |
Annotations to be added to pods |
podLabels | object | {} |
Labels to be added to pods |
podSecurityContext | object | {} |
pod-level security context |
postgresql.auth.database | string | "shlink" |
The database name to be used when using the integrated PostgreSQL database. |
postgresql.auth.password | string | "shlink" |
The password credential to be used when using the integrated PostgreSQL database. |
postgresql.auth.username | string | "shlink" |
The username credential to be used when using the integrated PostgreSQL database. |
postgresql.enabled | bool | false |
enable integrated PostgreSQL™ subchart from Bitnami |
rabbitmq.enabled | bool | false |
enable integrated RabbitMQ™ subchart from Bitnami |
redis.architecture | string | "standalone" |
Redis™ architecture. Allowed values: standalone or replication |
redis.auth.enabled | bool | false |
Enable password authentication |
redis.auth.sentinel | bool | false |
Enable password authentication on Redis™ Sentinels |
redis.enabled | bool | false |
enable integrated Redis™ subchart from Bitnami |
redis.sentinel.enabled | bool | false |
Use Redis™ Sentinel on Redis™ pods |
replicaCount | int | 1 |
Number of replicas |
resources | object | {} |
Resource limits and requests for the headwind pods. |
revisionHistoryLimit | int | 10 |
The number of old ReplicaSets to retain |
securityContext | object | {} |
container-level security context |
service.port | int | 8080 |
Kubernetes port where service is exposed |
service.type | string | "ClusterIP" |
Kubernetes service type |
serviceAccount.annotations | object | {} |
Annotations to add to the service account |
serviceAccount.create | bool | true |
Specifies whether a service account should be created |
serviceAccount.name | string | "" |
The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
tolerations | list | [] |
Toleration labels for pod assignment |
Specify each parameter using the --set key=value[,key=value]
argument to helm install
.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
helm install my-release -f values.yaml christianhuth/shlink-backend
This major updates the following dependencies:
- MariaDB to its newest major, 20.2.0: Here you can find more information about the changes introduced in that version.
- MySQL to its newest major, 12.2.0: Here you can find more information about the changes introduced in that version.
- PostgreSQL to its newest major, 16.3.0: Here you can find more information about the changes introduced in that version.
- RabbitMQ to its newest major, 15.2.0: Here you can find more information about the changes introduced in that version.
- Redis to its newest major, 20.5.0: Here you can find more information about the changes introduced in that version.
It also upgrades the Shlink Backend to its newest major, 4.4.0 and introduces a new way to define the configuration using the config.*
Values.
If you have been using the env
attribute so far to configure Shlink it is strongly recommended to migrate to the corresponding config.*
Value.
The env
attribute further has been replaced by an extraEnv
attribute.
This major updates the PostgreSQL subchart to its newest major, 14.0.0. Here you can find more information about the changes introduced in that version.
This major updates the Redis subchart to its newest major, 18.0.0. Here and here you can find more information about the changes introduced in that version.
Additionally it updates the MariaDB subchart to its newest major, 16.0.0. Here you can find more information about the changes introduced in that version.
This major updates the RabbitMQ subchart to its newest major, 12.0.0. Here and here you can find more information about the changes introduced in that version.
This major updates the PostgreSQL subchart to its newest major, 12.0.0. Here you can find more information about the changes introduced in that version.
Additionally it updates the RabbitMQ subchart to its newest major, 11.0.0. Here you can find more information about the changes introduced in that version.