---
title: "Sync over a relay"
url: https://docs.loot.build/guides/sync-relay
group: "Guides"
status: written
summary: "Serve, push, pull — the collaboration loop."
---

# Sync over a relay

> Serve, push, pull — the collaboration loop.

A relay is the collaboration hub. Run one anywhere; push and pull resolve `origin` by default.

```bash
# terminal 1: run a relay
loot serve --dir /tmp/relay --addr 127.0.0.1:4000

# terminal 2: alice publishes
loot remote add origin http://127.0.0.1:4000
loot push

# terminal 3: bob clones (sees only internal content until granted)
loot clone http://127.0.0.1:4000 ./bob-repo --identity bob
```
