---
title: "Self-hosted URL shortener on Cloudflare · Flared"
description: "Flared is an open-source URL shortener you deploy to your own Cloudflare account. It runs on Workers Free, with custom domains, analytics, a CLI, an API, and MCP."
---

Self-hosted URL shortener

# Your Cloudflare account. Your corner of the web.

Flared is an open-source URL shortener that you deploy to your own Cloudflare account. It runs on Workers Free, needs no server or email provider, and gives you branded short links, click analytics, QR codes, a CLI, an API, and an MCP server.

## What the standalone edition includes

Link management, redirects, analytics, QR codes, custom domains, members, and a shared web/API/CLI/MCP workflow. Limits are operator-configurable, with 30-day analytics retention by default. No paid feature unlocks. See how it compares with YOURLS, Shlink, Kutt, Sink, and Dub in [six open-source URL shorteners](https://flared.page/compare/self-hosted-url-shorteners).

## What you need

- A Cloudflare account. Workers Free works.
- A GitHub or GitLab account. Deploy on Cloudflare copies the latest release into a repository there.
- A setup secret of at least 16 characters. [Generate one here](https://flared.page/secrets), or run `openssl rand -base64 48`.

## Deploy in four steps

1. Open [Deploy on Cloudflare](https://deploy.workers.cloudflare.com/?url=https://github.com/FlaredLink/Flared).
2. Enter your setup secret as `SETUP_SECRET` and start the deploy. Cloudflare creates the databases and Queues, applies the migrations, and deploys the Worker.
3. Open the Worker address, such as `https://flared.YOUR-SUBDOMAIN.workers.dev`. Enter the secret, a username, a password of at least 12 characters, and a workspace name.
4. The setup creates your first link and waits until a click on it counts. Setup then closes for good.

Your own domain can follow: move the app to it, and add subdomains for short links. The full guide is in the [deploy documentation](https://github.com/FlaredLink/Flared/blob/main/docs/self-hosting/deploy.md).

## What it costs on Workers Free

Flared needs no paid Cloudflare plan. Workers Free has daily allowances, and Workers Paid (US$5 a month) gives more room. On Workers Free:

| Cloudflare allowance | What it means for Flared |
| --- | --- |
| 100,000 Worker requests a day | App pages and short link redirects together |
| 10,000 Queue operations a day | About 3,300 recorded clicks a day (3 operations per click) |
| 100,000 D1 rows written a day | About 12,000 recorded clicks a day (about 8 rows per click) |
| 500 MB per D1 database | Settings shows the size of the analytics database |

The first limit is 50,000 recorded clicks a month, about 1,700 a day, which fits these allowances. Past the Queue allowance, links still redirect, and the extra clicks are not recorded until 00:00 UTC. If the account reaches a daily D1 limit, links and sign-in stop until 00:00 UTC; move to Workers Paid if you expect that much traffic. On a new Workers Free account on 2026-10-08, a redirect used a median of 5 ms of CPU time. See the [limits documentation](https://github.com/FlaredLink/Flared/blob/main/docs/self-hosting/limits.md) for the measurements.

## What runs in your account

One Worker serves the app, the API, OAuth, the MCP endpoint, and short links on one address. Three D1 databases hold accounts, links, and analytics. A Queue carries clicks to the analytics database, and two cron triggers run maintenance. Point an uptime monitor at `/healthz`.

The [CLI](https://flared.page/docs#cli) works with your installation when you set `FLARED_API_URL` to its API, such as `https://links.example.com/v1`. AI assistants connect to `/mcp` on the same address, as described in [Connect an AI assistant](https://flared.page/docs/assistants).

## Setup without an email provider

Sign in with a username and password. To add a member, send them an invite link; they choose their own username and password. A member who forgets their password gets a reset link from you. Without email, only the Cloudflare account can reset the owner's password.

## Operate on your terms

You supply the Cloudflare account and pay its infrastructure costs. Updates use tagged releases and an explicit upgrade process. Turn on update checks, and the app tells you when a new release is out; they are off by default and send no data about your installation. Recovery uses your Cloudflare credentials; Flared does not retain standing access to your installation.

## Open source under AGPLv3

The public core uses AGPLv3 (AGPL-3.0-only), an open-source license. Self-hosting and commercial use are permitted under its terms. Modified versions offered over a network must offer their corresponding source to users. Read the repository license for the full terms.

[Deploy to Cloudflare](https://deploy.workers.cloudflare.com/?url=https://github.com/FlaredLink/Flared) [View the source](https://github.com/FlaredLink/Flared) [Prefer managed hosting?](https://flared.page/site/cloud)
