# edge
URL: https://synquic.tech/docs/cli/reference/edge.md

Commands, arguments, and options for synq edge.

See the [workflow guide](/docs/cli/edge) for examples. Global flags such as `--json` go before the command; see [global options](/docs/cli/reference#global-options).

## synq edge

Install and manage the OpenResty edge (reverse proxy, TLS, per-route rules)

```text
synq edge [options] [command]
```

| Subcommand | Purpose |
| --- | --- |
| [`status`](/docs/cli/reference/edge#synq-edge-status) | Show whether the edge is installed and serving :80/:443 |
| [`on [options]`](/docs/cli/reference/edge#synq-edge-on) | Turn the edge on for an install running with it off (--edge off): fetch its image, then migrate or take over ports 80/443 with automatic rollback |
| [`restore`](/docs/cli/reference/edge#synq-edge-restore) | Undo a takeover: stop Synq's edge, restart and re-enable the web server it replaced (from the takeover record), restore replaced certificate files, and keep the edge off |
| [`up\|install [options]`](/docs/cli/reference/edge#synq-edge-up) | Ensure the edge is up and serving; optionally enable monitoring (built-in analytics DB) |
| [`migrate`](/docs/cli/reference/edge#synq-edge-migrate) | Take over :80/:443 and import the existing proxy's sites into the edge |
| [`takeover`](/docs/cli/reference/edge#synq-edge-takeover) | Free :80/:443 for the edge — whatever holds them is stopped and its sites drop |
| [`sites\|scan`](/docs/cli/reference/edge#synq-edge-sites) | List reverse-proxy sites on this host that the edge could import |
| [`repair\|doctor [options]`](/docs/cli/reference/edge#synq-edge-repair) | Diagnose why the edge isn't serving; --fix to resolve a port conflict |
| [`rules`](/docs/cli/reference/edge/rules#synq-edge-rules) | Per-route edge rules: rate-limit, ban, access control |
| [`domains\|domain`](/docs/cli/reference/edge#synq-edge-domains) | Domains routed through the edge: list, register on a port, verify SSL, remove |
| [`traffic [options]`](/docs/cli/reference/edge#synq-edge-traffic) | Traffic overview for a project (requests, bandwidth, hourly periods) |
| [`analytics [options]`](/docs/cli/reference/edge#synq-edge-analytics) | Per-domain analytics for a project: visitors, countries, top paths |
| [`logs [options]`](/docs/cli/reference/edge#synq-edge-logs) | Recent HTTP request logs the edge captured for a project |

## synq edge analytics

Per-domain analytics for a project: visitors, countries, top paths

```text
synq edge analytics [options]
```

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Project ID |
| `--domain <host>` | Scope to a single tracked domain |
| `--from <ts>` | Window start (ISO 8601 or epoch ms; default 7 days) |
| `--to <ts>` | Window end |

## synq edge domains

Domains routed through the edge: list, register on a port, verify SSL, remove

```text
synq edge domains|domain [options] [command]
```

| Subcommand | Purpose |
| --- | --- |
| [`list [options]`](/docs/cli/reference/edge#synq-edge-domains-list) | List a project's domains routed through the edge |
| [`add [options] <hostname>`](/docs/cli/reference/edge#synq-edge-domains-add) | Register a hostname on the edge, bound to a port (auto-verifies SSL) |
| [`rm [options] <hostname>`](/docs/cli/reference/edge#synq-edge-domains-rm) | Remove a hostname from the edge |

## synq edge domains add

Register a hostname on the edge, bound to a port (auto-verifies SSL)

```text
synq edge domains add [options] <hostname>
```

| Argument | Meaning |
| --- | --- |
| `hostname` | Domain hostname (e.g. app.example.com) |

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Attach to an existing project (uses its target port) |
| `--port <n>` | Bind a new tracked project to 127.0.0.1:&lt;n&gt; |
| `--primary` | Mark this domain as the project's primary (default: false) |
| `--no-verify` | Skip DNS verification + SSL issuance (just claim the hostname) |

## synq edge domains list

List a project's domains routed through the edge

```text
synq edge domains list [options]
```

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Project ID |

## synq edge domains rm

Remove a hostname from the edge

```text
synq edge domains rm [options] <hostname>
```

| Argument | Meaning |
| --- | --- |
| `hostname` | Domain hostname to remove |

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Project the domain belongs to |

## synq edge logs

Recent HTTP request logs the edge captured for a project

```text
synq edge logs [options]
```

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Project ID |
| `--limit <n>` | How many recent entries to fetch (max 200) (default: 50) |
| `--follow` | Poll for new entries and print them as they arrive (default: false) |

## synq edge migrate

Take over :80/:443 and import the existing proxy's sites into the edge

```text
synq edge migrate [options]
```

## synq edge on

Turn the edge on for an install running with it off (--edge off): fetch its image, then migrate or take over ports 80/443 with automatic rollback

```text
synq edge on [options]
```

| Option | Meaning |
| --- | --- |
| `--migrate` | Import the sites of the web server on :80/:443 into the edge, then take the ports over |
| `--takeover` | Stop the web server on :80/:443 (its sites stop being served) and take the ports over |

## synq edge repair

Diagnose why the edge isn't serving; --fix to resolve a port conflict

```text
synq edge repair|doctor [options]
```

| Option | Meaning |
| --- | --- |
| `--fix` | Attempt to fix a detected conflict (default: migrate its sites) (default: false) |
| `--migrate` | With --fix: import the existing proxy's sites |
| `--takeover` | With --fix: stop whatever holds :80/:443 (sites drop) |

## synq edge restore

Undo a takeover: stop Synq's edge, restart and re-enable the web server it replaced (from the takeover record), restore replaced certificate files, and keep the edge off

```text
synq edge restore [options]
```

## synq edge sites

List reverse-proxy sites on this host that the edge could import

```text
synq edge sites|scan [options]
```

## synq edge status

Show whether the edge is installed and serving :80/:443

```text
synq edge status [options]
```

## synq edge takeover

Free :80/:443 for the edge — whatever holds them is stopped and its sites drop

```text
synq edge takeover [options]
```

## synq edge traffic

Traffic overview for a project (requests, bandwidth, hourly periods)

```text
synq edge traffic [options]
```

| Option | Meaning |
| --- | --- |
| `-p, --project <id>` | Project ID |
| `--domain <host>` | Scope to a single tracked domain |
| `--from <ts>` | Window start (ISO 8601 or epoch minutes) |
| `--to <ts>` | Window end (ISO 8601 or epoch minutes) |

## synq edge up

Ensure the edge is up and serving; optionally enable monitoring (built-in analytics DB)

```text
synq edge up|install [options]
```

| Option | Meaning |
| --- | --- |
| `--migrate` | On a port conflict, import the existing proxy's sites and take over |
| `--takeover` | On a port conflict, stop whatever holds :80/:443 (its sites drop) |
| `--monitoring` | Also enable monitoring: install the built-in Synq service + embedded DB for analytics |
| `--no-monitoring` | Edge only — skip the monitoring prompt (the headless default) |
| `--admin-name <name>` | Admin display name for a fresh monitoring install |
| `--admin-email <email>` | Admin email for a fresh monitoring install (required when headless) |
| `--admin-password <pw>` | Admin password (prefer the SYNQ_ADMIN_PASSWORD env var) |
