Skip to content

normalperson543/selfhostable-link-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9781967 · · Jan 27, 2026

History

17 Commits
Jan 27, 2026
Jan 27, 2026
Jan 25, 2026
Jan 27, 2026
Jan 27, 2026
Jan 25, 2026
Jan 27, 2026
Jan 27, 2026
Jan 27, 2026
Jan 25, 2026
Jan 25, 2026
Jan 25, 2026
Jan 27, 2026
Jan 27, 2026
Jan 25, 2026
Jan 26, 2026
Jan 25, 2026

Repository files navigation

A selfhostable link shortener in Next.js

A basic link shortener that supports expiration dates and maximum view counts. You can self host it yourself.

This is an MVP and may have bugs. Please don't use in a production instance.

Demo

Want to see how this project works?

https://shorten.octotwelve.xyz

There are limitations to help avoid people using it as an actual link shortener.

Deploy yourself!

You'll need node and npm.

Go to the .env.example file and rename it to .env. Then, generate a better auth secret. Then change the better auth URL and site URL to your domain (incl. http:// or https://). Put in a postgres database URL in the DATABASE_URL env var. You can also choose to require logins to use the link shortener.

Run the following in your terminal:

npm i
npx prisma generate && npx prisma db push
npm build
npm start
m start
rt

Open localhost:3000 in your browser to see the result.

Developing

Follow the environment variable instructions above. Then run the following in your terminal:

npm i
npx prisma generate && npx prisma db push
npm run dev
run dev
v

Open localhost:3000 in your browser to see the result.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published