Nomploy Nomad Packs

← All packs

kutt v0.1.0

Productivity

Kutt — a modern, self-hosted URL shortener with custom domains, link expiration, stats, an API and a clean UI. Deployed as a single host-networked Nomad service (SQLite).

nomad-pack run kutt --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- kutt

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 3000 1 volume image kutt/kutt:latest tracks :latest image bumped today
Variables 11
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run kutt -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "kutt"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Kutt container image. Pin a tag in production.
image = "kutt/kutt:latest"

# Host port for the Kutt web UI.
port = 3000

# The domain (host:port) that generated short links use.
default_domain = "localhost:3000"

# Display name of the instance.
site_name = "Kutt"

# Secret used to sign auth tokens. CHANGE THIS to a long random value.
jwt_secret = "change_me_to_a_long_random_jwt_secret_0000"

# Named volume for the SQLite database (/var/lib/kutt).
data_volume = "kutt_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"kutt"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"kutt/kutt:latest"
The Kutt container image. Pin a tag in production.
port number
3000
Host port for the Kutt web UI.
default_domain string
"localhost:3000"
The domain (host:port) that generated short links use.
site_name string
"Kutt"
Display name of the instance.
jwt_secret set me string
"change_me_to_a_long_random_jwt_secret_0000"
Secret used to sign auth tokens. CHANGE THIS to a long random value.
data_volume string
"kutt_data"
Named volume for the SQLite database (/var/lib/kutt).
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: kutt_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/kutt_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/kutt_data/_data backup:<bucket>/kutt_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

kutt

Kutt is a modern, open-source URL shortener. It supports custom domains, custom short URLs, link expiration and passwords, per-link click stats, a REST API, browser extensions and a clean web UI — a self-hosted alternative to Bitly.

This pack runs Kutt as a single host-networked Nomad service using SQLite, so there's no separate database or Redis to run.

Deploy

nomad-pack run kutt --registry=nomploy \
  --var default_domain=links.example.com \
  --var jwt_secret=$(openssl rand -hex 24)

Open http://<node-ip>:3000 and register the first account.

Configuration

Variable Default Description
image kutt/kutt:latest Container image (pin a tag in production).
port 3000 Host port for the web UI.
default_domain localhost:3000 Domain used for generated short links.
site_name Kutt Display name of the instance.
jwt_secret placeholder Auth-token secret — change this.
data_volume kutt_data Volume for the SQLite database (/var/lib/kutt).
resources 300 MHz / 256 MB CPU and memory for the task.

The database persists in data_volume. To send verification/reset emails or scale out, enable the MAIL_* and REDIS_* settings from the Kutt docs.