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

# Quick Start

> Get your first GPU instance running

<Warning>
  This feature is in [public preview](/preview/roadmap).
</Warning>

<Note>
  We've switched to a new API. [Migrate your nodes →](/preview/guides/migrating-from-nodes)
</Note>

This guide walks you through launching your first GPU instance on SF Compute.

## Install the CLI

```bash theme={null}
curl -fsSL https://cli.sfcompute.com | bash
```

## Log in

```bash theme={null}
sf login
```

This opens your browser to authenticate and stores your credentials locally. You can check your
credit balance anytime with `sf billing balance`.

## Check what you can buy

Hardware is described by [instance SKUs](/preview/instance-skus). Preview what's currently for sale,
one row per SKU.

```bash theme={null}
sf availability
```

```
INSTANCE SKU             NEXT AVAILABLE  NEXT 48H
Amsterdam H100 (IB)      now (24)        ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▁▁▁▁▁  peak: 24
Ashburn H100 (IB)        now (64)        ▇▇▇▇▇▇▇▇▇▇▁▁▁▁▁▁▁▁▁▁  peak: 64
Chicago A100 (Ethernet)  now (96)        ▇▇▇▇▇▄▄▄▄▄▂▂▂▂▂▁▁▁▁▁  peak: 96
Seattle H100 (IB)        now (128)       ▇▇▇▇▇▇▇▇▇▇▁▁▁▁▁▁▁▁▁▁  peak: 128
Tokyo H100 (IB)          now (48)        ▇▇▇▇▇▇▇▇▇▇▇▇▁▁▁▁▁▁▁▁  peak: 48
```

`NEXT AVAILABLE` is the soonest a node frees up and how many — `now (N)`, a time like
`Today, 8:00pm (4)`, or `—` when nothing's scheduled; `NEXT 48H` sparklines the schedule with the
peak shown to the right.

## Create an empty pool

A [pool](/preview/pools) tracks your compute allocation over time. You buy compute time
into a pool with orders, and instances on the pool run when there's allocated time.

```bash theme={null}
sf pools create --name dev
```

## Buy compute time

<Note>
  This will charge your account. Make sure you have credits — check with `sf billing balance` or
  [top up on the dashboard](https://sfcompute.com/dashboard).
</Note>

Place a buy [order](/preview/orders) for compute time on your pool. The command guides you
through each option interactively, including number of instances, start time, duration, rate, and
the [instance SKU](/preview/instance-skus) the order pins to.

```bash theme={null}
sf orders create --pool dev --side buy
```

## Check your order

```bash theme={null}
sf orders list
```

```
SIDE  STATUS  PERIOD   NODES  RATE             POOL      ID
buy   filled  Mar 23       1  ≤$20.00/node/hr  dev       ordr_...
```

<Note>
  If the order shows `cancelled`, the price was too low or there was no availability. Try a higher
  rate, a later start time, or use `--allow-standing` to leave the order on the book.
</Note>

## List images

Images are bootable OS disk images. You'll need an image name or ID to create an instance.

```bash theme={null}
sf images list
```

```
NAME                      VISIBILITY  STATUS     CREATED
ubuntu-22.04.5-cuda-12.7  public      completed  Feb 23, 6:50pm
```

SFC provides public images with Ubuntu and CUDA pre-installed. You can also
[build and upload your own custom images](/preview/images).

## Create an instance

First, create a startup script that injects your SSH key so you can connect to the instance.

```bash theme={null}
cat >startup.sh <<SCRIPT
#!/bin/bash

mkdir -p /root/.ssh
cat >>/root/.ssh/authorized_keys <<"EOF"
$(cat ~/.ssh/id_rsa.pub 2>/dev/null)
$(cat ~/.ssh/id_ecdsa.pub 2>/dev/null)
$(cat ~/.ssh/id_ecdsa_sk.pub 2>/dev/null)
$(cat ~/.ssh/id_ed25519.pub 2>/dev/null)
$(cat ~/.ssh/id_ed25519_sk.pub 2>/dev/null)
$(cat ~/.ssh/id_xmss.pub 2>/dev/null)
$(cat ~/.ssh/id_dsa.pub 2>/dev/null)
EOF
SCRIPT
```

Then create an [instance](/preview/instances) on your pool with the public image.

```bash theme={null}
sf instances create --pool dev --image ubuntu-22.04.5-cuda-12.7 --cloud-init ./startup.sh
```

Your pool already has compute time from the order you placed. Since the order's start time was
`now`, the instance will be allocated within about a minute and begin booting. Compute ownership
and instances are separate: you can terminate and recreate instances without losing your purchased
compute time.

## Watch your instance start

```bash theme={null}
sf instances list
```

The image download and boot process takes up to 10 minutes before SSH is available.

## Connect via SSH

```bash theme={null}
sf instances ssh {instance-name}
```

Verify the GPUs are available:

```bash theme={null}
nvidia-smi
```

## Next steps

You now have a running GPU instance. Here are some things to try:

**Sell back unused compute.** Place a sell order as a standing order — if someone buys it, you get
credits back and the instance loses its compute time.

```bash theme={null}
sf orders create --pool dev --side sell --nodes 1 \
  --start now --duration 1h --min-rate 8.00 --allow-standing
```

**Check your pool's allocation schedule** to see the compute time you own.

```bash theme={null}
sf pools get dev
```

**Learn more:**

* [Pools](/preview/pools) — manage compute allocation
* [Orders](/preview/orders) — buy and sell compute time
* [Instances](/preview/instances) — SSH, logs, images, and lifecycle
