Skip to content

Quickstart

  1. Sign up

    Open onshore.sh/app and sign in with one of the options the sign-in page shows: Google or an email magic link (disposable email addresses are refused). Your organization is created at your first sign-in.

  2. Add a card

    An organization runs miniVMs only once it has a payment method. An owner opens Billing in the console and clicks Add payment method. The card is entered on a Stripe-hosted page; it never reaches our servers. Adding a card does not charge it; your bank may show a zero-amount check or a small amount that is never taken.

    Your first eligible card brings 500 welcome credits, valid 7 days from when they are granted (1,000 credits cost €10). It is granted once per person and once per card. Unused welcome credit expires after 7 days. If no welcome credit is granted (the person or the card already had it), buy credits on Billing before you start a miniVM.

    Until a card is saved, ons create answers: Add a card to start your first miniVM. Your first eligible card gets 500 credits.

  3. Create an API key

    In the console, open API keys, type a name (for example laptop) and click Create key. Copy the key now: it is shown once. It starts with msb_.

    You need it for the E2B SDKs and for CI. On your own computer, ons login can also create a key for you in the browser (next steps).

  4. Install ons

    Terminal window
    curl --proto '=https' --tlsv1.2 -fsSL https://get.onshore.sh/install.sh | sh

    The script installs ons in ~/.local/bin after checking its signature, and installs the agent skill for the coding agents it finds. See Install the CLI.

  5. Log in

    The install script runs ons login for you when you run it in a terminal. To run it yourself:

    Terminal window
    ons login

    ons prints a page to open and a code like ABCD-EFGH. Open the page, type the code, and approve. ons saves a new API key in ~/.config/onshore/config.toml.

    To use the key you created in step 3 instead, run ons login --key and paste it at the hidden prompt.

  6. Run your first miniVM

    Terminal window
    ons create

    ons prints the id of the new miniVM. It starts from the base template and lives 300 seconds unless you kill it first.

    Terminal window
    ons exec <minivm-id> -- uname -a
    ons exec <minivm-id> -- sh -c 'echo hello > /tmp/hello.txt && cat /tmp/hello.txt'
    ons kill <minivm-id>

    <minivm-id> is the id ons create printed. ons ls lists your miniVMs. exec runs the command without a shell, so use sh -c '…' for pipes and redirections. kill deletes the miniVM and its disk.

The welcome credit lasts 7 days. After that, or once it is used:

  • You buy credit packs when you need them, or turn on auto top-up (off by default): pick a pack and a threshold in credits.
  • You set a monthly maximum: credits bought in one calendar month (UTC) never go above it. It starts at €50; an owner raises it on Billing, within the limit of the account level.

See Billing and Pricing.

The official E2B SDKs work with onshore.sh unchanged. Set two environment variables:

Terminal window
export E2B_DOMAIN=onshore.sh
export E2B_API_KEY=<your-api-key>

<your-api-key> is the onshore.sh API key from step 3.

Terminal window
pip install e2b
from e2b import Sandbox
sbx = Sandbox.create(timeout=300)
result = sbx.commands.run("uname -a")
print(result.stdout)
sbx.files.write("/tmp/hello.txt", "hello")
print(sbx.files.read("/tmp/hello.txt"))
sbx.kill()

The SDKs need Python 3.11 or later, or Node 22.19 or later. See Migrate from E2B for what differs.