> 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/first-time-setup.md).

# First-Time Setup

### Identity Key

The identity key is your node's permanent cryptographic identity. The setup screen offers two options:

* **Generate a new key (recommended)** — the app creates a fresh key and stores it at `~/.spacerouter/certs/node-identity.key`.
* **Import an existing key** — paste a 64-character hex private key. Use this if you're moving a node to a new machine.

{% hint style="warning" %}
**Back up the file right after setup**

Copy `node-identity.key` to safe storage. If you lose it you'll have to re-onboard from scratch (the new node looks like a brand-new node to the network).
{% endhint %}

#### Optional: encrypt with a passphrase

You can protect the identity key with a passphrase. The app will prompt for it on every launch. Forget it and the file is unrecoverable, so use a password manager.

For headless installs, set `SR_IDENTITY_PASSPHRASE` in the environment so the daemon can decrypt without prompting.

### Staking Address

The Creditcoin wallet that holds your stake. Required to earn — leave it blank and the node runs in **unstaked** state.

The address is a standard EVM address: 42 characters starting with `0x`. You can paste it from the staking dApp.

If left blank, the staking address defaults to your identity address. Most providers prefer to keep these separate (cold-storage staking, hot identity).

### Collection Address (optional)

The wallet that *receives* your earnings when you claim. If you leave it blank, it defaults to the staking address.

Set this to a separate address if you want earnings to flow somewhere other than your staking wallet — for example, a hot wallet you actually transact from.

### Referral Code (optional)

If someone referred you, paste their code here. Codes are 3–50 characters, alphanumeric with hyphens or underscores.

### Network Mode

How the gateway reaches your node. Pick the one that matches your network:

| Mode                 | Pick this if…                                                                                | What you set                                                         |
| -------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **UPnP (Automatic)** | You're on a home router that supports UPnP/NAT-PMP. Default for most setups.                 | Nothing — the app discovers your public IP and opens port 9090.      |
| **Manual**           | You disabled UPnP and forwarded the port yourself, or you have a static public IP.           | Public IP / hostname and the port you forwarded.                     |
| **Tunnel**           | You're behind CGNAT, on mobile broadband, or in a restrictive network. UPnP can't help here. | The hostname and port your tunnel service (bore, ngrok, …) gave you. |

#### Tunnel mode example with bore

```
# In one terminal, run bore to expose your local port 9090
bore local 9090 --to bore.pub
# bore prints something like:
# listening at bore.pub:46213

# In SpaceRouter:
#   Network mode: Tunnel
#   Public hostname: bore.pub
#   Public port:     46213
```

### Click Start

Hit **Start**. The status badge transitions through:

1. **initializing** — a few seconds, while the app contacts the Coordination API.
2. **qualifying** — your node is registered and ready; the network is verifying your reliability for the current period.
3. **earning** — you're approved. SPACE is being credited as you serve traffic.

qualifying and earning are reported by the Coordination API based on its review cycle (every 4 hours, 240-minute lookback window). The first transition into earning typically takes one or two review cycles after your node is reliably online and your stake is on chain.

{% hint style="info" %}
**Already running a node? Reset to start fresh**

Click **Reset Node** on the main screen to clear the identity key and config and re-run setup. This deletes `~/.spacerouter/certs/node-identity.key` — back it up first if you might want to recover it.
{% endhint %}

### Headless / scripted setup

For server installs, all setup options have CLI flags:

```bash
./space-router-node-linux-x64 \
  --staking-address 0xYourStakingAddress \
  --collection-address 0xYourCollectionAddress \
  --no-upnp \
  --public-url myhost.example.com \
  --public-port 9090 \
  --label "node-eu-west-1"
```

See the CLI Reference for all flags.
