A very performant and light (2MB in memory) link shortener and tracker. Written in Rust and React and uses Postgres or SQLite.
docker run -p 8080:8080 \
-e JWT_SECRET=change-me-in-production \
-e [email protected] \
-e SIMPLELINK_PASS=your-secure-password \
-v simplelink_data:/data \
ghcr.io/waveringana/simplelink:v2.1
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.
Edit the docker-compose.yml file. It comes included with a PostgreSQL db configuration.
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
docker build -t simplelink .
docker run -p 8080:8080 \
-e JWT_SECRET=change-me-in-production \
-e [email protected] \
-e SIMPLELINK_PASS=your-secure-password \
-v simplelink_data:/data \
simplelink
Adjust the included docker-compose.yml to your liking; it includes a postgres config as well.
- 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