Lock. Ship.

Distributed locking with fencing tokens. One binary, simple HTTP API, free to use.

⚠️ Alpha software. No SLA, no business model. Just an octopus holding your locks. 🐙

What it does

Distributed locking via a simple HTTP API. Sign up with GitHub, get a bearer token, start locking.

🔒

Distributed Locking

Acquire exclusive locks with automatic expiration and monotonic fencing tokens for safe distributed coordination.

🛡️

Fencing Tokens

Every acquire returns a strictly increasing token. Use it to prevent stale holders from corrupting shared state.

Simple HTTP API

Pure REST with JSON responses. No client libraries needed — curl works fine from any language.

📦

One Binary, Zero Deps

No etcd, no ZooKeeper, no Consul. Self-host with a single binary and a SQLite file. Done in 60 seconds.

⏱️

Auto-Expiry

Locks expire automatically via configurable TTLs. Crashed holders never block your system forever.

🏠

Self-Hostable

Use octostore.io or run your own. Optional GitHub OAuth — or bring static tokens for fully air-gapped deployments.

API Overview

🔐 Authentication

# Sign in with GitHub OAuth
curl https://api.octostore.io/auth/github

# Rotate your bearer token
curl -X POST https://api.octostore.io/auth/token/rotate \
  -H "Authorization: Bearer YOUR_TOKEN"

🔒 Acquire a Lock

curl -X POST https://api.octostore.io/locks/my-resource/acquire \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ttl_seconds": 300, "metadata": "service-8i192"}'

🔓 Release a Lock

curl -X POST https://api.octostore.io/locks/my-resource/release \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"lease_id": "uuid-from-acquire"}'

👀 Check Lock Status

curl https://api.octostore.io/locks/my-resource \
  -H "Authorization: Bearer YOUR_TOKEN"

📋 List Your Locks

curl https://api.octostore.io/locks \
  -H "Authorization: Bearer YOUR_TOKEN"

🔄 Renew a Lock

curl -X POST https://api.octostore.io/locks/my-resource/renew \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"lease_id": "uuid-from-acquire", "ttl_seconds": 300}'

Constraints