bit
Version, currently 1.6.213 versions
- 1.6.2latestAug 7, 2026
- 1.6.1not indexedAug 9, 2026
- 1.6.0not indexedAug 9, 2026
- 1.5.3not indexedAug 9, 2026
- 1.5.2not indexedAug 9, 2026
- 1.5.1not indexedAug 9, 2026
- 1.5.0not indexedAug 9, 2026
- 1.4.1not indexedAug 9, 2026
- 1.4.0not indexedAug 9, 2026
- 1.3.0not indexedAug 9, 2026
- 1.2.0not indexedAug 9, 2026
- 1.1.0not indexedAug 9, 2026
- 1.0.0not indexedAug 9, 2026
github.com/sjdonado/bit
Fast, lightweight, self-hosted URL shortener service with minimal click tracking
105 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
bit:
github: sjdonado/bit
version: ~> 1.6.2Then run:
shards installshard.yml
- Crystal
>= 1.18.2- License
- MIT
- Author
- Juan Rodriguez Donado <@sjdonado>
- Targets
bitfrom bit.crclifrom scripts/cli.crbenchmarkfrom scripts/benchmark.cr
Dependencies
Runtime Dependencies
- kemal1.7.3github: kemalcr/kemal
- crecto*github: fridgerator/crecto
- micrate0.15.1github: amberframework/micrate
- sqlite3*github: crystal-lang/crystal-sqlite3
- maxminddb*github: delef/maxminddb.cr
Development Dependencies
- dotenv*github: gdotdesign/cr-dotenvdev
- spec-kemal*github: kemalcr/spec-kemaldev
README
[](https://hub.docker.com/r/sjdonado/bit)
[](https://hub.docker.com/r/sjdonado/bit)
## Features
- Minimal tracking setup: Country, browser, OS, referer. No cookies or persistent tracking mechanisms are used beyond what's available from a basic client's request.
- Includes `X-Forwarded-For` header.
- Multiple users are supported via API key authentication. Create, list and delete keys via the [CLI](docs/SETUP.md#cli).
- Easy to extend, Ruby on Rails inspired setup.
- Auto update UA regexes and GeoLite2 database.
## Why bit?
**Fast:** **11k req/sec**, latency 11ms, 40MiB avg memory usage (100k requests using 125 connections, [benchmark](docs/SETUP.md#benchmark)).
**Lightweight:** Minimal dependencies, image size under 20 MiB, memory usage under 60 MiB at peak.
**Self-hosted:** [Dokku](docs/SETUP.md#dokku), [Docker Compose](docs/SETUP.md#docker-compose).
**Production ready:** Feature-complete by design, simple and reliable without unnecessary bloat. Bug fixes will continue, but new features aren't planned.
## Run It Anywhere
All images available on [Docker Hub](https://hub.docker.com/r/sjdonado/bit/tags).
### Docker
```bash
docker run \
--name bit \
-p 4000:4000 \
-e ENV="production" \
-e DATABASE_URL="sqlite3://./sqlite/data.db" \
-e APP_URL="http://localhost:4000" \
-e ADMIN_NAME="Admin" \
-e ADMIN_API_KEY=$(openssl rand -base64 32) \
sjdonado/bit
# Create a new user
# docker exec -it bit cli --create-user=Admin
```
### Docker Compose
```bash
docker-compose up
# Optional: Generate an api key
# docker-compose exec -it app cli --create-user=Admin
```
### Dokku
- Dockerfile
```dockerfile
FROM sjdonado/bit
```
- Over ssh
```bash
dokku apps:create bit
dokku domains:set bit bit.yourdomain.com
dokku letsencrypt:enable bit
dokku storage:ensure-directory bit-sqlite
dokku storage:mount bit /var/lib/dokku/data/storage/bit-sqlite:/usr/src/app/sqlite/
dokku config:set bit DATABASE_URL="sqlite3://./sqlite/data.db" APP_URL=https://bit.yourdomain.com ADMIN_NAME=Admin ADMIN_API_KEY=$(openssl rand -base64 32)
dokku ports:add bit http:80:4000
dokku ports:add bit https:443:4000
# Create a new user
# dokku run bit cli --create-user=Admin
```
### Dokku (subnetwork)
Recommended for lower latency communication (no host network traversal)
```bash
dokku network:create bit-net
dokku network:set bit attach-post-create bit-net
dokku network:set myapp attach-post-create bit-net
```
## Documentation
- [API Reference](https://sjdonado.github.io/bit/)
- [Local Development](docs/SETUP.md)
## Contributing
Found an issue or have a suggestion? Please follow our [contribution guidelines](CONTRIBUTING.md).
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.6.2- Tagged
- Aug 7, 2026
- Commit
5320beef8bf7- Crystal
>= 1.18.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sjdonado/bit
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 13