> For the complete documentation index, see [llms.txt](https://docs.fast.poker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fast.poker/tutorials/run-dealer.md).

# Run your own dealer

This guide gets the packaged Dealer Service binary running. A dealer moves tables forward. A licensed dealer can claim dealer revenue from credited work.

## 1. Get the dealer binary

Pre-built binaries for every platform are attached to each release at [github.com/FastPoker/dealer-service](https://github.com/FastPoker/dealer-service/releases). Targets: `dealer-linux-x64`, `dealer-linux-arm64`, `dealer-darwin-x64`, `dealer-darwin-arm64`, `dealer-windows-x64.exe`.

Download it into its own folder, verify the checksum, and make it executable (Linux x64 shown):

```bash
mkdir my-dealer && cd my-dealer
curl -L -o dealer https://github.com/FastPoker/dealer-service/releases/latest/download/dealer-linux-x64
curl -L -O https://github.com/FastPoker/dealer-service/releases/latest/download/SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS
chmod +x ./dealer
```

Each release also publishes `SHA256SUMS.sig`, an Ed25519 signature over the checksums that the binary verifies during self-update.

## 2. Run first-time setup

```bash
./dealer init
```

The wizard asks for dashboard host and port, dashboard login, Solana RPC, MagicBlock / TEE RPC, and dealer wallet setup. It writes `.env` and stores the generated or imported wallet at `data/keypair.json`.

Fund the wallet address printed by the wizard. Keep enough SOL in this wallet for L1 transaction fees.

## 3. Configure the dealer

The dealer reads `data/crank-config.json` for runtime options. The file is created with defaults the first time the crank starts and can be edited in the dashboard. A compact production shape:

```json
{
  "l1_rpc": "https://your-solana-rpc.example",
  "tee_rpc": "https://your-magicblock-tee-rpc.example",
  "table_filter_mode": "none",
  "table_whitelist": [],
  "table_blacklist": [],
  "sng_pool_filter_mode": "none",
  "sng_pool_whitelist": [],
  "sng_pool_blacklist": [],
  "accepted_mints": [],
  "laserstream_enabled": false,
  "crank_sng": true,
  "crank_cash": true,
  "process_cashouts": true,
  "auto_kick": true,
  "timeout_enabled": true,
  "rake_sweep": false,
  "auction_sweep": true,
  "create_sng_tables": true
}
```

The packaged binary prints the current schema with `./dealer config-options`.

## 4. Start

```bash
./dealer start
```

This starts the local dashboard and crank together. The dashboard defaults to `http://127.0.0.1:3847`.

Runtime alternatives:

```bash
./dealer ui      # dashboard only
./dealer run     # crank only
```

For a managed background service:

```bash
./dealer service install
./dealer service status
./dealer service logs
```

## 5. Activate an existing Dealer License

Running is permissionless. Earning requires one of the 585 existing licenses; new issuance is permanently closed.

1. Hold an active Dealer License PDA in the wallet that will receive credit.
2. If the license is currently a wrapped MPL Core NFT, open the Dealer License screen and unwrap it back to that wallet first.
3. Set that wallet as `credit_to`, or load it directly as the dealer wallet.

From then on, credited dealer work can earn dealer revenue.

## 6. Monitor earnings

```bash
./dealer status
./dealer earnings
```

The dealer can claim on its sweep cadence when reward sweeps are enabled. To move SOL out of the dealer wallet:

```bash
./dealer withdraw <destination-wallet> <amount-sol>
```

A dealer wallet must hold a license for claimable dealer revenue. Unlicensed wallets can move tables but do not accrue claimable dealer revenue.
