Skip to content

Getting Started

Sink is a self-hosted short-link app with visit analytics. It runs on Cloudflare (no VPS required).

1. Fork Sink

Create a fork of the Sink repository in your GitHub account.

2. Choose where to deploy

Both use Git: Cloudflare builds from your fork and publishes the app.

3. Create Cloudflare resources

In the Cloudflare dashboard, create the services Sink will use. Later you will bind them to the project — binding means “connect this database/storage to Sink under a fixed name”.

Binding nameCloudflare productRequired?What it is
DBD1 (database)YesStores your links
KVKV (key-value store)YesSpeeds up redirects
ANALYTICSAnalytics EngineRecommendedVisit stats and logs
R2R2 (object storage)OptionalBackups and social preview images
AIWorkers AIOptionalAI-suggested short codes and titles

For the full experience, create all five. You can add analytics later — see Analytics and Realtime.

After creating D1 and KV, open each resource’s detail page and copy its ID (you will paste it into deploy settings).

4. Configure and deploy

Follow the Workers or Pages guide to connect the fork, add bindings, and set variables.

Set NUXT_SITE_TOKEN yourself

This is your dashboard login password and the password used by API tools. Use a long random string (at least 8 characters) and keep it stable — changing it signs everyone out.

If you skip it, Sink may invent a random password at build time that can change on the next deploy, and you will not be able to log in reliably.

Other settings: configuration reference.

  1. Open https://your-domain/dashboard
  2. Sign in with the NUXT_SITE_TOKEN you set
  3. Open Dashboard → Links once

Why open Links once?

The first open finishes a one-time storage setup. Until then, creating links or backups may fail with “storage not ready” (HTTP 423). New installs only need a quick empty check; older KV-only installs migrate data here — see storage setup / migration.

  1. Create your first short link

The dashboard supports multiple languages. Docs are available in English and Simplified Chinese.