Skip to content
Browse docs

Web terminal

Every Layerbase Agent Server has a Terminal tab: a real login shell on the server, as the ubuntu user, right in the dashboard. There is no SSH key to create, no local terminal to configure and no host key to trust. It is the quickest way to run a command, finish an agent's sign-in that asks you to paste a code back, or hand an agent a screenshot.

Agent Servers, including the web terminal, is in beta as part of the early adopter program. SSH and your editor's remote connection work alongside it.

Opening a terminal

  1. Open the server in the dashboard.
  2. Choose the Terminal tab. If no session is selected, the session picker opens so you can create or resume one.
  3. Type as you would in any terminal.

Project shortcuts

Choose Projects to search local repositories under ~/dev and worktrees under ~/worktrees. Pin common folders; pins and recent projects are remembered in this browser for each server. New terminal starts a session in that folder. Resume opens an existing session whose active pane is in the same folder, preserving its jobs. At a shell prompt, Insert cd inserts the directory command for you to review and submit with Enter.

On phones, Projects and available voice controls stay near the bottom of the screen. Secondary terminal actions are under Tools.

If the tab asks you to update server tools, open the server's Settings tab and run Update server tools once. Agent Servers created before the terminal existed need it to get the terminal service; it takes about a minute and does not restart anything you are running.

Sessions that survive a closed tab

The shell runs inside tmux on the server, so it keeps running when the browser goes away. Close the tab, put the laptop to sleep or lose the network, and the next time you open the Terminal tab you can reopen your named session from Sessions, with long-running jobs still going. No terminal is created automatically. With updated server tools, opening a session transfers control here and detaches its other browser or SSH viewers without restarting jobs.

A dropped connection reconnects on its own. The status line shows Reconnecting while it tries, and a Reconnect button if it gives up.

Use Open terminal in the server header to jump here. The terminal toolbar has connection status, Upload, and a fullscreen control. Fullscreen fills the display and preserves the current session; press Escape or Exit fullscreen to restore it. Use Files in the toolbar or navigation to open the dedicated filesystem browser. The Uploads tab collects files saved in the uploads folder, including screenshots pasted into Terminal. Choose Connect in the server header for web terminal, IDE, and SSH connection options.

The Terminal and Help & shortcuts sub-tabs switch views without closing the session. Help explains tmux sessions, copy and paste, keyboard shortcuts, and copyable approval-mode commands for every supported agent, including codex --approve-for-me. Upload notifications appear at the bottom-right of the page, including in fullscreen, without moving the terminal. A shrinking line shows when a completed upload notice will disappear.

The mouse wheel scrolls the web session through tmux history; press Escape to leave history and return to live input. Keyboard Up and Down still work normally in your agent or shell. For an existing server, update server tools and reconnect the terminal to enable mouse handling. Sessions you switch to manually can have their own tmux mouse settings. Highlight text to copy it to the clipboard on the computer using the browser, including at a plain shell prompt. Copy joins recognized wraps and likely prose continuations near the right edge, keeping paragraphs and list items separate. Wrapped URLs copy and open as one link. Some applications discard wrap information; choose Copy exactly when every original line break matters, or Copy as one line to remove them all. These options are in the toolbar Copy menu and the right-click menu, which also includes Paste. Hold Ctrl or Cmd when clicking to send mouse input to the terminal application.

Choose Sessions in the Terminal toolbar to open a dialog showing all available tmux sessions, their connection status, and window counts. Without a selected session, Terminal shows a button to create or choose one. From there you can reopen a session, create a named terminal, or rename a session. You can also hover over a terminal tab and choose its pencil icon to rename it in place. The icon is available on keyboard focus and touch screens too. Each terminal tab reconnects to that session. Open tabs and your selection survive a page reload in the same browser tab. Selecting an already open session focuses its existing tab. Close the session picker to return to Terminal without creating anything. Only the selected tab has a browser connection; switching or closing tabs leaves jobs running. Sessions created over SSH appear here too. New terminals start in your home directory. Up to 32 tmux sessions can be managed here.

The address bar includes the selected session, so you can bookmark it or reopen it from your phone. You still need access to the server. A session link takes priority over your saved tabs. Invalid links show a notice with a Choose a session action; ended sessions never silently open a new shell. If a session is detached but still running, Reconnect attaches to it without restarting its jobs. This can transfer control from another browser or SSH connection.

To end a session's jobs, detach all its browser and SSH clients, choose Stop in Sessions, then confirm. Closing a terminal tab does not stop its session. If a session has ended, create a named session or reopen an existing one. Every tab can be closed; choose Sessions to reopen one or create another. Older servers need Update server tools; the terminal service must also support session controls.

Running agents unattended

Your session stays running

Each terminal tab connects to a named tmux session on your server. tmux keeps your shell and agents running when you close a browser or terminal tab. Reopen the session from Sessions to pick up where you left off. The server must stay on; stopping or restarting it interrupts running processes.

Scroll to browse terminal history and press Escape to return to live input. You can also attach to the same session over SSH.

Keyboard shortcuts

Highlight terminal text to copy it automatically to this computer's clipboard when you release the mouse. This works at a shell prompt and inside agents. Copy joins recognized wraps and likely prose continuations near the right edge, keeping paragraphs and list items separate. Wrapped URLs copy and open as one link. Choose Copy exactly to keep the original line breaks, or Copy as one line to remove them all. These options are also in the right-click menu alongside Paste. Ctrl+C still interrupts the running command. Ctrl+Shift+C (Windows / Linux) or Cmd+C (Mac) also copies the selection. Hold Ctrl or Cmd when clicking to send mouse input to the terminal application. Paste with Ctrl+Shift+V (Windows / Linux) or Cmd+V (Mac).

Commands such as /copy can copy a response to your browser clipboard. If your browser requires a tap, use Copy response beside Copy. Clipboard forwarding requires the terminal to be visible and focused.

Drag a terminal tab to reorder it. With a tab focused, use Alt+Shift+Left or Alt+Shift+Right. Your browser remembers the order for this server.

Shift+Enter
Insert a newline in supported agents.
Ctrl+C
Interrupt the running command.
Ctrl+Shift+C / Cmd+Shift+C
Copy selected text.
Ctrl+Shift+V / Cmd+V
Paste text or an image.
Drag
Select and copy terminal text to your clipboard.
Escape
Exit fullscreen. Otherwise, leave tmux scrollback.

Drop or paste files into a connected terminal, or choose Upload. Files are saved to ~/uploads.

Agent approval commands

New server shells use these defaults automatically, across all repositories. Update server tools and create a new session to pick up changes.

codex: Automatic approval review
codex --approve-for-me
claude: Auto mode
claude --permission-mode auto
cursor-agent: Auto-review
cursor-agent --auto-review
devin: Smart mode
devin --permission-mode smart
gemini: Auto-approve tools
gemini --approval-mode=yolo
grok: Auto-approve tools
grok --always-approve
opencode: Allow tools
OPENCODE_PERMISSION='"allow"' opencode

Automatic review can still refuse actions. Gemini, Grok and OpenCode allow tools without a review step. Agent versions, models and account policies may limit these modes. Pass an explicit permission option to override the default, or use command codex (and similarly for other agents) to use the agent's own settings.

Codex: automatic approval review

text
codex --approve-for-me

Reviews permission requests automatically. Requests can still be denied, and the sandbox still applies.

text
codex resume --last --approve-for-me
Codex permissions reference

Bypass approval prompts

These modes let the agent change files and run commands with your server user's access, including accessible credentials and network services. Use them only for work you trust. Sign-in, setup questions, and account limits can still pause a run.

Codex: no sandbox or approvals
codex --dangerously-bypass-approvals-and-sandbox
Claude Code: bypass permissions
claude --dangerously-skip-permissions
Claude Code permissions reference
Gemini CLI: auto-approve tools
gemini --approval-mode=yolo
Gemini CLI permissions reference
Cursor: allow unless explicitly denied
cursor-agent --force
Cursor CLI permissions reference

Choose permissions before leaving a run unattended. If a flag is unavailable, update the agent from Agents or check its --help. Other agents have their own permission settings on the Agents tab's documentation links.

If Codex rejects a permission change with "Server is draining", the change was not applied. Wait for the current work to finish, then exit and resume Codex with the command above. Reconnecting this web terminal alone does not restart Codex.

Session help

Run commands from your repository or worktree. This terminal already uses tmux: close the browser tab to leave work running, then reopen it to reconnect. The server must stay on. Ctrl+C interrupts the foreground program; it does not detach. To restart Codex intentionally, wait for its work to finish, use /quit, and wait for the shell prompt before running codex resume. If it says the conversation is still in use, wait for the previous client to close and retry; restarting tmux will not clear Codex ownership safely.

Scroll the mouse wheel to browse the web session's history, then press Escape to return to live input. Drag to select and copy terminal text. If scrolling is unavailable, update server tools and reconnect. A session you switch to manually may have its own mouse settings.

text
tmux list-sessions

Inside this terminal, press Ctrl+b, then s to choose a session. Or switch by name. Replace your-session-name with a name from the list:

text
tmux switch-client -t 'your-session-name'

From a separate SSH connection, transfer control of the same session to SSH without stopping its jobs:

text
tmux -u attach-session -d -t 'your-session-name'

If Codex says a conversation is open in another app, check Sessions for the terminal already running it. Open that session to continue there. Reconnecting tmux does not require resuming Codex again. The codex resume --last command can select a conversation running in a different terminal. To move a conversation to a new terminal, close it in its original Codex client first, then retry. Do not stop every agent process to clear one conversation.

Start, stop, and restart controls are in the server header on every tab. Stop and restart interrupt running tasks. To update Codex, use Update Codex on Overview or Agents. Older servers first need Update server tools in Settings. The update uses the official installer; reopen Codex afterward to run the new version. Updating server tools and updating an agent are separate actions.

Images and files from your computer

A coding agent running on the server cannot read your laptop's clipboard, so pasting a screenshot into an agent over SSH never works. The web terminal closes that gap: drag a file onto the terminal, paste an image into it, or use the Upload button. The file is saved on the server in ~/uploads and its full path is typed at the cursor, without pressing Enter, so the agent's prompt receives it directly.

  • Allowed: images (PNG, JPEG, GIF, WebP), PDFs, and text files (plain text and logs, Markdown, CSV, YAML, JSON). Other types are refused before anything is sent.
  • Size: up to 20 MB per file and 5 files at a time. The server checks every file again, including that an image really is the image type it claims to be.
  • Names: files are saved as YYYYMMDD-HHMMSS-name.ext, with spaces and unusual characters replaced. An upload never overwrites an existing file. Successful upload notices disappear after six seconds; you can also dismiss them immediately. Click an image thumbnail to open a larger modal preview, including in fullscreen. The preview stays open until you close it or press Escape. Error notices stay until dismissed.
  • Cleanup: uploads older than 7 days are removed automatically. Files you put in the folder yourself are left alone. If the folder holds more than 200 MB, new uploads are refused until you delete some.

The Upload button appears once the server runs the current tools. If you do not see it, run Update server tools from the Settings tab.

Copy, paste and keys

KeysWhat it does
Shift+EnterInsert a newline in supported coding agents
Drag to highlight textCopy the selection to your computer when you release the mouse
Ctrl+Shift+C (Cmd+C on Mac)Copy the selection again
Right-clickOpen the Copy, Copy as one line, and Paste menu
Ctrl+Shift+V (Cmd+Shift+V on Mac)Paste text
Drop a file, or paste an imageUpload it to ~/uploads

Links in the output open in a new tab only when you click them. Programs on the server cannot write to your clipboard. On a phone or tablet, a row of extra keys (Esc, Tab, arrows, Ctrl and Paste) sits under the terminal; mobile use is best effort.

Limits

  • Up to 3 open terminal tabs per server and 10 across all your servers.
  • A tab disconnects after 30 minutes without input or output, and any connection ends after 12 hours. Either way the shell keeps running in tmux. After an idle disconnect, click the terminal or press a key to reconnect. The first key only reconnects; type again once Connected appears.
  • Very fast output (a large cat) is paced so one tab cannot flood the connection. Nothing is dropped; it just arrives at a steady rate.

Security and privacy

  • The server opens an outbound connection to the Layerbase terminal service. No inbound port is opened on your server and no SSH key is created for the terminal.
  • Each connection uses a single-use pass that is valid for one minute and only for your server. The server checks that pass itself before it starts a shell, so the terminal service alone cannot open one.
  • Only the server owner can open its terminal. When access to Agent Servers is removed or the server is deleted, new sessions are refused at once and open ones close within a few minutes.
  • What you type and what the terminal shows is never logged or recorded, and neither are uploaded files or their names. We keep only connection metadata (when a session started and ended, byte counts, why it closed) to run the service.

Troubleshooting

  • Underscores instead of symbols: update server tools in Settings, then reconnect the terminal. The updated tmux connection uses UTF-8, including when reattaching to an existing session.
  • "The server is connecting to the terminal service": the terminal service starts about a minute after setup or a tools update. The tab picks it up on its own.
  • "Too many terminal sessions are open": close a Terminal tab in another browser window and reconnect.
  • An upload is refused: check the type and size above. "The uploads folder is full" means ~/uploads holds more than 200 MB; list it (ls -la ~/uploads), delete the files you no longer need, and try again.