Run the Memdoor gateway on a remote server
Memdoor's ssh gateway on a box that's always on, with open models included.
Shelley handles the setup. About 5 minutes.
Prefer a terminal?
curl -fsSL https://exe.dev/deploy/memdoor/prompt.txt | ssh exe.dev new --prompt=/dev/stdinMemdoor is the open-source coding agent behind the
"small models beat a frontier model" result on Hacker News: a terminal
window, a run command for scripts and CI, and a gateway that holds your
sessions. Its gateway mode is made for a box you reach over ssh:
memdoor --gateway ssh://you@box tunnels to the gateway there, and every
turn runs on the box, next to the code.
An exe.dev VM is that box. SSH is how you already reach it, it's on when your laptop sleeps, and its disk keeps the sessions, the project and the login. exe.dev's LLM integration serves open-weight models such as GLM 5.3 Flash and Kimi K3, so no API key goes on the VM. Memdoor is weeks old and ships several releases a day; this page was tested with v1.785.0.
What you get#
- Memdoor's gateway running as a systemd user service on port 8000, back after a reboot
- GLM 5.3 Flash through exe.dev's LLM integration, with no API key on the VM
- A Git repository at
~/projectand Memdoor's first account, ready for the ssh door
What's running, and where
memdoor --gateway ssh://exedev@my-memdoor.exe.xyz?port=8000
the Memdoor window and memdoor run on your computer, tunneled over ssh
https://my-memdoor.exe.xyz:8000/r/…
a /remote link, for watching and typing from your phone
memdoor gateway, run by a systemd user service
Deploy with Shelley#
Click Deploy and Shelley will set up Memdoor on a new VM, then check that it works. No config-file wrangling required.
Prefer a terminal?
curl -fsSL \
https://exe.dev/deploy/memdoor/prompt.txt \
| ssh exe.dev new --prompt=/dev/stdinWhat Shelley is told
Set up Memdoor on this VM by following the exe.dev recipe at https://exe.dev/deploy/memdoor.md from top to bottom.
The recipe's example VM name is my-memdoor. This VM's name is the output of `hostname`: use it wherever the recipe writes my-memdoor. Skip the step that creates the VM; you are on it.
You are done when all of these are true. Check each one yourself:
- Memdoor's gateway running as a systemd user service on port 8000, back after a reboot
- GLM 5.3 Flash through exe.dev's LLM integration, with no API key on the VM
- A Git repository at `~/project` and Memdoor's first account, ready for the ssh door
Run the VM-side commands in "Set up the VM" only; skip creating the VM.
Run the last command with `</dev/null` as written: `memdoor run` reads
piped input as the task. Don't run `memdoor connect`, `memdoor remote` or
`/remote`, and don't add keys to `~/.memdoor/env`. Verify that
`memdoor --gateway http://localhost:8000 gateway status` says the gateway
is answering and the service is active, and that the test run replied OK.
Skip the later sections and the FAQ. Finish by telling the owner to follow
"Connect from your computer" with this VM's name.
Finish with the URLs I should open.
Also at /deploy/memdoor/prompt.txt. The recipe it follows is /deploy/memdoor.md.
Set up the VM#
On your computer, create a VM and connect. If you've already clicked Deploy or have a VM, skip the first command and use its name:
ssh exe.dev new --name=my-memdoor
ssh my-memdoor.exe.xyz
On the VM, install Memdoor, point it at exe.dev's LLM integration, and run the gateway as a service on port 8000:
curl -fsSL https://memdoor.ai/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
mkdir -p ~/.memdoor
cat > ~/.memdoor/env <<'EOF'
AI_GATEWAY_BASE_URL=https://llm.int.exe.xyz/v1
AI_GATEWAY_API=chat
AI_GATEWAY_TOKEN=exe-llm-integration
MEMDOOR_MODEL=accounts/fireworks/models/glm-5p3-flash
EOF
chmod 600 ~/.memdoor/env
memdoor gateway install --port 8000
git init ~/project
cd ~/project
MEMDOOR_GATEWAY=http://localhost:8000 memdoor run "Reply with exactly: OK" </dev/null
The installer puts memdoor in ~/.local/bin. memdoor gateway install
writes a systemd user service, memdoor, that reads ~/.memdoor/env and
starts again after a crash or reboot. The four lines in that file use
Memdoor's company-gateway mode: every model call goes to exe.dev's
integration, which adds the credentials itself, so the token is a
placeholder. Memdoor then contacts nothing else: no OpenRouter, no
memdoor.ai. AI_GATEWAY_API=chat matters: with Memdoor's default Responses
API, follow-up turns stalled in our tests.
The test run creates Memdoor's first account on the gateway and saves its
login in ~/.memdoor/local-login, which the ssh door reads from your
computer. It should print OK. Check the gateway:
memdoor --gateway http://localhost:8000 gateway status
It says answering at http://localhost:8000 and service active.
Connect from your computer#
On your computer, install Memdoor (on Windows, irm https://memdoor.ai/install.ps1 | iex instead of the first line), ssh to the
VM once to accept its host key, and save the gateway address:
curl -fsSL https://memdoor.ai/install.sh | bash
ssh exedev@my-memdoor.exe.xyz true
export MEMDOOR_GATEWAY='ssh://exedev@my-memdoor.exe.xyz?port=8000'
Put the export line in your shell's rc file to keep it. Memdoor runs
your own ssh with BatchMode, so it can't answer a host-key question
itself.
Give it a task with memdoor run. --dir names the directory on the VM:
memdoor run --dir /home/exedev/project "write a hello-world Go program with a test, and run the test"
The first command signs your computer in with the VM's login and stores it
in ~/.memdoor on your computer. Then open the window:
memdoor --dir /home/exedev/project
The footer says live my-memdoor.exe.xyz:~/project. Files are read,
commands run and tests pass on the VM. Close the window or your laptop and
the gateway keeps the session; memdoor resume --last picks it up again.
On a computer that has never signed in, open the window only after one
memdoor run: in our tests the window alone answered Authentication required.
If you skip "Set up the VM", memdoor --gateway ssh://… installs Memdoor
and the service on the VM by itself. But it then creates the first account
from your computer and leaves the model up to you, so write the env file on
the VM anyway to use exe.dev's models.
Watch from your phone#
In the window, type /remote. Memdoor prints a link and a QR code like
http://my-memdoor.exe.xyz:8000/r/…#k=…. Change http to https and open
it on a phone that's signed in to exe.dev: the conversation opens in a
Memdoor terminal, with keys for Esc, Tab and the arrows, through the exe.dev
HTTPS proxy. The gateway on the VM runs that terminal and is its own relay,
so no Memdoor plan is needed and the link keeps working after you close the
window on your computer. /remote off revokes it.
The proxy keeps port 8000 private to you. To let a teammate watch, share the VM with them and send the watch-only link Memdoor prints alongside.
Pick a model#
MEMDOOR_MODEL in ~/.memdoor/env is the model every turn uses. To
switch, on the VM:
sed -i 's|^MEMDOOR_MODEL=.*|MEMDOOR_MODEL=accounts/fireworks/models/kimi-k3|' ~/.memdoor/env
systemctl --user restart memdoor
Other open-weight models on exe.dev include
accounts/fireworks/models/glm-5p3, accounts/fireworks/models/minimax-m3
and accounts/fireworks/models/deepseek-v4p1-flash. /model in the window
can't list them: Memdoor reads its model list from OpenRouter.
Update, back up and troubleshoot
Update. The window says when a release is out. On the VM:
memdoor upgrade --yes
It swaps the binary and restarts the service. Ignore a warning that
nothing answers on :18789; memdoor --gateway http://localhost:8000 gateway status shows the new version on 8000. Update your computer's copy the same
way.
Back up. Sessions, accounts and logins live in ~/.memdoor on the VM;
your code in ~/project. Copy both, or push the project to a Git remote.
Troubleshoot.
Authentication requiredon your computer: run onememdoor runcommand first (see above), then open the window.- A turn hangs on
stream idle past deadline: check thatAI_GATEWAY_API=chatis in~/.memdoor/envand the base URL ends in/v1, thensystemctl --user restart memdoor. - The ssh door can't connect: run
ssh exedev@my-memdoor.exe.xyz trueon its own and fix what it says. - The gateway is down:
systemctl --user status memdoorandjournalctl --user -u memdooron the VM.
Frequently asked questions#
Why port 8000 instead of Memdoor's default, 18789?
The ssh door would work on any port, but the exe.dev HTTPS proxy only forwards ports 3000 to 9999. On 8000, a /remote link opens on your phone through the proxy, behind your exe.dev login. The cost is adding ?port=8000 to the gateway address on your computer.
Does Memdoor's "team of small models" work on exe.dev's models?
Memdoor's coder runs on whatever model MEMDOOR_MODEL names, and exe.dev serves open-weight models such as GLM 5.3, Kimi K3, MiniMax M3 and DeepSeek V4.1 Flash. The Qwen3.8-27B that Memdoor's benchmark uses isn't among them; run it yourself with memdoor connect local on a machine with a GPU. Memdoor's decision model (Jev) needs a TypeSafe or OpenRouter key, so it's off on this page: Memdoor says so under the prompt box. Turns work without it; they just read more.
Can I use my own keys instead?
Yes. Remove the four AI_GATEWAY_* and MEMDOOR_MODEL lines from ~/.memdoor/env, restart the service, then connect a provider through the ssh door, for example memdoor connect openrouter. The key is kept on the VM in ~/.memdoor/providers.json, readable only by you, and every turn on the gateway uses it. Memdoor's company-gateway setting wins over connected keys, which is why the lines have to go.
Who can reach the gateway?
The VM opens no ports to the internet. The ssh door needs your ssh key, and a /remote link needs your exe.dev login (or a share you set up), plus the key in the link itself: Memdoor encrypts the terminal end to end with it. /remote off revokes a link.
Updated Nov 2, 2026 · tested end to end Nov 2, 2026 · Markdown · manifest.json · Something wrong? Tell us