A foss, self hostable, and private link shortener. Every element of the shortner is self-hostable for free using Cloudflare.
Demo instance available here: https://short.willow.sh/
-
Create KV Namespaces
You need to create two KV Namespaces for short, you can do that here. They can be named anything but I chose
SHORT_LINKSandSHORT_LINKS_MAP. -
Hosting on Cloudflare Pages
Fork this repo and connect it to Cloudflare pages. You should use the following deploy settings:
-
Add the KV Bindings to your Pages project
On pages under
Settings > Functions > KV namespace bindingsyou need to add the followingLINKSandLINKS_MAPvariables for preview and production. They must be named exactly otherwise they won't work
All configuration is done with environment variables.
If you want to protect your installation with auth you can set the SHORT_AUTH_USERNAME and SHORT_AUTH_PASSWORD environment variable. This will prevent access to the UI and still allow people with a valid link to use it.
This project follows SemVer and has a changelog available. However, you should always read the changes before updating your self hosted version!
In v2 we removed the need for a seperate backend cf worker. After you migrate the frontend you can just delete the worker, since all your data is in KV you won't lose anything or have any migration for it.
To migrate you should update your fork, and add the following KV under Settings > Functions > KV namespace bindings of your pages project:


