Production Ready

Control Your URLs
Self-Hosted with Rust

BZOD is a complete multi-user URL management platform featuring custom landing pages, analytics, audit logging, and automated disaster recovery. Powered entirely by SQLite.

Rust 2021 Axum SQLite Docker Ready
bzod β€” bash
$ git clone https://github.com/thakares/nx9-url-shortener bzod Cloning into 'bzod'... $ cargo build --release Compiling bzod v0.5.0 Finished release [optimized] in 12.58s $ ./target/release/bzod serve [INFO] database=SQLite multi_user=enabled [INFO] Listening on 0.0.0.0:8654 $ curl -X POST http://localhost:8654/api/v1/urls \ -H "Authorization: bzo_TOKEN" \ -d '{"target_url":"https://example.com","code":"my-link"}' βœ… Created: http://localhost:8654/my-link
∞
Short URLs
QR
Generation
Realtime
Analytics
Multi
User Config
Logs
Audit Trail
Backup
& Restore
GPLv3
Open Source
Core Features

Professional URL Management

A highly optimized architecture providing your organization with total ownership of internal and external links, operational data, and analytics.

πŸ”—
URL Shortening

Create memorable URLs. Features include password protection, expirations, and elegant preview cards.

πŸ“„
Landing Pages

Host structured landing pages with built-in analytics, dynamic QR codes, and integrated domains.

πŸ“Š
Analytics

Accurate visitor tracking encompassing browser metrics, referrers, and seamless CSV exports.

πŸ›‘οΈ
Memory Safe

Engineered in Rust to fundamentally eliminate memory leaks, null pointers, and thread data races.

System Architecture

High-Level Data Flow

A tenant-isolated structure pairing the Axum async framework with optimized SQLite database files, segregating content from high-volume analytics.

Client Browser
↓ HTTP/REST
Axum Routing Engine
↓ system.db lookup
Global Slug Registry
↓ Resolve Tenant
URL Data
content.db
Tracking
analytics.db
↓ Write Event
Audit Log (system.db)
↓
Response / Redirect
1
Web Layer (Axum)

High-performance async HTTP server handling routing, middleware validation, CSRF protection, and structured error responses.

2
Global Namespace

All public URLs are tracked in the system.db -> global_slugs table to prevent collisions across different isolated users.

3
Analytics Pipeline

Lightweight, thread-safe tracking workers capture device profiles and traffic origins into tenant databases without degrading redirect speeds.

Storage Architecture

Strict Tenant Isolation

Instead of a monolithic database, BZOD securely segments administrative data from tenant analytics and content via dedicated SQLite files operating in WAL mode.

data/
β”œβ”€β”€ admin/ # Global Metadata
β”‚ β”œβ”€β”€ admin.db # Internal management
β”‚ β”œβ”€β”€ system.db # Global slugs & audit logs
β”‚ └── users.db # Auth, sessions, quotas
β”‚
└── users/ # Tenant Isolation
    β”œβ”€β”€ 1/ # User 1
    β”‚ β”œβ”€β”€ analytics.db # Isolated metrics
    β”‚ └── content.db # Isolated URLs/Pages
    β”‚
    β””── 2/ # User 2
        β”œβ”€β”€ analytics.db
        β””── content.db
1
No Cross-Tenant Bleed

By assigning physical content.db and analytics.db files to each user, cross-user data leakage is eliminated at the file-system level.

2
Identity & Quotas

The centralized users.db acts as the primary identity database, securely tracking authentication, API tokens, and enforcing resource quotas.

3
WAL Concurrency

Write-Ahead Logging provides robust concurrency and zero-contention crash recovery without the operational overhead of PostgreSQL.

REST API

Programmatic Access

Integrate BZOD with CI/CD pipelines, home automation, or custom applications using secure, token-based authentication.

Create a Short URL

POST /api/v1/urls
Authorization: Bearer bzo_xxxxxxxxxxxx

{
  "code": "rust",
  "target_url": "https://www.rust-lang.org",
  "description": "Rust Language"
}

Fetch Global Statistics

GET /api/v1/stats
Authorization: Bearer bzo_xxxxxxxxxxxx

{
  "success": true,
  "data": {
    "total_urls": 125,
    "total_clicks": 8431,
    "total_pages": 12
  }
}
Operations & CLI

Built for Systems Administrators

Full control via a comprehensive command-line interface. Handle migrations, disaster recovery, and user management directly from the terminal.

# Create a full compressed snapshot of the entire platform
bzod backup

# Restore platform from a specific archive
bzod restore backup-20260619-020000.zip

# Backup and export only a single tenant's data
bzod backup-user 42
# Bootstrap a new administrator
bzod create-admin admin

# Provision a new standard user
bzod create-user alice

# Immediately invalidate user sessions and prevent login
bzod disable-user alice
# Run SQLite integrity checks, WAL validation, and storage checks
bzod doctor

# Verify all registered short link destinations exist
bzod validate

# Apply schema upgrades safely
bzod migrate
Market Comparison

How BZOD Compares

Unlike standard shorteners, BZOD provides a comprehensive suite of featuresβ€”from landing pages to multi-tenant user isolationβ€”in a single, compiled binary.

Feature BZOD v0.5.0 Shlink YOURLS Chhoto URL
Language Rust πŸ¦€ PHP PHP Rust
Deployment βœ… Single Binary ❌ Requires PHP/Web Server ❌ Requires PHP/Web Server βœ… Single Binary
External DB Required βœ… None (SQLite) ⚠️ Usually (PostgreSQL/Maria) ⚠️ Usually (MySQL) βœ… None
Landing Pages βœ… Native ❌ No ⚠️ Via Plugin ❌ No
QR + Analytics βœ… Native ⚠️ Partial ⚠️ Via Plugin ⚠️ Partial
Multi-User / Quotas βœ… Native (Isolated) ⚠️ Partial ⚠️ Via Plugin ❌ No
Backup & Recovery βœ… Built-in CLI & Web UI ❌ External Tools Needed ❌ External Tools Needed ❌ No
Deployment

Get Started in Minutes

Deploy via Docker for containerized environments, or compile directly from source for bare-metal performance.

# Clone the official repository
git clone https://github.com/thakares/nx9-url-shortener bzod
cd bzod

# Launch containerized services
docker compose up -d --build

# Initialize base admin
docker exec -it bzod bzod create-admin
# Clone the official repository
git clone https://github.com/thakares/nx9-url-shortener bzod
cd bzod

# Compile optimized release
cargo build --release

# Initialize base admin
./target/release/bzod create-admin

# Serve application
./target/release/bzod serve