# ItsGoin Anchor Node Deployment

## Quick Start

```bash
# From the project root:
docker compose -f deploy/docker-compose.yml up -d

# Open UDP 4433 in firewall (AlmaLinux/RHEL):
sudo firewall-cmd --add-port=4433/udp --permanent
sudo firewall-cmd --reload

# Get the anchor's node ID:
docker logs itsgoin-anchor 2>&1 | grep "Node ID"

# Or read identity key directly:
docker exec itsgoin-anchor cat /proc/1/root/data/identity.key 2>/dev/null | xxd -p -c 32
```

## Connect String

Once you have the node ID, your connect string is:

```
<node_id_hex>@digitalservicesinternational.net:4433
```

Clients can use this in `bootstrap.json` or `anchors.json`, or paste it into the `connect` command.

## Manual Build & Run (no Docker)

```bash
cargo build --release -p itsgoin-cli
./target/release/itsgoin /var/lib/itsgoin --bind 0.0.0.0:4433 --daemon
```

## Logs

```bash
docker logs -f itsgoin-anchor
```

## Data Persistence

Node identity and database are stored in the `itsgoin-data` Docker volume.
To back up: `docker cp itsgoin-anchor:/data ./backup`
