Skip to content

ainvironment

Containerized cloud dev environment — successor to scripts/nanocode.sh (the old host-install script, kept in the repo as a porting reference).

The host stays thin: Docker, plus three opt-in extras — --disk when there is a second disk, --nvidia for the driver + toolkit, --tunnel to expose the routes through cloudflared. Everything else — node, gcloud/aws CLIs, code-server, opencode v2, openchamber, Obsidian, T3 Code — runs in containers started by docker compose.

Architecture

browser --> cloudflare edge --> cloudflared (compose service, network `dev`)
                                     |--> code-server:8080
                                     |--> opencode:4096   (v2 API + web UI)
                                     |--> openchamber:3000 --> opencode
                                     |--> ttyd:7681       (`terminal` profile)
                                     |--> obsidian:3001   (`obsidian` profile)
                                     |--> t3code:3773     (`t3code` profile)
                                     `--> ollama:11434    (`ollama` profile)

Nothing listens publicly: cloudflared is the only ingress and it only starts with --tunnel, which puts it on the compose tunnel profile. Without it the stack is localhost-only — the 127.0.0.1 ports, reached with ssh -L or curl. Which services exist at all is your choice — see Services.

Repo layout

.
├── setup.sh                      # master host bootstrap (has --dry-run)
├── Dockerfile                    # the one shared dev image
├── docker-compose.yml            # services, network, volumes, ports
├── .env.example                  # cp to .env — secrets + DOMAIN
├── .editorconfig                 # max_line_length = 90 (119 for html/js/css)
├── README.md
├── assets/                       # brand files (logo + accent variant)
├── site/                         # Astro landing (theme at site/src/theme)
├── docs/                         # these docs (mkdocs; built under /docs)
├── config/
│   └── cloudflared/
│       ├── config.template.yml    # source of truth: ${DOMAIN} ingress rows
│       └── config.yml             # generated (gitignored) by setup.sh
└── scripts/
    └── nanocode.sh               # old host script (verbatim reference)

Where to go next

Page What it covers
Getting Started first run, cookbook, local development
Services what can run, how to pick, tunnel authentication
Configuration the .env reference
Storage mounts, named volumes, DooD, the second disk
Updating rebuilding from inside the stack
Kubernetes the Helm deployment plan (design only)
Porting from nanocode.sh what moved where, and what was dropped
Contributing conventions and house rules