> For the complete documentation index, see [llms.txt](https://docs.spacecoin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spacecoin.org/spacerouter-proxy/proxy-provider-guide/cli-reference.md).

# CLI Reference

### Synopsis

```
space-router-node [GLOBAL OPTIONS]
space-router-node --receipts [RECEIPT OPTIONS]
space-router-node --claim [CLAIM OPTIONS]
```

### Global options

<table><thead><tr><th width="249">Flag</th><th>Default</th><th>Purpose</th></tr></thead><tbody><tr><td><code>--version</code>, <code>-V</code></td><td>—</td><td>Print the version and exit.</td></tr><tr><td><code>--reset</code></td><td>—</td><td>Wipe config + identity key, then re-run setup.</td></tr><tr><td><code>--setup</code></td><td>—</td><td>Re-run setup interactively without wiping the identity key.</td></tr><tr><td><code>--port PORT</code></td><td>9090</td><td>Port the node listens on.</td></tr><tr><td><code>--public-url HOST</code></td><td>auto</td><td>Public hostname or IP advertised to the gateway (tunnel/manual mode).</td></tr><tr><td><code>--public-port PORT</code></td><td>auto</td><td>Public port advertised (tunnel/manual mode).</td></tr><tr><td><code>--no-upnp</code></td><td>false</td><td>Disable UPnP. You must set <code>--public-url</code> / <code>--public-port</code>.</td></tr><tr><td><code>--staking-address ADDR</code></td><td>identity</td><td>EVM address of your staking wallet.</td></tr><tr><td><code>--collection-address ADDR</code></td><td>staking</td><td>EVM address that receives claimed SPACE.</td></tr><tr><td><code>--password-file PATH</code></td><td>—</td><td>Read identity-key passphrase from this file (headless installs).</td></tr><tr><td><code>--log-level LEVEL</code></td><td>INFO</td><td>One of <code>DEBUG</code>, <code>INFO</code>, <code>WARNING</code>, <code>ERROR</code>.</td></tr><tr><td><code>--label NAME</code></td><td>—</td><td>Human-readable label shown in logs and dashboards.</td></tr></tbody></table>

### Receipt options

Use `--receipts` to inspect the local receipt store. The daemon does not need to be running.

| Flag         | Purpose                                                                                               |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| `--receipts` | List outstanding receipts as a table.                                                                 |
| `--failed`   | Show only `failed_retryable` and `failed_terminal` rows.                                              |
| `--json`     | Emit a stable JSON payload instead of a table (suitable for scripts).                                 |
| `--reap`     | Run one reaper tick before listing — reconciles stuck `CLAIM_TX_TIMEOUT` rows against on-chain state. |

Example:

```
space-router-node --receipts
space-router-node --receipts --failed --json
space-router-node --receipts --reap
```

### Claim options

Use `--claim` to submit a claim transaction. The daemon does not need to be running, but you must have set the identity passphrase if your key is encrypted.

| Flag                  | Purpose                                                                      |
| --------------------- | ---------------------------------------------------------------------------- |
| `--claim`             | Submit all `claimable` receipts in one batch.                                |
| `--include-retryable` | Also retry `failed_retryable` receipts (respects attempt cap).               |
| `--uuid UUID`         | Claim only the receipt with this request UUID. Refuses on `failed_terminal`. |

Example:

```
space-router-node --claim
space-router-node --claim --include-retryable
space-router-node --claim --uuid 9f3c4d…
```

### Environment variables

| Variable                             | Purpose                                                                   |
| ------------------------------------ | ------------------------------------------------------------------------- |
| `SR_IDENTITY_PASSPHRASE`             | Decrypt the identity key without prompting.                               |
| `SR_RECEIPT_MAX_SIGN_ATTEMPTS`       | Cap on signing retries (default 2). Don't change unless instructed.       |
| `SR_RECEIPT_MAX_CLAIM_ATTEMPTS`      | Cap on claim retries (default 2).                                         |
| `SR_RECEIPT_REAPER_INTERVAL_SECONDS` | Reaper tick interval (default 300).                                       |
| `SR_RECEIPT_REAPER_GRACE_SECONDS`    | How long before a stuck row is eligible for reconciliation (default 300). |

### systemd unit (Linux .deb / .rpm)

The package installs the binary at /opt/spacerouter/space-router-node and a systemd unit named space-router-node.service. The service runs as the unprivileged spacerouter user, whose home is /var/lib/spacerouter:

```
# Status & control
sudo systemctl status space-router-node
sudo systemctl restart space-router-node
sudo systemctl stop space-router-node

# Logs
sudo journalctl -u space-router-node -f
```

Edit settings.json directly under /var/lib/spacerouter/.spacerouter/, then sudo systemctl restart space-router-node. Pass extra flags via the EnvironmentFile at /etc/spacerouter/spacerouter.env.
