Quickstart
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.
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 createanswers:Add a card to start your first miniVM. Your first eligible card gets 500 credits.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 withmsb_.You need it for the E2B SDKs and for CI. On your own computer,
ons logincan also create a key for you in the browser (next steps).Install ons
Terminal window curl --proto '=https' --tlsv1.2 -fsSL https://get.onshore.sh/install.sh | shTerminal window curl --proto '=https' --tlsv1.2 -fsSL https://get.onshore.sh/install.sh | shonsruns on Windows inside WSL2. In PowerShell, install WSL with Ubuntu once:Terminal window wsl --install -d UbuntuThen open the Ubuntu terminal and run:
Terminal window curl --proto '=https' --tlsv1.2 -fsSL https://get.onshore.sh/install.sh | shThe script installs
onsin~/.local/binafter checking its signature, and installs the agent skill for the coding agents it finds. See Install the CLI.Log in
The install script runs
ons loginfor you when you run it in a terminal. To run it yourself:Terminal window ons loginonsprints a page to open and a code likeABCD-EFGH. Open the page, type the code, and approve.onssaves a new API key in~/.config/onshore/config.toml.To use the key you created in step 3 instead, run
ons login --keyand paste it at the hidden prompt.Run your first miniVM
Terminal window ons createonsprints the id of the new miniVM. It starts from thebasetemplate and lives 300 seconds unless you kill it first.Terminal window ons exec <minivm-id> -- uname -aons exec <minivm-id> -- sh -c 'echo hello > /tmp/hello.txt && cat /tmp/hello.txt'ons kill <minivm-id><minivm-id>is the idons createprinted.ons lslists your miniVMs.execruns the command without a shell, so usesh -c '…'for pipes and redirections.killdeletes the miniVM and its disk.
Add credit
Section titled “Add credit”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.
Use the E2B SDK
Section titled “Use the E2B SDK”The official E2B SDKs work with onshore.sh unchanged. Set two environment variables:
export E2B_DOMAIN=onshore.shexport E2B_API_KEY=<your-api-key><your-api-key> is the onshore.sh API key from step 3.
pip install e2bnpm install e2bfrom 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()import { Sandbox } from "e2b";
const sbx = await Sandbox.create({ timeoutMs: 300_000 });const result = await sbx.commands.run("uname -a");console.log(result.stdout);await sbx.files.write("/tmp/hello.txt", "hello");console.log(await sbx.files.read("/tmp/hello.txt"));await sbx.kill();The SDKs need Python 3.11 or later, or Node 22.19 or later. See Migrate from E2B for what differs.