Jar documentation

Everything you need to connect a device, script an upload, or run the whole stack yourself.

Quickstart

Install the app, sign in, and pick a folder. That's it — the agent takes over from there.

curl -fsSL https://jar.stilgar.xyz/install.sh | sh
jar login              # opens the browser to authorize this device
jar sync ~/Pictures --watch

Pairing devices

Each device gets its own key. From the app, open Settings → Devices → Pair and scan the code on your phone. Keys can be revoked individually at any time, which immediately drops that device's sync connection.

CLI reference

The CLI is the full client without a window — ideal for servers and NAS boxes.

jar sync <path> [--watch] [--exclude PATTERN]
jar push <path>            # one-shot upload
jar pull <remote> <path>   # fetch a remote folder
jar share <path> --public  # create an album link
jar status                 # show live transfer stats

REST API

Everything the apps do is an endpoint. Authenticate with a bearer token from Settings → API tokens.

GET  /api/v1/files?path=/Photos/2026
POST /api/v1/files           # multipart or chunked upload
GET  /api/v1/albums/:id
POST /api/v1/albums          # { "path": "...", "public": true }
GET  /api/v1/events?since=:cursor   # long-poll change feed

The /events long-poll is what keeps clients instantly up to date — and a big reason Jar servers hold so many open connections at once.

Webhooks

Register a URL and Jar will POST an event on every upload, delete or share. Perfect for ingest pipelines.

POST /api/v1/webhooks
{ "url": "https://example.com/hook",
  "events": ["file.created","album.viewed"] }

Self-hosting

One container runs the API, sync engine and web app. Point it at a disk, a domain and a TLS cert and you're done.

docker run -d --name jar \
  -p 443:443 \
  -v /srv/jar/data:/data \
  -v /srv/jar/certs:/certs \
  -e JAR_DOMAIN=cloud.example.com \
  stilgar/jar:latest