Linxz is an easy-to-use, self-hostable, and private link sharing platform. It provides a simple interface to shorten links and includes granular control over their experation. You can specify a date and time or a number of clicks until the link is deleted forever. Or, if you want it forever, that works too.
Name | Description | Default | Required |
---|---|---|---|
BASE_URL |
The base url of your applications. Links will be formatted like <BASE_URL>/l/<slug> |
http://localhost:3000 (in dev ) |
✅ |
DB_URL |
The URL of your libSQL database. This can be remote (http/https ) or local (file ). |
file:///linxz.db |
|
DB_AUTH_TOKEN |
The authentication token for your remote database. | undefined |
|
NEXT_PUBLIC_CFTS_SITE_KEY |
Your Cloudflare Turnstile site key. This is used to prevent spam, and there will be no spam protection without it. This is required when CFTS_SECRET_KEY is set. |
undefined |
|
CFTS_SECRET_KEY |
Your Cloudflare Turnstile secret key. This is used to prevent spam, and there will be no spam protection without it. This is required when NEXT_PUBLIC_CFTS_SITE_KEY is set. |
undefined |
|
NEXT_PUBLIC_APTABASE_HOST |
The host url of your Aptabase instance (e.g. https://aptabase.example.com ). This will default to (Aptabase Cloud). |
undefined |
|
NEXT_PUBLIC_APTABASE_APP_KEY |
The app key of your Aptabase app (e.g. A-SH-0123456789 ). By default, analytics will not be enabled. |
undefined |
- Create a
docker-compose.yml
file with the following contents:
name: linxz
services:
linxz:
image: ghcr.io/ngregrichardson/linxz:latest
container_name: linxz
restart: always
ports:
- 80:3000
volumes:
- linxz/linxz.db:/app/linxz.db
environment:
- BASE_URL
# Uncomment the next line to specify a different local or remote database location
# - DB_URL
# Uncomment the next line to specify an authentication token for a remote database
# - DB_AUTH_TOKEN
# Uncomment the next two lines to use Cloudflare Turnstile
# - NEXT_PUBLIC_CFTS_SITE_KEY
# - CFTS_SECRET_KEY
volumes:
linxz:
Note: This file can also be found in examples/docker-compose.yml
- Configure the
docker-compose.yml
file with the required environment variables plus any additional you'd like to configure - Run
docker compose up
to start the container - Visit
http://localhost
to view your new Linxz instance! - Once you see it was successful, you can stop the container and start it again using
-d
to run it in the background
- Create a
.env
file with the required environment variables plus any additional you'd like to configure.
BASE_URL=http://localhost:80
- Create a new volume with
docker volume create linxz
- Run
docker run --env-file .env -p 80:3000 -v hello/linxz.db:/app/linxz.db ghcr.io/ngregrichardson/linxz:latest --name linxz
to start the container - Visit
http://localhost
to view your new Linxz instance! - Once you see it was successful, you can stop the container and start it again using
-d
to run it in the background
If you would like to contribute, please feel free to fork the repository and submit a pull request. I will review it as soon as possible. I've been enjoying pnpm, but feel free to develop with your preferred runtime.
Note: Please do not include other lock files in your pull request.
All steps will use pnpm
commands, but you're welcome to replace them with whatever you prefer.
- Clone the repository
- Run
pnpm install
- Run
pnpm dev
and visithttp://localhost:3000