# Pricing

What onshore.sh costs in credits: compute per second, storage, egress, cloud devices, app builds, credit packs, and worked examples.

You pay for what your miniVMs use, per second, from a prepaid balance of **credits**. There is no subscription and no minimum spend.

- **1 credit = €0.01.** 1,000 credits cost €10. You buy credits in [packs](#credit-packs), priced in euros.
- Usage prices are in credits. Pack prices are in euros, excluding VAT.
- A miniVM needs a saved card. The first eligible card brings 500 welcome credits (once per person and per card), valid 7 days from when they are granted. See [Billing](https://onshore.sh/docs/account/billing#welcome-credit).

## Compute

Compute is billed per second on the resources a running miniVM is **allocated**, whether it uses them or not.

| Resource | Price                     |
| -------- | ------------------------- |
| vCPU     | 0.5 credit per vCPU-hour  |
| Memory   | 0.125 credit per GiB-hour |

### Presets

| Preset  | vCPU | Memory | Disk included | Credits per hour |
| ------- | ---- | ------ | ------------- | ---------------- |
| small   | 2    | 4 GiB  | 20 GiB        | 1.5              |
| default | 4    | 8 GiB  | 40 GiB        | 3                |
| large   | 8    | 16 GiB | 80 GiB        | 6                |
| xlarge  | 16   | 32 GiB | 160 GiB       | Coming soon      |

Other sizes are priced with the same rates:

- 1 to 8 vCPU, and 1 to 4 GiB of memory per vCPU, in steps of 1 GiB. At most 16 GiB.
- Disk: 10 GiB per vCPU is included. A running miniVM's disk is never billed as storage. Storage is billed only while a miniVM is paused (see [Storage](#storage)).

A miniVM gets the size of its template. Your organization's `base` template, used when you name no
template, has 2 vCPU and 2 GiB of memory, smaller than the `default` preset: 1.25 credits
per hour (2 × 0.5 + 2 × 0.125). A template you build gets the `resources` its recipe asks for, 2 vCPU and 2 GiB when it names none. See
[minisandbox.yaml](https://onshore.sh/docs/reference/minisandbox-yaml).

The largest size is **large** (8 vCPU, 16 GiB), at every account level. **xlarge** (16 vCPU, 32 GiB) is coming soon, with computer use. See [Quotas and limits](https://onshore.sh/docs/account/quotas-and-limits).

A paused miniVM costs no compute.

## Storage

| What           | Price                  |
| -------------- | ---------------------- |
| Paused miniVMs | 3 credits per GB-month |

- Storage is billed only while a miniVM is paused. A running miniVM costs compute only.
- Storage is measured on the size of the paused miniVM's saved snapshot (its memory and the disk blocks it has written), as stored. Billing starts once the snapshot is saved to storage. It is metered every hour.
- A pause onshore.sh makes for maintenance is not billed.
- Each month, your organization gets 1 GB-month of storage included for every 100 credits of compute billed that month.
- A paused miniVM is kept 30 days. See [Lifecycle](https://onshore.sh/docs/guides/lifecycle#how-long-a-paused-minivm-is-kept).

## Templates

Building a template and keeping its versions are not billed. You pay for the miniVMs you start
from it: compute while they run, storage while they are paused, and their egress. Builds have
their own limits, see [Quotas and limits](https://onshore.sh/docs/account/quotas-and-limits).

## Network

| What                                 | Price                                                                                                                      |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Ingress (traffic into miniVMs)       | included                                                                                                                   |
| Egress (traffic out to the internet) | 100 GB per organization per month included, plus 20 GB per 100 credits of compute billed that month; then 2 credits per GB |

Each miniVM's outbound bandwidth is capped at 25 Mbit/s per vCPU, between 50 and 400 Mbit/s. Short bursts up to twice that rate are allowed for 30 seconds.

SMTP ports 25, 465 and 587 are blocked.

## Credit packs

You buy credits in packs, from the **Billing** page of the console. Larger packs come with bonus credits.

| Pack    | Price | Credits you get                      |
| ------- | ----- | ------------------------------------ |
| Starter | €5    | 500                                  |
| 1,000   | €10   | 1,000                                |
| 5,250   | €50   | 5,250 (5,000 + 250 bonus, +5 %)      |
| 11,000  | €100  | 11,000 (10,000 + 1,000 bonus, +10 %) |
| 28,750  | €250  | 28,750 (25,000 + 3,750 bonus, +15 %) |

- Prices exclude VAT. VAT is added on the amount you pay.
- Credits you buy, and their bonus credits, are valid 12 months.
- Prices are in euros. Stripe may show the amount in your local currency at checkout: if you pay in that currency, Stripe converts it at its own rate, and the local price includes a conversion fee of about 2–4 %. You can choose to pay in euros instead. A refund goes back in the currency you paid, at the exchange rate of your payment: a full refund gives back exactly what you paid. Automatic top-ups are charged in euros; if your card is in another currency, your bank converts the amount.
- How to buy, auto top-up and the monthly maximum: see [Billing](https://onshore.sh/docs/account/billing#buy-credits).

## Cloud devices

[Cloud devices](https://onshore.sh/docs/devices) are billed per started minute in credits, from the moment the device starts booting until it is released, by you or automatically. Failed starts are free.

| Device     | Kinds (`ons device kinds`)             | Credits per minute (`creditsPerMinute`) |
| ---------- | -------------------------------------- | --------------------------------------- |
| Android    | `android_phone`, `android_tablet`      | 4                                       |
| iOS        | `ios_simulator`, `ipad`, `apple_watch` | 7                                       |
| iOS, large | `iphone_duo`                           | 7                                       |

A device keeps the price it was added at.

## App builds

[App builds](https://onshore.sh/docs/app-builds) run on a builder, billed per started minute in credits from the moment
it is created, its start included, until it is released. A minute in which a build ran, even partly, is billed at the
building price; any other minute, while the builder is kept warm for the next build, at the warm
price. A builder that never becomes ready is free.

| Builder | Credits per minute, building | Credits per minute, warm |
| ------- | ---------------------------- | ------------------------ |
| iOS     | 7                            | 1.4                      |
| Android | 4                            | 0.8                      |

A builder keeps the price it started at. It is released 10 minutes after its last build, or at
once with `device builder-rm`. The cloud device the app is installed on is billed separately, at
the [cloud device](#cloud-devices) price.

## Worked examples

### Example 1: CI test runs

You run your test suite 300 times a month, each run on a **default** miniVM (4 vCPU, 8 GiB) for 10 minutes. The miniVM is killed after each run.

| Item      | Calculation                                                          | Credits                 |
| --------- | -------------------------------------------------------------------- | ----------------------- |
| Compute   | 300 runs × 10 min = 50 hours × 3 credits                             | 150                     |
| Storage   | nothing paused                                                       | 0                       |
| Egress    | 40 GB of downloads, under the 130 GB included (100 + 20 × 150 / 100) | 0                       |
| **Total** |                                                                      | **150 credits** (€1.50) |

### Example 2: a coding agent you come back to

A coding agent works in a **small** miniVM (2 vCPU, 4 GiB) for 8 hours a day, 22 days a month. Between sessions it is paused. Its saved snapshot is 6 GB (4 GB of memory plus 2 GB written to disk).

| Item      | Calculation                                                                                                                                              | Credits                             |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| Compute   | 22 days × 8 h = 176 hours × 1.5 credits                                                                                                                  | 264                                 |
| Storage   | paused for the other 544 hours of a 30-day month (720 hours): 6 GB × 544 / 720 = 4.53 GB-month, minus 2.64 GB-month included = 1.89 GB-month × 3 credits | 5.67                                |
| Egress    | 20 GB, under the 152.8 GB included (100 + 20 × 264 / 100)                                                                                                | 0                                   |
| **Total** |                                                                                                                                                          | **about 270 credits** (about €2.70) |

## Related

- [Billing](https://onshore.sh/docs/account/billing): buying credits, auto top-up, the monthly maximum.
- [Quotas and limits](https://onshore.sh/docs/account/quotas-and-limits)
- [Metrics and usage](https://onshore.sh/docs/guides/metrics)

Markdown version: https://onshore.sh/docs/account/pricing.md
