Something went wrong. Try again.
A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
Something went wrong. Try again.
TypeScript 57%
Rust 35%
CSS 4%
JavaScript 2%
Shell 1%
Dockerfile 1%
HTML <1%
<1%
Commits 70
Bump tracing-subscriber from 0.3.19 to 0.3.20
Signed-off-by: dependabot[bot] <support@github.com>
Bump tokio from 1.43.0 to 1.43.1
Signed-off-by: dependabot[bot] <support@github.com>
Bump ring from 0.17.8 to 0.17.13
Signed-off-by: dependabot[bot] <support@github.com>
README.md
SimpleLink #
A very performant and light (2MB in memory) link shortener and tracker. Written in Rust and React and uses Postgres or SQLite.


How to Run #
From Docker #
docker run -p 8080:8080 \
-e JWT_SECRET=change-me-in-production \
-e SIMPLELINK_USER=admin@example.com \
-e SIMPLELINK_PASS=your-secure-password \
-v simplelink_data:/data \
ghcr.io/waveringana/simplelink:v2.2
Environment Variables #
JWT_SECRET: Required. Used for JWT token generationSIMPLELINK_USER: Optional. If set along with SIMPLELINK_PASS, creates an admin user on first runSIMPLELINK_PASS: Optional. Admin user passwordDATABASE_URL: Optional. Postgres connection string. If not set, uses SQLiteINITIAL_LINKS: Optional. Semicolon-separated list of initial links in format "url,code;url2,code2"SERVER_HOST: Optional. Default: "127.0.0.1"SERVER_PORT: Optional. Default: "8080"
If SIMPLELINK_USER and SIMPLELINK_PASS are not passed, an admin-setup-token is pasted to the console and as a text file in the project root.
From Docker Compose #
Edit the docker-compose.yml file. It comes included with a PostgreSQL db configuration.
Build #
From Source #
First configure .env.example and save it to .env
git clone https://github.com/waveringana/simplelink && cd simplelink
./build.sh
cargo run
Alternatively for a binary build:
./build.sh --binary
then check /target/release for the binary named SimpleGit
From Docker #
docker build -t simplelink .
docker run -p 8080:8080 \
-e JWT_SECRET=change-me-in-production \
-e SIMPLELINK_USER=admin@example.com \
-e SIMPLELINK_PASS=your-secure-password \
-v simplelink_data:/data \
simplelink
From Docker Compose #
Adjust the included docker-compose.yml to your liking; it includes a postgres config as well.
Features #
- Support for both PostgreSQL and SQLite databases
- Initial links can be configured via environment variables
- Admin user can be created on first run via environment variables
- Link click tracking and statistics
- Lightweight and performant