# Coding agents on Synology

> OpenClaw, Claude Code, Codex and 14 more agents on a Synology NAS, in one Container Manager project built from EnvHaven's open-source workspace image, with VS Code in the browser and a terminal session that keeps running. Setup, where the data lives, updates and HTTPS.

_Updated November 23, 2026_

OpenClaw and the other assistant gateways want a machine that never sleeps, and coding agents want one that keeps working while your laptop is closed. A Synology NAS that stays on can be that machine. EnvHaven's workspace image puts 17 agents in one container, with VS Code in the browser and a terminal session that keeps running after you close the tab. The image is `ghcr.io/envhaven/envhaven:latest`, MIT-licensed and built on LinuxServer.io's code-server image; the source is at [github.com/envhaven/envhaven](https://github.com/envhaven/envhaven).

Besides OpenClaw, the agents are Claude Code, Codex, OpenCode, Antigravity CLI, Grok Build, Kimi Code CLI, Muse Code, Hermes Agent, Pi, Goose, Qwen Code, Mistral Vibe, Factory Droid, Kiro, Amp and fx. Every one signs in with your own account or API key, and the image sends EnvHaven nothing.

**It needs an Intel or AMD processor.** The image is published for x86-64 only. Container Manager also runs on some ARM models, which cannot run it; Synology's [CPU table](https://kb.synology.com/en-global/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have) lists each model's architecture.

## Create the project

A project is a Compose file that Container Manager runs and manages. It pulls the image straight from GitHub's registry, and its settings stay editable later under **YAML Configurations**. That matters here because, since Container Manager 24.0.2, a container made in the Container wizard keeps its ports, volumes and environment exactly as they were created.

1. Install **Container Manager** from **Package Center** if it is not there yet.
2. In File Station, create a folder named `envhaven` in the `docker` shared folder, or in another shared folder you prefer, and a folder named `config` inside it.
3. In Container Manager, open **Project** and click **Create**. Enter `envhaven` as the **Project Name**, choose that folder as the **Path**, and for **Source**, create a docker-compose.yml in the editor with the file below.

```yaml
services:
  envhaven:
    image: ghcr.io/envhaven/envhaven:latest
    container_name: envhaven
    restart: unless-stopped
    ports:
      - "8443:8443"
      - "2222:22"
    environment:
      - PASSWORD=choose-a-long-password
      - SUDO_PASSWORD=choose-another-password
      - PUBLIC_KEY_URL=https://github.com/<you>.keys
    volumes:
      - ./config:/config
```

Change both passwords, then finish the wizard: skip the Web Station portal, confirm the summary and click **Done**, letting it start the project.

`PASSWORD` signs you in to VS Code, which port 8443 serves over plain HTTP; without it, the editor listens only inside the container. `SUDO_PASSWORD` is for `sudo` in the terminal. SSH, on port 2222, accepts keys only, so `PUBLIC_KEY_URL` imports yours from GitHub, or `PUBLIC_KEY` takes a single key. If 8443 or 2222 is already taken on the NAS, change the number before the colon.

Files the container writes belong to user and group 1000 by default; to make them yours, add `PUID` and `PGID` under `environment` with your DSM account's IDs, which `id` prints in an SSH session on the NAS.

The image also includes the Docker CLI. It does nothing until you add `/var/run/docker.sock:/var/run/docker.sock` to `volumes`, and that line gives the container control of every container on the NAS. Leave it out unless that is what you want.

## Where your work lives

`/config` is the container's home and the one folder that persists: projects, dotfiles, every agent's sign-in and its settings. The `./config` line puts it in a `config` folder beside the compose file, an ordinary folder you can back up like any other. Everything outside `/config` resets when the image updates. Keep it on a folder like this one: a project's **Clean** action removes the containers, networks, volumes and images the project created, and your shared folder is none of those.

## First run

Open `http://<nas-ip>:8443` and enter your `PASSWORD`, then open a terminal. It attaches to a session that keeps running when you close the tab. Set up OpenClaw from there:

```bash
openclaw onboard
```

Onboarding asks for a model provider and the chat apps OpenClaw should answer on, and it reuses a Claude Code or Codex login it finds. The coding agents start by name, `claude`, `codex`, `opencode` and the rest, and sign in on first run. With your key in `PUBLIC_KEY_URL`, `ssh -p 2222 abc@<nas-ip>` reaches the same session, and `haven connect . abc@<nas-ip>:2222` syncs a local folder with the container through the [Haven CLI](https://envhaven.com/glossary/haven-cli).

A gateway you leave running in the terminal keeps going while the container runs. A restart or an update stops it along with everything else you started there, so start it again after one.

## Updating

Container Manager watches images tagged `latest` and shows **Update available** when a new one is published. To apply it:

1. On the **Image** page, select the image and choose **Action > Update**.
2. On the **Project** page, select `envhaven` and run **Stop**, **Build** and **Start** from **Action**, so the container is created again from the new image.

The `config` folder stays as it is.

## What running it yourself leaves to you

- **HTTPS.** Opened by IP address over plain HTTP, VS Code runs in what browsers call an insecure context, and [code-server warns](https://github.com/coder/code-server/blob/main/docs/FAQ.md#why-do-web-views-not-work) that web views, the clipboard and other features may not work there. DSM can serve it over HTTPS. Under **Control Panel > Login Portal > Advanced**, create a **Reverse Proxy** rule from an HTTPS hostname to `localhost` on port 8443, and add the **WebSocket** header under **Custom Header**, since the editor depends on WebSockets. The certificate comes from **Control Panel > Security > Certificate**. For a single computer, an SSH tunnel also works: `ssh -N -L 8443:localhost:8443 -p 2222 abc@<nas-ip>`, then `http://localhost:8443`.
- **Reaching it from outside your home network.** Synology's **VPN Server** package lets your own devices in, and so does Tailscale, which has a [Synology guide](https://tailscale.com/kb/1131/synology). Forwarding 8443 on your router would put a terminal on the internet behind one password.
- **A public address for apps.** An app an agent builds is reachable on your network through a port you add to `ports`. Putting it on the internet with HTTPS takes a domain pointed at your home connection, an open port on your router and a reverse proxy rule like the one above.
- **Uptime.** Agents work while the NAS is on. A reboot or a power cut stops them; `restart: unless-stopped` brings the container back, and you start the agents again.
- **Updates.** DSM, Container Manager and the image are yours to keep current.

## If you would rather not run the NAS

Running the image on your own NAS costs nothing extra. If you would rather not look after a server at all, managed EnvHaven puts each workspace on an always-on Linux server of its own, in one of 11 regions, opened from any browser. You sign agents in once from the Launch menu. Each workspace has a public HTTPS preview URL for the app it runs, custom domains can point at it, and the Plus and Pro plans include Docker. Prices start at $15 a month, billed annually.

## Keep reading

- [Self-hosted dev environment](https://envhaven.com/guides/self-hosted-dev-environment)
- [OpenClaw in Docker](https://envhaven.com/agents/openclaw/docker)
- [Coding agents on Proxmox](https://envhaven.com/guides/coding-agents-on-proxmox)
- [Reverse proxy](https://envhaven.com/glossary/reverse-proxy)

Source: https://envhaven.com/guides/coding-agents-on-synology
