2026-03-18 02:55:58 +08:00
2026-07-10 15:04:29 +00:00
2026-07-10 15:04:29 +00:00
2026-07-10 15:04:29 +00:00
2026-03-18 04:41:57 +08:00
2026-07-10 04:46:34 +00:00
2026-07-10 04:46:34 +00:00
2026-07-10 15:04:29 +00:00
2026-07-10 15:04:29 +00:00
2026-07-10 04:46:34 +00:00
2026-07-10 14:24:55 +00:00

ushort

ushort is a compact, self-contained URL shortener written in Rust and backed by SQLite. It serves an embedded web interface and JSON API from a single statically linked executable.

It supports deployment at either a dedicated host such as s.example.com or under a path such as example.com/s. Images are available for Linux AMD64 and ARM64.

Quick start

Requirements: Docker with the Compose plugin.

cp config.example.toml config.toml
# Set a private api_key in config.toml.

mkdir -p data
USHORT_CONFIG="$PWD/config.toml" \
USHORT_DATA="$PWD/data" \
USHORT_UID="$(id -u)" \
USHORT_GID="$(id -g)" \
  docker compose -f deploy/docker-compose.prod.yml up -d

The example starts ushort at http://localhost:18082/s/ and stores its SQLite database in ./data/urlshort.db.

Check it and stop it with:

curl http://localhost:18082/s/api/health
docker compose -f deploy/docker-compose.prod.yml down

This pulls the published image; it does not compile ushort or require a Rust toolchain.

Build from source instead

To build the current checkout locally, use the alternative build definition:

mkdir -p data
USHORT_UID="$(id -u)" USHORT_GID="$(id -g)" \
  docker compose -f deploy/docker-compose.build.yml up --build -d

It uses the same root-level config.toml and data/ directory as the quick start.

Documentation

S
Description
No description provided
Readme
4.8 MiB
Languages
CSS 84.8%
Rust 10.4%
JavaScript 3.9%
HTML 0.5%
Shell 0.3%
Other 0.1%