Self-host Kutt with Levelrail

A modern URL shortener with custom domains, link analytics and an API, backed by Postgres and Redis.

How to self-host Kutt

  1. Pull the images

    3 images are pulled on your server.

    Show images
    • postgres:16-alpine
    • kutt/kutt:v3.2.6
    • redis:7-alpine
  2. Create the app

    3 services start in a single Compose app, with 3 named volume mounts for your data, on port 3000.

  3. Fill in the secrets

    3 secrets are generated and stored encrypted, 14 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Kutt requirements

Memory
About 384 MiB
Architectures
amd64 image published, arm64 image published
Ports
3000
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
MIT, permissive license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Kutt. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Kutt docs page.

Deploy Kutt your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Kutt from the CLI

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

levelrail-cli templates install kutt --name my-kutt

Deploy Kutt with the API

Create a token in the dashboard first. Name, env and domains are the request fields.

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/kutt/install \
  -d '{
    "name": "my-kutt"
  }'

Kutt configuration

Kutt services

ServiceImagePortsVolumes
db postgres:16-alpine none pgdata -> /var/lib/postgresql/data
kutt kutt/kutt:v3.2.6 3000 uploads -> /kutt/custom
redis redis:7-alpine none redis -> /data

Kutt environment variables

VariableServiceValue
POSTGRES_DB db Preset by the template
POSTGRES_PASSWORD db Generated at deploy
POSTGRES_USER db Preset by the template
DB_CLIENT kutt Preset by the template
DB_HOST kutt Preset by the template
DB_NAME kutt Preset by the template
DB_PASSWORD kutt Generated at deploy
DB_PORT kutt Preset by the template
Show all 17 variables
  • DB_USERkuttPreset by the template
  • DEFAULT_DOMAINkuttPreset by the template
  • DISALLOW_ANONYMOUS_LINKSkuttPreset by the template
  • DISALLOW_REGISTRATIONkuttPreset by the template
  • JWT_SECRETkuttGenerated at deploy
  • REDIS_ENABLEDkuttPreset by the template
  • REDIS_HOSTkuttPreset by the template
  • REDIS_PORTkuttPreset by the template
  • TRUST_PROXYkuttPreset by the template

Ports and volumes

Ports
3000
Volumes
3 named mounts: pgdata -> /var/lib/postgresql/data, uploads -> /kutt/custom, redis -> /data

Kutt FAQ

How much memory does Kutt need?

The catalog lists about 384 MiB of memory for Kutt across its 3 services.

Does Kutt run on arm64?

For Kutt, an arm64 image is published; amd64 is image published.

What licence is Kutt under?

Kutt is licensed under MIT, which is permissive, with few conditions on reuse.

Does Kutt need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Kutt bundle?

The template includes Postgres and Redis, running as its own service.

Which ports does Kutt use?

Kutt listens on port 3000 inside the stack.

Where does Kutt keep its data?

In named volumes: pgdata mounted at /var/lib/postgresql/data, uploads mounted at /kutt/custom and redis mounted at /data.

Can I deploy Kutt on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id kutt for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, kutt/kutt:v3.2.6, redis:7-alpine is what you deploy there.

levelrail-cli templates install kutt --name my-kutt