---
title: "Run Aider on a remote server"
description: "Aider on your own VM, wired to Claude and GPT through exe.dev with no API keys. Git commits for every change, GitHub repos, and a tmux session."
url: https://exe.dev/deploy/aider
category: "AI agents"
updated: 2026-10-30
---

# Run Aider on a remote server

AI pair programming in a terminal that stays put, with git keeping score.

- **Software:** Aider (https://aider.chat/)
- **Source:** https://github.com/Aider-AI/aider
- **License:** Apache-2.0
- **Time:** 5 minutes
- **Example VM name:** `my-aider` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe.dev/deploy/aider/manifest.json

## What you get

- Aider connected to Claude and GPT models, with no API key to paste
- A Git repository at `~/project` on persistent disk, where aider commits its changes
- An `aider` tmux session that survives disconnects

Running on the VM:

- **Aider**: installed with uv; connected to exe.dev's LLM integration, data in `~/.aider.conf.yml`
- **Your project**: a Git repository; aider commits each change, data in `~/project`
- **tmux**: keeps your terminal session running when you disconnect

How it is reached:

- ssh my-aider.exe.xyz (private): your terminal

## Deploy with Shelley

Open https://exe.dev/new?prompt=Set%20up%20Aider%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Faider.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-aider.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-aider.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Aider%20connected%20to%20Claude%20and%20GPT%20models%2C%20with%20no%20API%20key%20to%20paste%0A-%20A%20Git%20repository%20at%20%60~%2Fproject%60%20on%20persistent%20disk%2C%20where%20aider%20commits%20its%20changes%0A-%20An%20%60aider%60%20tmux%20session%20that%20survives%20disconnects%0A%0ARun%20the%20VM-side%20setup%20in%20%22Start%20coding%22.%20If%20%60~%2F.aider.conf.yml%60%20or%0A%60~%2F.aider.model.settings.yml%60%20already%20exists%20and%20differs%20from%20the%0Arecipe%27s%2C%20show%20the%20owner%20the%20difference%20and%20ask%20before%20replacing%20it.%20If%0A%60git%20config%20--global%20user.email%60%20already%20prints%20an%20address%2C%20skip%20the%0Agit%20identity%20step.%20If%20%60~%2Fproject%60%20already%20exists%2C%20reuse%20it%20and%20only%20make%0Athe%20first%20commit%20when%20it%20has%20no%20commits.%20Create%20tmux%20detached%0A%28%60tmux%20new%20-d%20-s%20aider%20-c%20~%2Fproject%60%29%20rather%20than%20attaching.%20Reuse%20the%0Asession%20if%20it%20already%20exists.%20Do%20not%20launch%20interactive%20aider.%20Verify%20in%0Aa%20scratch%20repository%2C%20not%20~%2Fproject%2C%20so%20the%20owner%27s%20history%20stays%20clean%3A%0A%60git%20init%20%2Ftmp%2Faider-check%20%26%26%20cd%20%2Ftmp%2Faider-check%20%26%26%20aider%20--yes-always%0A--message%20%22Reply%20with%20exactly%3A%20OK%22%60%20must%20print%20OK%20and%20no%20error%3B%20then%0A%60rm%20-rf%20%2Ftmp%2Faider-check%60.%20Check%20%60tmux%20has-session%20-t%20aider%60.%20Skip%20the%0Alater%20optional%20sections%20and%20FAQ.%20Finish%20with%20the%20SSH%20command%20from%20%22Take%0Aa%20break%22%2C%20using%20this%20VM%27s%20name%2C%20and%20tell%20the%20owner%20to%20run%20%60aider%60%20inside%0Ait.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe.dev/deploy/aider/prompt.txt | ssh exe.dev new --prompt=/dev/stdin
```

Or follow the steps below by hand.

[Aider](https://aider.chat/) is an open-source AI pair programmer for the
terminal. You add files to the chat and describe a change; aider edits them
and commits the result to git with a descriptive message, so every step is
easy to review or undo.

On an exe.dev VM it reaches Claude and GPT through exe.dev's
[LLM integration](/docs/integrations-llm): no API keys to paste, and model
usage billed to your exe.dev account. The session lives in tmux on the VM,
so you can close your laptop and pick up where you left off from any
computer.

## Start coding

On your computer, create a VM and connect. Pick any free name; if you've
already clicked Deploy or have a VM, skip the first command and use its name:

```bash
ssh exe.dev new --name=my-aider
ssh my-aider.exe.xyz
```

On the VM, install aider with [uv](https://docs.astral.sh/uv/), as aider's
[install guide](https://aider.chat/docs/install.html) suggests. The
`browser` extra adds the optional browser version:

```bash
uv tool install --force --python python3.12 --with pip "aider-chat[browser]~=0.86"
aider --version
```

It prints `aider 0.86.2` or later. Now point aider at exe.dev's LLM
gateway. The keys are placeholders: the gateway adds the real credentials
on the way out. The second file describes models newer than aider itself;
without it, aider sends them settings they reject:

```bash
cat > ~/.aider.conf.yml <<'EOF'
# Models come from exe.dev's LLM integration; the keys are placeholders.
model: sonnet
alias:
  - sonnet:anthropic/claude-sonnet-5-5
  - opus:anthropic/claude-opus-5-5
  - haiku:anthropic/claude-haiku-5-5
  - gpt:openai/gpt-6.1-sol
  - luna:openai/gpt-6-luna
api-key:
  - anthropic=exe-gateway
  - openai=exe-gateway
set-env:
  - ANTHROPIC_API_BASE=https://llm.int.exe.xyz
openai-api-base: https://llm.int.exe.xyz/v1
EOF
cat > ~/.aider.model.settings.yml <<'EOF'
# How to talk to models newer than aider.
- name: anthropic/claude-sonnet-5-5
  edit_format: diff
  weak_model_name: anthropic/claude-haiku-5-5
  use_repo_map: true
  use_temperature: false
  cache_control: true
  extra_params:
    max_tokens: 64000
- name: anthropic/claude-opus-5-5
  edit_format: diff
  weak_model_name: anthropic/claude-haiku-5-5
  use_repo_map: true
  use_temperature: false
  cache_control: true
  extra_params:
    max_tokens: 64000
- name: anthropic/claude-haiku-5-5
  edit_format: diff
  weak_model_name: anthropic/claude-haiku-5-5
  use_repo_map: true
  use_temperature: false
  cache_control: true
  extra_params:
    max_tokens: 64000
- name: openai/gpt-6.1-sol
  edit_format: diff
  weak_model_name: openai/gpt-6-luna
  use_repo_map: true
  use_temperature: false
  accepts_settings: [reasoning_effort]
- name: openai/gpt-6-luna
  edit_format: diff
  weak_model_name: openai/gpt-6-luna
  use_repo_map: true
  use_temperature: false
  accepts_settings: [reasoning_effort]
EOF
```

Aider commits every change it makes, so tell git who you are. This uses
the email address of your exe.dev account, from the VM's
[reflection integration](/docs/integrations-reflection); run the same
`git config` commands with other values if your GitHub account uses a
different one:

```bash
email=$(curl -s https://reflection.int.exe.xyz/email | jq -r .email)
git config --global user.email "$email"
git config --global user.name "${email%@*}"
git config --global user.email
```

It prints your address. Make a project, give it a first commit (aider
compares each change with the commit before it), and open a tmux session:

```bash
git init ~/project
git -C ~/project commit --allow-empty -m "Start project"
tmux new -A -s aider -c ~/project
```

Inside that session, start aider:

```bash
aider
```

The first time, it offers to add `.aider*` to `.gitignore`, which keeps
its chat history out of your commits: answer **Yes**. The header shows
`Main model: anthropic/claude-sonnet-5-5`. Give it a small task. For
example:

> Build a tiny website for a bakery that only sells one kind of bread.

Aider writes the files and commits them. Type `/diff` to see what changed,
`/undo` to throw the last change away, and `/help` for the rest of its
[commands](https://aider.chat/docs/usage/commands.html). Your files live
in `~/project`.

## Take a break

Press **Ctrl-b**, then **d** to detach. Aider stays running on the VM when
you disconnect, with the chat as you left it. On your computer, use this
command to hop back in:

```bash
ssh -t my-aider.exe.xyz 'tmux new -A -s aider -c ~/project'
```

A VM restart ends the running session, but not your files, commits, or
chat log. Reconnect and run `aider --restore-chat-history` from your
project's folder on the VM to pick up the conversation.

## Work on a GitHub repo

The [GitHub integration](/docs/integrations-github) lets the VM clone and
push a repository with no GitHub token on the VM. Link your GitHub account
on the [Integrations page](https://exe.dev/integrations), then give this VM
one repository. On your computer, with your repository in place of
`you/myapp`:

```bash
ssh exe.dev integrations add github --name myapp --repository you/myapp --attach vm:my-aider
```

On the VM, clone it through the integration and work on a branch:

```bash
git clone https://github.int.exe.xyz/you/myapp.git ~/myapp
cd ~/myapp
git switch -c aider-changes
tmux new -A -s myapp -c ~/myapp
```

Run `aider` in that session and ask for a change. Name the files it
should edit, or let it find them with its
[repository map](https://aider.chat/docs/repomap.html). When you're happy,
push the branch and open a pull request with `gh`, which goes through the
same integration:

```bash
git push -u origin aider-changes
GH_HOST=github.int.exe.xyz gh pr create --fill --repo you/myapp
```

Commits carry your git identity, with `(aider)` added to the author name of
the ones aider wrote. Pushes and the pull request show up as
`exe-dev-github-integration[bot]` unless you add `--act-as-user` to the
integration.

## Let it make VMs

Aider doesn't use MCP, so it can't connect to
[exe.dev's MCP server](/deploy/exe-mcp) the way Codex or Claude Code can.
But aider can suggest shell commands and run them when you say yes, and
`ssh exe.dev` is a shell command. Give the VM an SSH key of its own for
exe.dev. On the VM:

```bash
ssh-keygen -q -t ed25519 -N "" -C "aider-$(hostname)" -f ~/.ssh/exe_aider
grep -qs '^Host exe.dev' ~/.ssh/config || cat >> ~/.ssh/config <<'EOF'
Host exe.dev *.exe.xyz
  IdentityFile ~/.ssh/exe_aider
  StrictHostKeyChecking accept-new
EOF
```

On your computer, add that key to your exe.dev account, limited to VMs
tagged `aider` and to a few commands, for 30 days:

```bash
ssh my-aider.exe.xyz cat .ssh/exe_aider.pub |
  ssh exe.dev ssh-key add --tag=aider --exp=30d '--cmds="help,whoami,ls,new,rm,ssh,stat,share show"'
```

VMs the key creates get the tag `aider`; your other VMs are "not found"
to it, and it can't make anything public. Back on the VM, `ssh exe.dev
whoami` shows the key as `current`. Now ask aider for something that
needs a machine of its own:

> Make a new exe.dev VM with `ssh exe.dev new`, install PostgreSQL on it, and check that it's running.

Aider lists the commands it wants to run and asks before it runs them,
even with `--yes-always`, so nothing runs without you. Answer **Yes** to
run them, and yes again to show aider the output. To
revoke the key, run `ssh exe.dev ssh-key remove aider-my-aider` on your
computer.

## Open it in your browser

Aider also has an
[experimental browser version](https://aider.chat/docs/usage/browser.html):
a chat page for one project. To run it for `~/project` all the time, on
the VM:

```bash
sudo tee /etc/systemd/system/aider-browser.service >/dev/null <<'EOF'
[Unit]
Description=Aider in the browser, for ~/project
After=network-online.target
Wants=network-online.target

[Service]
User=exedev
WorkingDirectory=/home/exedev/project
ExecStart=/home/exedev/.local/bin/aider --browser
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now aider-browser
```

Then open `https://my-aider.exe.xyz:8501/`. exe.dev asks you to log in,
because port 8501 is private to people with access to the VM. Ask for a
change as in the terminal; aider edits and commits the same way.

The browser version and a terminal aider each keep their own chat, so give
one project to one of them at a time. To use it for another project,
change `WorkingDirectory` and run `sudo systemctl restart aider-browser`.

> [!WARNING]
> Anyone who can open port 8501 can change your code. Leave it private.

## Make yourself at home

- **Pick a model:** type `/model opus`, `/model gpt` or `/model luna` in
  aider, or start it with `aider --model haiku` for quick, cheap work.
  Change `model` in `~/.aider.conf.yml` to set the default. exe.dev keeps a
  [list of available models and prices](/llm-gateway-models); aider's own
  cost figures are estimates.
- **Plan with one model, edit with another:** `aider --architect --model
  opus --editor-model sonnet` has the first model work out a change and
  the second apply it. See aider's
  [chat modes](https://aider.chat/docs/usage/modes.html).
- **Edit in your own editor:** open the VM in VS Code or
  [code-server](/deploy/code-server), start `aider --watch-files`, and
  write a comment ending in `AI!` in any file. Aider makes the change it
  describes. See [IDE integration](https://aider.chat/docs/usage/watch.html).
- **Let it run your tests:** `aider --test-cmd "npm test" --auto-test`
  runs your tests after each change and asks the model to fix what fails.
- **Peek at your app:** ask aider to make it listen on `0.0.0.0:8000`,
  start it in a second tmux window (**Ctrl-b**, then **c**), and open
  `https://my-aider.exe.xyz/`. It's private by default.
  [More about previews](/docs/proxy).
- **Script it:** `aider --yes-always --message "Add type hints to
  utils.py" utils.py` makes one change, commits it, and exits. See
  [scripting aider](https://aider.chat/docs/scripting.html).

For everything else, head to [aider's docs](https://aider.chat/docs/).

## Frequently asked questions

### Can I use my own Anthropic or OpenAI API key?

Yes, without putting it on the VM: store it in an [LLM integration](/docs/integrations-llm) as `API Key` and keep the same base URLs; usage is then billed by the provider. To call a provider directly instead, delete its `api-key` line (and the `ANTHROPIC_API_BASE` or `openai-api-base` line) from `~/.aider.conf.yml` and follow aider's [API key docs](https://aider.chat/docs/config/api-keys.html).

### Why does aider need a model settings file?

Aider ships with settings for the models it knew when it was released. For newer models it falls back to defaults that some of them reject, such as `temperature is deprecated for this model`. `~/.aider.model.settings.yml` tells aider how to talk to each one. To add a model from exe.dev's [model list](/llm-gateway-models), copy an entry, change `name`, and start aider with `--model` and the new name.

### Can aider work on its own while I'm away?

Not really. Aider is a pair programmer: it edits the files you add to the chat, suggests shell commands, and asks before it runs them. It finishes the reply it's working on after you detach, then waits for you. For longer unattended work, try [Codex](/deploy/codex), [Claude Code](/deploy/claude-code) or [OpenCode](/deploy/opencode) on the same VM; they're preinstalled or one command away.

### How do I update aider?

On the VM, run `uv tool upgrade aider-chat`. It stays within 0.x releases; for a later major version, run the install command from "Start coding" with the new version. Your settings and chat history stay put.

### Something's not working. Where do I look?

Run `aider --verbose` from your project to see which settings files and models it loaded. An error naming a model usually means it's missing from `~/.aider.model.settings.yml`, or isn't in exe.dev's [model list](/llm-gateway-models). `curl https://llm.int.exe.xyz/v1/models` on the VM shows whether the LLM integration is attached. For the browser version, `journalctl -u aider-browser` has its log.

### How do I back up my work?

Aider commits every change, so push your repository somewhere, such as GitHub. For a copy of the whole VM, run `ssh exe.dev cp my-aider my-aider-backup` on your computer (choose a free backup name). To use that copy, connect with `ssh my-aider-backup.exe.xyz`; your files, settings and chat history are there. Reattach any [VM-specific integrations](/docs/integrations-attach).


## Related

- [Run Codex on a remote server](https://exe.dev/deploy/codex.md): A computer for Codex. An early night for your laptop.
- [Run OpenCode on a remote server](https://exe.dev/deploy/opencode.md): Every model, one VM, and an agent that works while your laptop sleeps.
- [Run Claude Code on a remote server](https://exe.dev/deploy/claude-code.md): A computer for Claude. A breather for your laptop.
- [VS Code in your browser, with code-server](https://exe.dev/deploy/code-server.md): Your editor in a tab. Your projects right where you left them.
- [Host OpenClaw](https://exe.dev/deploy/openclaw.md): An AI sidekick with its own computer. Your laptop can take a nap.
- [Run the Pi coding agent on a remote server](https://exe.dev/deploy/pi.md): An agent that doesn't ask first, on a computer that can take it.
