studio-admin is a bash script with root, allowed to the studio user through sudo for a
fixed list of commands. Names travel as arguments and are validated against [a-z0-9-]; secrets travel
as JSON on stdin; the answer is one JSON object. Studio calls it from queued jobs.
| Command | Does |
|---|---|
project-bootstrap <key> | For a repository Studio just created: the latest Laravel, Laravel Boost and Larapilot, installed, committed and pushed. |
project-create <key> | Linux user, clone with the deploy token, database, .env, build with dev dependencies, migrations, PHP-FPM pool, Caddy host, the services of the project settings (cron, queue workers or Horizon, Reverb, Pulse) and the access check when the project has rules. Returns the Larapilot API token and the commit. |
project-deploy <key> | Fetch, reset to the branch, build, migrate, restart the services. Returns the commit. |
project-configure, workspace-configure | Apply changed project settings to the site or to one preview: services, cron, Caddy host and access check. |
project-delete <key> | Removes services, host, pool, database, user and files. |
workspace-create <user> <key> | Linux user ws-<user> if new, the env file with the person's tokens, clone with their token, database copied from the site, .env, build, custom skills registered, pool, Caddy host, the bridge as a systemd service. |
workspace-env | Rewrites the tokens (the git token and user name, the provider's variables for the agent, the Claude credential) and restarts the bridge. |
workspace-start, -stop, -status, -delete | What they say. Stop also kills the person's processes in that directory; delete removes the workspace's sandboxes too. |
sandbox-create <user> <key> <id>, sandbox-delete | For the worktree the bridge made for a conversation: its .env, a copy of the workspace's database, the build and a preview host; and their removal. |
claude-login, claude-status, claude-logout, claude-forget | The official claude auth of the person, in the folder of one of their Claude accounts (~/.claude or ~/.claude-<name>); forget removes a folder, never following its links. |
git-cli <host> | Installs the agents' CLI of a git host (gh, glab, the Azure CLI) the first time a workspace on it needs it. |
update-check, update-start [force], update-channel, update-auto | For the System page: ask studio-update what the channel would install, start studio-update.service or studio-update-force.service (their own units, so they outlive the queue worker they restart), switch the channel and the nightly timer. |
system-update-start, system-update-auto | Start studio-update system as studio-system-update.service, switch the nightly server update. Neither starts while an update of Studio or of the server runs. |
Two drivers in Studio: local points every workspace at one bridge on the developer's machine, for
working on Studio itself; native is the one the installer configures. A workspace keeps the driver it
was created with.
Security#
- Accounts: invite-only; email and password with two-factor and passkeys; roles, read on each project, enforced by policies on every page and action.
- Previews and sites: served over HTTPS by Caddy. A preview runs with
APP_DEBUG=true: every project host is behind the Studio login and the project assignment, narrowed by the access rules (address lists, branch overrides), which Caddy checks before the app sees the request. Studio's own session cookie never reaches a project host. - Bridge: listens on the loopback only, one port per workspace, with a token per workspace. Its callbacks carry a second token per workspace that Studio stores hashed and matches on every request.
- Root: only
studio-admin, through sudo, for named commands with validated arguments. Studio never runs shell commands of its own. - Secrets: git and Claude tokens, bridge and callback tokens, webhook secrets, MCP server headers and the Larapilot API token are encrypted at rest with the app key. On the server, each person's tokens sit in a root-owned file readable by their Linux user only, and git gets the token from the environment through an askpass helper, never from a file.
- The agent: runs as
ws-<user>; Unix permissions keep it out of other people's homes and out of the project sites; managed settings deny reading the login files (~/.claude-*too) and disable bypass mode. It is not a kernel boundary between two workspaces of the same person. Its browser carries only the pass of the preview host it works on, and Chromium keeps its own sandbox. - Infrastructure: connector accounts are the administrators', checked and stored encrypted; their pages ask for the password again. Members reach only the rows attached to their projects and the actions handed to their role, checked on the server for every call, and every action is logged with who did it.
- Updates:
studio-updateruns as root and installs the release tags of the repository instudio.env(and, on a beta server, the head of main). Whoever can push such a tag, or push to main for beta servers, can run code as root on every server that updates from it: protect the tags and the branch, sign them, and list the allowed keys in/etc/studio/update-signersso an unsigned or foreign build is refused. Turn the nightly updates off to read each release before installing it. - Transport: HTTPS everywhere; Studio's loopback listener on 8081 serves only the TLS question, the access check of protected hosts and the bridges' callbacks.
For zero public exposure put the server on a tailnet; then every person needs the client. Most agencies will keep Studio public with two-factor on.