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

# Initial Setup

> Walkthrough of the LaserSell setup wizard that creates your config and encrypted wallet.

The setup wizard runs automatically on first launch. Run it again any time with `lasersell --setup`.

## What you need

* **RPC URL** from [Helius](https://helius.dev), [Chainstack](https://chainstack.com), or any Solana RPC provider
* **LaserSell API key** from [app.lasersell.io](https://app.lasersell.io) (free)
* A wallet plan: create a new wallet, or have your **seed phrase**, **base58 secret key**, or **Solana keypair JSON** ready to import

## What the wizard creates

* `~/.lasersell/config.yml` (RPC, API key, strategy)
* `~/.lasersell/wallet.keystore.json` (encrypted wallet)

## Wizard walkthrough

### Credentials

```
RPC URL (private recommended): https://your-private-rpc.example.com
LaserSell API key: ********
```

The API key input is masked. A private RPC is strongly recommended for production.

### Strategy

The wizard prompts you to configure each exit condition. Set values that match your trading style and risk tolerance.

* **Target Profit**: sell when profit reaches this % (e.g. `6%`)
* **Stop Loss**: sell when loss reaches this % (e.g. `10%`)
* **Trailing Stop**: sell when profit drops this % from its peak (e.g. `5%`)
* **Deadline Timeout**: force sell after N seconds (e.g. `120`)
* **Slippage Tolerance**: max slippage for sells (e.g. `20%`)
* **Sell on Graduation**: auto-sell when token migrates to an AMM (`y/N`)

At least one exit condition (target profit, stop loss, trailing stop, or deadline) must be enabled. You can change any of these later by editing `~/.lasersell/config.yml` and restarting the daemon, or by re-running `lasersell --setup`.

### Wallet

**Existing keystore detected?** You can reuse it or create/import a different wallet.

**Creating a new wallet:** LaserSell generates a 12-word seed phrase and displays it once. Save it immediately.

<Warning>
  You will not be shown the seed phrase again. If you lose it, you lose the wallet.
</Warning>

**Importing an existing wallet:** Choose one of:

1. **Base58 secret key** (input is masked)
2. **Seed phrase** (uses derivation path `m/44'/501'/0'/0'`)
3. **Solana keypair JSON** file path

After import, verify the displayed pubkey matches the wallet you intended.

### Passphrase

Set a passphrase to encrypt your keystore:

```
Keystore passphrase: ********
Confirm passphrase: ********
```

<Warning>
  There is no "forgot password." If you lose your passphrase, the keystore cannot be recovered. Your recovery path is re-importing the wallet from your seed phrase or private key.
</Warning>

### Review and write

LaserSell shows a summary of your settings and asks to write the config. Confirm to save.

## After setup

LaserSell continues into normal startup. On future launches, it will ask for your keystore passphrase to unlock the wallet.

For headless/automated runs, set the `LASERSELL_WALLET_PASSPHRASE` environment variable.

## Troubleshooting

**"config file not found; run --setup in an interactive terminal"**
The wizard requires a real TTY. SSH into the machine or open a local terminal and run `lasersell --setup`.

**Imported seed phrase gives the wrong address**
LaserSell uses Solana's standard derivation path (`m/44'/501'/0'/0'`). If your wallet uses a different derivation, import via base58 secret key or keypair JSON instead.
