Skip to content
BENIBIX Learn

Cloud and Server Commands

Level 5 · Scripts and servers

How to run Claude Code on more than your laptop. Cloud sessions and /teleport, your own runners, a gateway for your staff, Remote Control and tmux panes.

Course contentsLesson 17 of 17

After this lesson you can

  • Pull a cloud session into your terminal
  • Start a cloud session on your own machines
  • Pick the server command that fits

12 mincovers 10 glossary entries

Worth reading first: System Prompt Flags

How to run Claude Code beyond one terminal

Claude Code can run as a server with no chat in the terminal, in three ways. claude remote-control lets you drive it from claude.ai or the Claude phone app. The work still runs on your computer. claude gateway puts a company's sign-in and rules in front of it. claude self-hosted-runner runs cloud sessions on your own machines.

Cloud sessions run on Anthropic's machines by default. /web-setup links your GitHub account to them once. It uses the gh sign-in already on your computer. /remote-env picks the cloud setup that new sessions from the shell start with. /teleport, or /tp, pulls a cloud session into your terminal, with its branch and its chat.

claude remote-control, or claude rc, starts the server. --name sets the name you see in the app. Inside a chat that is already open, /remote-control lets you reach just that one chat. Either way, the work runs on your own computer. The phone is where you read and reply.

claude self-hosted-runner signs up a machine or a box of code to a pool of your own machines. setup walks you through it. doctor checks a runner that is already going. orchestrator starts new runners when they are needed. Then claude --environment, with an ID that starts ccpool_, sends a new cloud session there.

--environment starts from your current commit. Add --ref with a branch name to start from that branch instead. Both need Claude Code 2.1.224 or later. The point is that the code never leaves your own machines, which some companies require.

claude gateway is a tool for admins, not for one laptop. It puts your company's own sign-in and rules in front of Claude Code. The model runs on a cloud such as Amazon Bedrock. It needs --config with a gateway.yaml file. /setup-bedrock is for one person instead. It walks you through Bedrock sign-in, region and model pins.

/setup-bedrock stays out of the menu until CLAUDE_CODE_USE_BEDROCK is set to 1. Until then, type the whole name. Two flags set up panes in your terminal. --tmux opens a tmux session for a worktree, and only works with --worktree. --teammate-mode sets how team members show. It is in-process by default. Set it to tmux for a pane each.

The three server commands

CommandWho it is forWhere the work runs
claude remote-controlYou, away from your deskYour own computer
claude gatewayA company's adminsA cloud such as Amazon Bedrock
claude self-hosted-runnerA team that keeps code in houseYour own machines
bash
claude remote-control --name "My Project"
claude self-hosted-runner setup
claude -p "Run the test suite" --environment ccpool_abc123 --ref main
claude gateway --config gateway.yaml
claude -w feature-auth --tmux
Drive this computer from the app and set up a runner. Send a cloud session to your machines, start a gateway, and open tmux panes.
Three ways to run Claude Code as a server.

Worked example

Emma checks a long job from her phone

Emma starts claude remote-control on her desktop at 6 pm. She names it nightly-migration with --name. On the train she opens the Claude app and finds the session by that name.

She answers the one question it asked. The migration of 40 files runs on her desktop the whole time.

The words for this lesson10

Check yourself

Which command lets you drive a session on your own computer from your phone?

Finished this lesson?

Marking it complete also marks its 10 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.