> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudshipai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Station Registration

> Connect your Station to CloudShip Platform

## Overview

Registering your Station with CloudShip enables:

* Remote agent execution
* Centralized monitoring
* Bundle distribution
* OAuth authentication for MCP

## Getting a Registration Key

<Steps>
  <Step title="Log in to CloudShip">
    Go to [app.cloudshipai.com](https://app.cloudshipai.com) and sign in
  </Step>

  <Step title="Navigate to Stations">
    Click **Stations** in the sidebar
  </Step>

  <Step title="Create Registration Key">
    Click **New Registration Key** and give it a name
  </Step>

  <Step title="Copy the Key">
    Copy the generated key (it won't be shown again)
  </Step>
</Steps>

## Registering Your Station

### During Init

```bash theme={null}
stn init --provider openai \
  --cloudship-key "your-registration-key" \
  --cloudship-endpoint "lighthouse.cloudship.ai:443" \
  --yes
```

### Existing Station

Edit `~/.config/station/config.yaml`:

```yaml theme={null}
local_mode: false
cloudship:
  enabled: true
  registration_key: "your-registration-key"
  endpoint: lighthouse.cloudship.ai:443
```

Then restart Station:

```bash theme={null}
stn down && stn up
# or
pkill stn && stn serve
```

### Via Environment Variables

```bash theme={null}
export STN_CLOUDSHIP_KEY="your-registration-key"
export STN_CLOUDSHIP_ENDPOINT="lighthouse.cloudship.ai:443"
export STATION_LOCAL_MODE="false"
stn serve
```

## Verification

After registration, verify the connection:

```bash theme={null}
stn status
```

You should see:

```
Station Status
├─ Mode: CloudShip Connected
├─ Registration: Active
├─ Lighthouse: lighthouse.cloudship.ai:443
└─ Station ID: abc123
```

In the CloudShip dashboard, your Station will appear in the **Stations** list.

## What Happens After Registration

Once registered, your Station:

1. **Opens a management channel** to Lighthouse
2. **Reports status** periodically (health, agents, tools)
3. **Receives commands** for remote execution
4. **Sends telemetry** if enabled

## Security

### Connection Security

* All communication uses **TLS encryption**
* Registration keys are **one-time use**
* Station authenticates with Lighthouse on each connection

### Data Privacy

* Agent prompts stay on your Station
* Only execution results are sent to CloudShip (if requested)
* Telemetry is opt-in

### Revoking Access

To disconnect a Station:

1. In CloudShip dashboard, go to **Stations**
2. Click the Station you want to remove
3. Click **Revoke Registration**

Or locally:

```yaml theme={null}
# config.yaml
local_mode: true
cloudship:
  enabled: false
```

## Local Development with Lighthouse

For testing CloudShip integration locally:

```bash theme={null}
# Start local Lighthouse (in cloudshipai repo)
cd cloudshipai/lighthouse
go run cmd/main.go

# Configure Station to use local Lighthouse
stn init --provider openai \
  --cloudship-key "test-key" \
  --cloudship-endpoint "localhost:50051" \
  --yes
```

<Warning>
  Local Lighthouse requires additional setup. See [Lighthouse documentation](/platform/lighthouse).
</Warning>

## Troubleshooting

### Connection Failed

```
Error: failed to connect to Lighthouse
```

Check:

* Internet connectivity
* Registration key validity
* Endpoint URL (should include port)

### Registration Rejected

```
Error: registration key invalid or expired
```

Generate a new registration key in the CloudShip dashboard.

### Already Registered

```
Error: station already registered
```

Each registration key can only be used once. Either:

* Use a new registration key
* Delete the existing Station in CloudShip dashboard
