> ## Documentation Index
> Fetch the complete documentation index at: https://modal-devin.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Devin on Modal

> Run Devin Outposts sessions on Modal with the compute, workspace, and controls your engineering work needs.

`modal-devin` lets you run Devin's work where your work already lives. Devin plans
in Devin Cloud while commands, file edits, repository access, and workloads run in
isolated Modal Sandboxes you configure and control.

<Note>
  **What is Modal?** Modal is a cloud platform for running code without managing
  servers. You define your environment and compute requirements in Python; Modal
  provisions and runs the infrastructure.
</Note>

That means Devin can use the environment the task actually needs—not a one-size-fits-all
development VM. Give it a GPU for model-serving or training work, a persistent Modal
Volume for large datasets and weights, or access to services and registries available
from your Modal environment.

## Why run Devin on your infrastructure?

Most software work fits in a CPU-only sandbox. Some of the highest-value work does
not: validating a dependency upgrade against production-like hardware, diagnosing a
bug that appears only under GPU load, or tuning an inference server against a real
model and dataset.

Use a Modal-backed outpost when Devin needs:

* Specialized compute, including GPUs, memory configurations, or a specific region.
* A persistent workspace or shared data that should not be downloaded for every session.
* Custom tools, project source, system packages, and credentials.
* Connectivity to the services and registries your Modal environment can reach.
* The deployment and operational controls you already use with Modal.

## How it works

`modal-devin` connects an outpost to Modal in two parts:

1. The **orchestrator** watches your outpost for queued sessions and manages their
   compute lifecycle as a Modal application.
2. The **worker** runs each accepted session inside its own Modal Sandbox.

Workers need outbound HTTPS access to Devin and run without inbound ports or a public
IP.

```mermaid theme={null}
flowchart LR
    D["Devin Cloud"] --> P["Your outpost"]
    P --> O["modal-devin orchestrator"]
    O --> S["Modal Sandbox"]
    S --> W["Devin worker and your workspace"]
```

## Get started

Run the interactive setup wizard from the project that will own the outpost:

```bash theme={null}
uvx modal-devin init
```

The wizard configures Modal if needed, creates the outpost, stores its Devin
credential as a Modal Secret, writes a minimal Modal application to your repository,
and deploys it. The generated application is ordinary code you own: customize it as
your workloads evolve.

<Card title="Create an outpost" icon="wand-magic-sparkles" href="/tutorials/create-an-outpost" horizontal>
  See each prompt and what the wizard creates.
</Card>

## Your generated Modal application

You choose:

* Project source, tools, dependencies, Volumes, and Modal Secrets.
* CPU, GPU, memory, region, retries, schedule, and deployment policy.
* How much state to preserve when a Devin session is suspended and resumed.

`modal-devin` handles queue consumption, worker startup, resumability, scoped session
credentials, and cleanup—so you can focus on the environment, not reimplementing the
Outposts lifecycle.

<Note>
  `modal-devin` is alpha software. Until the first stable release, only the latest
  release on the default branch receives security fixes.
</Note>

## Requirements

* [uv](https://docs.astral.sh/uv/getting-started/installation/).
* Python 3.11 or newer.
* A Modal account; the wizard can configure local credentials.
* A Devin organization with Outposts enabled.
* An admin-scoped Enterprise service user key from Devin. This broad scope is
  currently required to create and serve outposts.
