Claude Code stops when your laptop sleeps, the lid closes or your SSH connection drops. An AI agent box is a small Linux machine of your own that stays on until you stop it, so Claude Code can keep working while you are away. This guide walks through every step on ServerPrism's AI agent hosting, from the first top-up to deleting the box when you are done.
The short version:
- Top up your AI agent balance and start a Standard box (2 vCPU, 4 GB RAM, 20 GB disk) with the Claude Code template.
- The box installs Claude Code by itself when it first starts. Open the browser terminal on the box's Agent tab.
- Sign in, start
claude, and close the tab. The session keeps running in the box.
The fastest way: the one-click Claude Code template
On the AI agent hosting page and at checkout you can pick a template. Pick Claude Code and your box installs it the first time it starts, at a version we have tested, usually in under a minute. The Get started list at the top of the box's Agent tab then ticks off each step: the box is running, Claude Code is installed, your key is saved. From there, continue with Step 6 below to sign in.
Already have a box? Use Change template on its Agent tab and pick Claude Code. Your files stay.
The steps below also show the manual way: installing Claude Code yourself in the terminal. Use it if you want a different version or already set up your box.
What you need
- A ServerPrism account.
- A Claude plan that includes Claude Code (Pro, Max, Ultra, Team or Enterprise) or an Anthropic Console account with an API key. The free Claude plan does not include Claude Code.
- A first top-up of at least $5.00 or €5.00 (£4.00).
Your Claude usage is billed by Anthropic as usual. ServerPrism only bills the box that Claude Code runs on.
Step 1: Pick a size
Anthropic lists 4 GB of RAM as the minimum for Claude Code, so Standard is the size to start with. Pro is for big builds, test suites or browser automation next to Claude Code.
| Size | vCPU | RAM | Disk | Per running hour | At most per month |
|---|---|---|---|---|---|
| Starter | 1 | 2 GB | 10 GB | $0.00376 | $2.74 |
| Standard | 2 | 4 GB | 20 GB | $0.00752 | $5.48 |
| Pro | 4 | 8 GB | 40 GB | $0.01504 | $10.97 |
Prices as of November 2026, in USD. The AI agent hosting page shows the current prices in your own currency.
How the billing works:
- vCPU and RAM are billed per second while the box runs.
- Disk is billed for every second the box exists, also when it is stopped.
- A month never costs more than the cap for the size. A Standard box that runs around the clock costs about $0.18 a day.
You can change the size later, so there is no need to get it right the first time.
Step 2: Top up your AI agent balance
Boxes are paid from a prepaid AI agent balance, not a subscription.
- Sign in and open AI agent balance in the client area.
- Enter an amount under Top up and press Top up.
- Pay it like an invoice. The amount is added to your balance as soon as the payment goes through.
A few things to know before you top up:
- The AI agent balance is separate from your account credit and only pays for AI agent boxes.
- Discount codes do not apply to boxes or top-ups.
- The balance is not refundable. It stays on your account, also after you delete a box.
Step 3: Start your box
- Go to AI agent hosting, pick the Claude Code template (or none, to install it yourself) and press Start this box under Standard.
- At checkout, pick one of the locations shown. Pick the one closest to you.
- Accept the AI Agent Acceptable Use Policy and finish the order.
- When the box is ready, open it from your services and go to its Agent tab.
The Agent tab is where everything in this guide happens: the terminal, web addresses, usage, size changes and deleting the box.
Step 4: Open the browser terminal
On the Agent tab, find Terminal. It connects by itself once the box is running. If the box is stopped, press Start at the top of the Agent tab.
The terminal is a shell inside your box, and it already runs inside tmux. When you close the page, everything you started keeps running. Press Connect again later and you are back where you left off. Use Full screen for more room.
You work as a normal user in /home/container. That home folder is the part of the box that is kept: everything outside it resets when the box restarts.
Step 5: Install Claude Code
Skip this step if you picked the Claude Code template: it is already installed. To install it yourself, run Anthropic's official installer in the terminal:
curl -fsSL https://claude.ai/install.sh | bash
It installs Claude Code into ~/.local in your home folder, so it survives restarts, and keeps it updated in the background. Check that it works:
claude --version
Prefer npm? npm install -g @anthropic-ai/claude-code works too. Global npm packages go to ~/.npm-global in your home folder.
Step 6: Sign in or add an API key
With a Claude subscription
- Run
claude auth login(or justclaude, which asks you to sign in the first time). - The terminal shows a sign-in link. Copy the whole link and open it in the browser on your own computer. Full screen helps, because the link is long.
- Sign in and approve.
- Copy the code the page gives you, paste it at Paste code here if prompted in the terminal, and press Enter.
With an API key
The easiest way: on the Agent tab, under API keys, paste your key next to ANTHROPIC_API_KEY and press Save. It goes straight into your box, to a file only your box can read, and we never store it. New terminals load it by themselves. Then start claude.
Or keep the key in a file yourself:
mkdir -p ~/.config/agent
nano ~/.config/agent/keys.env # add the line: ANTHROPIC_API_KEY=your-key
chmod 600 ~/.config/agent/keys.env
set -a; . ~/.config/agent/keys.env; set +a
claude
Claude Code asks whether to use the key. Approve it. Load the file again with the set -a line each time you open a new tmux window.
Where your keys stay: in your box. We never ask for your keys and never store them, and we leave AI agent boxes out of our own backups. Backups you make yourself on the Backups tab do include the file, so treat them with the same care. Never put a key in the Startup settings.
Step 7: Keep Claude Code running
Start Claude Code in a project folder, give it a task, and close the tab:
mkdir -p ~/workspace/my-project && cd ~/workspace/my-project
claude
It keeps working in the tmux session while you are away. A few tmux keys help when you want more than one thing running:
Ctrl+bthencopens a new window, for example for a dev server.Ctrl+bthennswitches to the next window.Ctrl+bthenddetaches. Press Connect to come back.
Check on it from your phone. If you signed in with a Claude subscription, run claude remote-control in the box. It shows a link and a QR code that open the session in the Claude app or at claude.ai/code. Remote Control does not work with an API key on its own.
What stops a session: stopping or restarting the box ends the tmux session and the programs in it. Your files and Claude Code's settings stay. Start claude --continue in the same folder to pick up the last conversation.
For agents that should start by themselves every time the box starts, such as a chat bot, put the start command in start.sh in your home folder. Copy start.sh.example to begin. Claude Code itself is interactive, so the terminal and tmux are the right place for it.
Step 8: Open a dev server through a web address
When Claude Code builds a web app, you can open it in your browser through an HTTPS web address.
- Start the app so it listens on
0.0.0.0and a port from 1024 up, for examplenpm run dev -- --host 0.0.0.0 --port 3000for a Vite app. - On the Agent tab, under Web addresses, enter the port under Port inside your box.
- Choose Who can open it:
- Signed in (recommended): only people who can open this box in the client area. We sign them in when they press Open.
- Anyone with the key: for webhooks and apps that send a key with each request. The key is shown only once. Send it in the
X-Gateway-Keyheader, asAuthorization: Bearer, or add?gateway_key=to the address. - Everyone: anyone who has the address. Only use this for pages that have their own login.
- Press Share port, then Open.
Sign everyone out ends every signed-in visit at once. Remove a port when you no longer need it.
Step 9: Check your usage and costs
The Usage and balance card on the Agent tab shows what this box has cost this month so far, how many hours it ran, its monthly cap and your balance. The AI agent balance page in the client area shows the same for all your boxes, plus recent top-ups and charges. Both update about every five minutes.
When your balance runs low, we email you. When it is empty, your boxes keep running for another 24 hours, and then we stop them. A box that stays stopped with an empty balance for 14 days is deleted, and we email you 3 days before that. A top-up before then keeps everything.
Step 10: Change the size
- Stop the box with Stop at the top of the Agent tab.
- On the Agent tab, under Change size, press Switch to next to the size you want, and confirm.
- Start the box again. The new size applies from that start.
Your files stay as they are. Your balance must cover at least one running hour at the new size. To move to a smaller size, the files in your box must fit on its disk.
Step 11: Stop or delete the box
Stop: press Stop at the top of the Agent tab. A stopped box pays only for its disk, about $1.46 a month for Standard, and starts again with your files in place.
Delete: on the Agent tab, under Delete this box, type the name of the box and press Delete this box for good. The box, every file in it and its backups are deleted at once. We do not keep a copy. Billing stops that second, and your AI agent balance stays on your account. Download anything you want to keep from the Files tab or over SFTP first.
Good to know
- There is no root and no apt. Install tools into your home folder with npm, pip or uv. Node.js 24, Python 3, uv, git, tmux and a headless Chromium are already there.
- There is no Docker inside the box and no GPU. Claude's models run at Anthropic, so Claude Code does not need a GPU.
- Each box runs in its own gVisor sandbox with its own network rules. It cannot see other customers, our own systems or private networks.
- Outgoing mail ports are closed.
- Anything that needs root or Docker will not work.
Questions and answers
Does Claude Code keep running when I close the browser?
Yes. The terminal runs inside tmux in your box, so Claude Code keeps working after you close the tab or switch off your computer. It stops only when the box stops or restarts.
Which size do I need for Claude Code?
Standard (2 vCPU, 4 GB RAM, 20 GB disk). Anthropic lists 4 GB of RAM as the minimum for Claude Code. Take Pro if Claude Code also runs big builds or a browser.
Can I use my Claude subscription instead of an API key?
Yes. Run claude auth login, open the sign-in link on your own computer, and paste the code back into the terminal. Usage counts toward your Claude plan as usual.
What does it cost to run Claude Code 24/7?
The box costs at most $5.48 a month for Standard as of November 2026, about $0.18 a day, billed per second. Your Claude plan or API usage is billed separately by Anthropic. Current prices are on the AI agent hosting page.
Where is my API key stored?
In a file in your own box, which only you can open. A key you save on the Agent tab goes straight into the box; we never store it, and AI agent boxes are left out of our own backups.
Can I run Codex, OpenClaw or another agent on the same box?
Yes. Codex CLI, OpenClaw, Hermes Agent and others are one-click templates too, and any agent that runs on Linux as a normal user with Node.js or Python fits. A bigger size helps if you run several at once.
What happens if my balance runs out?
We email you. Your box keeps running for another 24 hours, then we stop it. Your files stay, and you can start it again right after a top-up.