Nomploy Nomad Packs

← All packs

opencode v0.1.0

AI

OpenCode — an open-source AI coding agent, run in headless server mode: it exposes an HTTP API that the OpenCode TUI, editor extensions, and other clients connect to. Deployed as a single host-networked Nomad service with config and data volumes; bring an LLM provider key.

nomad-pack run opencode --registry nomploy
1 task http 4096 2 volumes image ghcr.io/anomalyco/opencode:latest
Variables 11
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run opencode -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "opencode"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The OpenCode container image. Pin a tag in production.
image = "ghcr.io/anomalyco/opencode:latest"

# Host port for the OpenCode headless HTTP server.
port = 4096

# Anthropic API key (ANTHROPIC_API_KEY). Set this or another provider key.
anthropic_api_key = ""

# OpenAI API key (OPENAI_API_KEY). Optional.
openai_api_key = ""

# Named volume for OpenCode config (/root/.config/opencode).
config_volume = "opencode_config"

# Named volume for OpenCode auth, sessions, and state (/root/.local/share/opencode).
data_volume = "opencode_data"

# Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"opencode"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"ghcr.io/anomalyco/opencode:latest"
The OpenCode container image. Pin a tag in production.
port number
4096
Host port for the OpenCode headless HTTP server.
anthropic_api_key key string
""
Anthropic API key (ANTHROPIC_API_KEY). Set this or another provider key.
openai_api_key key string
""
OpenAI API key (OPENAI_API_KEY). Optional.
config_volume string
"opencode_config"
Named volume for OpenCode config (/root/.config/opencode).
data_volume string
"opencode_data"
Named volume for OpenCode auth, sessions, and state (/root/.local/share/opencode).
constraints list
[]
Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 512
  }
The task resources.
Readme

opencode

OpenCode — an open-source AI coding agent, here run in headless server mode (opencode serve). It exposes an HTTP API that the OpenCode TUI, editor extensions, and other clients connect to.

Single host-networked Nomad service with config and data volumes. Bring an LLM provider key.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run opencode --registry=nomploy

Configure

Variable Default Description
port 4096 Headless server port.
anthropic_api_key "" ANTHROPIC_API_KEY.
openai_api_key "" OPENAI_API_KEY.
config_volume opencode_config /root/.config/opencode.
data_volume opencode_data /root/.local/share/opencode — auth, sessions, state.
image ghcr.io/anomalyco/opencode:latest Image. Pin a tag in production.
resources { cpu = 500, memory = 512 } Task resources.

Set a provider key, or configure OpenCode to use a local OpenAI-compatible endpoint (the litellm / ollama packs). Connect the OpenCode TUI/extension to http://<node-ip>:4096. No built-in auth — keep it internal or behind TLS+auth. Pin the job to the node holding the volumes with constraints.