Overview
An Environment is where AI SRE agents actually execute actions. Every tool call the agent makes, including running commands, reading and writing files, running Skills, and connecting to MCP services, happens inside an Environment. AI SRE provides two types of Environments:Cloud Sandbox
A Flashduty-managed temporary container that works out of the box with no install. When no self-hosted Runner is online and usable, sessions use the cloud Sandbox.
Self-hosted Runner
A persistent process deployed on your own machine (BYOC, Bring Your Own Compute). It connects out to AI SRE and lets the agent execute inside your network boundary.
The console record is called an Environment. The process running on your machine is called a Runner. One self-hosted Environment maps to one Runner process; cloud Sandbox instances are managed by the system per session.
Cloud sandbox
The cloud Sandbox is a temporary execution container managed by Flashduty. It is best for quick starts, demos, and investigations that do not need access to your private network. You do not install a process or maintain a machine. Use the cloud Sandbox when:- you have not deployed a Runner yet and want to try AI SRE first;
- the investigation only needs Flashduty data, public services, or public documentation;
- the task is one-off and lightweight, so it does not justify a persistent machine;
- you want to force execution into the managed environment instead of using an existing Runner in the account.
Cloud environment templates
A cloud environment template is a reusable, predefined configuration for the Flashduty-managed cloud Sandbox: network access, environment variables, and a setup script. If a session’s cloud Sandbox has no template bound, it starts with the system default configuration; once a template is bound, new Sandboxes start with that template’s configuration. Go to AI SRE → Customize → Environments → Cloud to view, create, edit, or delete cloud environment templates.Create a cloud environment template
Platform-reserved environment variable names. The platform injects the following variables; saving a template that sets any of them is rejected:
FLASHDUTY_APP_KEY, FLASHDUTY_BASE_URL, FLASHDUTY_DOCS_URL, FLASHDUTY_CONSOLE_URL, PATH, HOME, and the GitHub (GH_TOKEN*, GIT_CONFIG_*) and GitLab (GITLAB_*, GLAB_*) authentication and host variables.
FLASHDUTY_CONSOLE_URL is the console address. The agent expands it into clickable links when it cites incidents, alerts, channels, and schedules; when no console address is configured it is not injected, and the agent cites resources by ID in prose instead. It holds no secret, so the agent can read it.
Even if a same-named variable is set some other way, the platform’s value is used when commands run (on both the cloud Sandbox and self-hosted Runners). Use template environment variables only for non-sensitive business configuration; for secrets, use MCP member authorization or the relevant App integration.
The setup script runs inside a fresh sandbox (Ubuntu 24.04, running as root), before the agent starts — typically used to apt install packages the agent needs.
Delete a cloud environment template
Deleting a cloud environment template does not affect sessions currently using it — bound sessions fall back to the system default configuration and keep working. New Sandboxes created afterward use the system default configuration.Cloud environment templates configure the cloud Sandbox only. Network access for a self-hosted Runner is governed by your own machine and firewall; see Self-hosted Runner below.
Self-hosted Runner
A self-hosted Runner is aflashduty-runner process that you deploy on your own machine. It keeps a persistent connection to AI SRE. When it receives work, it runs commands, reads and writes files, executes Skills, and connects to MCP services that are reachable from that machine.
The value of a self-hosted Runner comes from where execution happens:
Reach your real environment
Reach your real environment
The Runner runs on your machine, so it can access whatever that machine can reach: VPCs, intranets, dedicated lines, Kubernetes clusters, cloud-provider CLIs, databases, or jump hosts.
Data residency
Data residency
Command output, logs, temporary files, and tool results primarily stay inside your network boundary. The agent can read and analyze them, while the execution surface remains constrained by your OS account, filesystem permissions, and network policy.
Local permissions under your control
Local permissions under your control
You decide which OS user runs the Runner, which directories it can access, and which CLI credentials it has. You also decide whether to load the permission configuration on this page to narrow the command surface.
Create and connect
Go to AI SRE → Customize → Environments → Self-hosted and create a self-hosted environment. The form asks for:
After creation, the setup guide opens with this Environment’s Token, install command, upgrade command, and uninstall command. The key button on a list row, or the “Setup guide” entry for a pending row, opens the same modal.
Installation methods
The setup guide automatically fills in the realTOKEN and URL. The examples below use placeholders; use the command generated by the console.
- Linux (systemd)
- Docker
- Manual / macOS
Run as root / sudo on the target machine:The script installs the binary, creates a systemd service, and writes
/etc/flashduty-runner/env. The same command works for fresh installs and upgrades; if the latest version is already installed, it skips automatically.Both
connect-url and install_script_url are issued dynamically by the platform rather than being fixed addresses. Private or air-gapped deployments can replace the install-script distribution source with an internal mirror, but the mirror must serve install.sh, releases/latest, and releases/download/<version>/... release assets.Connect to a private endpoint with a self-signed certificate
By default, Runner verifies the certificate chain and hostname of its control WebSocket. If a private deployment uses a self-signed certificate, prefer adding its CA to the trust store of the Runner host or container. Disable verification only when you cannot install the CA and the endpoint is inside a trusted private network.- Linux (systemd)
- Docker
- Manual / macOS
Edit Restart Runner so it loads the new environment variables:
/etc/flashduty-runner/env and add the private endpoint and TLS setting:Linux service user
Linux (systemd) installs run as an auto-createdflashduty user by default. That user has no sudo access. The systemd unit enables hardening such as NoNewPrivileges=true, ProtectSystem=strict, and PrivateTmp=true, and only grants write access to the Runner state directory.
The Runner might need kubeconfig, cloud CLI credentials, or Docker group access from an existing user. In that case, enter a “Linux service user” in the setup guide, or add RUN_AS manually:
RUN_AS is equivalent to the install script’s --run-as <user> flag. The user must already exist on the system. This makes the systemd service run as that user and relaxes the home-directory protection for that user accordingly.
Token, upgrades, and uninstall
The Token is the only credential a Runner uses to connect to AI SRE. It is written into the install command or environment variables. View it only when installing, upgrading, or debugging the connection, and do not share it. If you suspect a leak, delete the Environment and create a new one. After the Runner starts, it continuously sends heartbeats. List statuses mean:Degraded appears and clears on its own, with nothing to reset. It appears when the Runner’s tasks pile up or keep timing out, and returns to Online once the backlog clears and tasks complete normally.
When a newer version is available, the Runner downloads, verifies, and replaces itself. Re-running the install command also upgrades manually.
Uninstall commands are also in the setup guide, and differ by installation method:
- Linux (systemd) / manual install: the install script’s
--uninstallflag (removes the service while preserving config) and--purgeflag (removes config and data). - Docker install: uninstall with a container command; the install script’s flags don’t apply.
docker rm -f flashduty-runnerremoves the container and keeps the/var/flashduty/workspacedata.docker rm -f flashduty-runner && rm -rf /var/flashduty/workspaceremoves everything, including the workspace data.
Permission configuration
By default, Runner uses an allow-all rule — the same trust model as running the AI model directly in your own shell:--permission-config flag or the FLASHDUTY_RUNNER_PERMISSION_CONFIG environment variable. Permission configuration is a local Runner file; it is not edited in the console form.
For a Linux (systemd) install, add this to /etc/flashduty-runner/env:
permission, mapping glob patterns to allow/deny:
- Leaving
--permission-config/FLASHDUTY_RUNNER_PERMISSION_CONFIGunset is the default and is equivalent to allowing all commands; - rules apply everywhere a command can appear: pipelines (
cmd1 | cmd2),$(...)/backtick command substitution, process substitution, arithmetic expansion, and write-redirect targets. So the rules gateecho x > /etc/passwdthe same way as running a command. Read redirects alone aren’t blocked; - commands are matched after shell normalization, so spacing differences do not affect matching;
- the most specific rule wins: the pattern with the longest literal prefix before its first
*is tried first. The catch-all"*"is always tried last, and the first matching rule applies; - the file is loaded once, at Runner startup — edit the rules and restart the Runner for changes to take effect; there is no hot reload;
- the flag/env var might be set while the file is missing, malformed, or has no rules under the
permissionkey. In that case the Runner refuses to start (fails closed) instead of silently allowing every command. Pointing the Runner at a permission config is a deliberate request to restrict it, so a broken config surfaces as an error instead of a silent security gap.
Trust mode (for dedicated/isolated environments)
Trust mode (for dedicated/isolated environments)
Equivalent to not setting Suitable when the Runner runs in an isolated VM/container with limited blast radius, or when fast incident response matters more than restricting permissions.
--permission-config at all, but lets you carve out explicit exceptions:Read-only mode (for monitoring only)
Read-only mode (for monitoring only)
Allow only read-only commands — suitable when the Runner should observe but never modify state:
File-system boundary
Permission configuration governs commands; the agent’s file read/write tools follow their own path semantics, matchingbash:
- Relative paths are confined to the workspace root with symlink-escape protection — through a relative path the agent can only read and write files inside the workspace.
- Absolute paths are passed through to the host filesystem by design, matching
bash.
Selecting an environment in a session
The environment selector at the bottom of the chat input decides where a new session executes:
When you open a past session, the selector shows its environment and status read-only. If the bound Runner is offline or deleted, the session cannot send messages; restore the Runner or start a new session.
A child session’s environment
A dispatched subagent brings its own child session, whose execution-environment rules differ from the root session’s:- Shares the parent’s environment by default: the child session uses the same sandbox / workspace as the parent and can see its files.
- Gets its own environment when dispatched elsewhere: if AI SRE sends the subtask to another self-hosted Runner or the cloud (see Agents), the child session gets its own sandbox or Runner directory. It can’t see the parent’s files.
- The child session panel shows the environment read-only: you cannot switch environments in a child session.
- An A2A child session shows no runtime environment: the remote agent executes in its own environment, and the platform does not choose that location.
Scope
Self-hosted Environments use two scopes, Shared and Team, chosen at creation and fixed afterward. For who can see, edit, and create them, see Scope and permissions.When the system auto-selects a Runner, or a session pins a Runner by ID, it uses only Shared-scope Runners or Runners of the current member’s teams.
Troubleshooting
When troubleshooting Runner issues, start with the Status and Last heartbeat columns in the self-hosted environment list.Runner shows Offline
Runner shows Offline
Offline means the Runner connected before, but AI SRE has not received a heartbeat for about 90 seconds. Check whether the systemd service or process is running, whether the machine is sleeping or offline, and whether outbound traffic to AI SRE is blocked by a firewall. After process and network recovery, the Runner reconnects automatically; any A2A delegation still in progress then carries on (the Runner retains and replays what it has already produced) rather than failing or rerunning the whole round.
Runner stays Pending
Runner stays Pending
Pending means this Environment has never connected successfully. Confirm that the install command completed, the Token belongs to this Environment, and the
URL is reachable from the target machine. If you configured permissions, also confirm that the file exists and the YAML parses.Session times out or does not respond
Session times out or does not respond
If a session is pinned to an offline Runner, AI SRE does not silently move it to another environment. Restore that Runner, or start a new session and choose Auto or cloud Sandbox. If the Runner is online but the task fails, the likely issue is network or permissions between the Runner and the target resource.
Related pages
Sandbox
Learn the cloud Sandbox lifecycle, data location, and egress.
Console Chat
View the Environment, team, and resources invoked by the agent that are bound to a session.
MCP (External Tools)
MCP connections are established inside the selected environment at agent runtime.
Skills
Skills execute inside the selected Environment.