coder

module
v2.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: AGPL-3.0

README

Coder Logo Light Coder Logo Dark

Self-Hosted Cloud Development Environments and AI Agents

Coder Banner Light Coder Banner Dark

Quickstart | Docs | Why Coder | Premium

discord release godoc OpenSSF Best Practices OpenSSF Scorecard license

Coder is a self-hosted platform for cloud development environments and AI coding agents. Workspaces are defined with Terraform, connected through a secure Wireguard® tunnel, and automatically shut down when not used. Coder Agents runs a native AI coding agent whose loop executes in the control plane on your infrastructure, with no API keys in workspaces.

  • Define cloud development environments in Terraform
    • EC2 VMs, Kubernetes Pods, Docker Containers, etc.
  • Automatically shutdown idle resources to save on costs
  • Onboard developers in seconds instead of days
  • Delegate coding work to AI agents on your infrastructure
    • Bring any model (Anthropic, OpenAI, Google, Bedrock, self-hosted)
    • No LLM credentials in workspaces, user identity on every action
    • Centralized model governance, cost tracking, and audit logging

Coder platform showing templates and a running workspace

Quickstart

Check out our install guides for other methods and a complete tutorial.

Try Coder with the install script on Linux and macOS, or grab the latest binary or installer from GitHub Releases on Windows:

curl -L https://coder.com/install.sh | sh

Start the server and open http://localhost:3000 to create your initial user, create a Docker template, and provision your first workspace:

coder server

For a production deployment, add a PostgreSQL database (version 13 or later) and an external access URL, and see our validated architectures for sizing and infrastructure guidance:

coder server --postgres-url <url> --access-url <url>

Without these flags, Coder uses a built-in database and sets up a *.try.coder.app access URL for evaluation. Use coder --help for the full list of flags and environment variables.

Documentation

Browse the documentation or visit a specific section below:

  • Workspaces: Workspaces contain the IDEs, dependencies, and configuration information needed for software development
  • Templates: Templates are written in Terraform and describe the infrastructure for workspaces
  • Coder Agents: Delegate coding work to AI agents running on your self-hosted infrastructure
  • AI Gateway: Centralize authentication, auditing, and cost controls for AI tooling
  • Administration: Learn how to operate Coder
  • Premium: Learn about paid features built for large teams
  • IDEs: Connect your existing editor to a workspace

Support

Open an issue for bugs and feature requests.

For community support, showcasing what you built, and feedback on in-progress features, join our Discord or GitHub Discussions.

Dedicated support is included in Coder Premium. For more information, visit coder.com/pricing.

Integrations

New integrations are always in progress. Open an issue to request one. Contributions are welcome in any official or community repository.

Official

Community

Contributing

New contributors are always welcome. If you are new to the Coder codebase, see the contribution guide to get started.

Hiring

Apply on the careers page if you are interested in joining the team.

Directories

Path Synopsis
agentcontainers/acmock
Package acmock is a generated GoMock package.
Package acmock is a generated GoMock package.
agentcontainers/dcspec
Package dcspec contains an automatically generated Devcontainer specification.
Package dcspec contains an automatically generated Devcontainer specification.
agentcontainers/watcher
Package watcher provides file system watching capabilities for the agent.
Package watcher provides file system watching capabilities for the agent.
agentcontext
Package agentcontext consolidates the agent-side plumbing that resolves, watches, and pushes workspace context (instruction files, skills, and MCP configuration) to coderd.
Package agentcontext consolidates the agent-side plumbing that resolves, watches, and pushes workspace context (instruction files, skills, and MCP configuration) to coderd.
agentgit
Package agentgit provides a WebSocket-based service for watching git repository changes on the agent.
Package agentgit provides a WebSocket-based service for watching git repository changes on the agent.
boundarylogproxy
Package boundarylogproxy provides a Unix socket server that receives boundary audit logs and forwards them to coderd via the agent API.
Package boundarylogproxy provides a Unix socket server that receives boundary audit logs and forwards them to coderd via the agent API.
boundarylogproxy/codec
Package codec implements the wire format for agent <-> boundary communication.
Package codec implements the wire format for agent <-> boundary communication.
filefinder
Package filefinder provides an in-memory file index with trigram matching, fuzzy search, and filesystem watching.
Package filefinder provides an in-memory file index with trigram matching, fuzzy search, and filesystem watching.
reaper
Package reaper contains logic for reaping subprocesses.
Package reaper contains logic for reaping subprocesses.
intercept/bedrocksig
Package bedrocksig holds the shared AWS SigV4 signing and Bedrock Mantle routing helpers used by both the anthropic-go and openai-go interceptors.
Package bedrocksig holds the shared AWS SigV4 signing and Bedrock Mantle routing helpers used by both the anthropic-go and openai-go interceptors.
mcp
mcpmock
Package mcpmock is a generated GoMock package.
Package mcpmock is a generated GoMock package.
Package apiversion provides an API version type that can be used to validate compatibility between two API versions.
Package apiversion provides an API version type that can be used to validate compatibility between two API versions.
fs
resources
This package is used for embedding .syso resource files into the binary during build and does not contain any code.
This package is used for embedding .syso resource files into the binary during build and does not contain any code.
cli
clilog
Package clilog provides a fluent API for configuring structured logging.
Package clilog provides a fluent API for configuring structured logging.
sessionstore
Package sessionstore provides CLI session token storage mechanisms.
Package sessionstore provides CLI session token storage mechanisms.
cmd
cliui command
coder command
aibridge
Package aibridge provides utilities for the AI Bridge feature.
Package aibridge provides utilities for the AI Bridge feature.
aibridge/budget
Package budget resolves the effective AI spend budget for a user.
Package budget resolves the effective AI spend budget for a user.
aibridge/prices
Package prices seeds the ai_model_prices table from an embedded JSON price book at server startup.
Package prices seeds the ai_model_prices table from an embedded JSON price book at server startup.
aibridge/prices/pricebook
Package pricebook defines the serialized AI Gateway model price book.
Package pricebook defines the serialized AI Gateway model price book.
aibridged/aibridgedmock
Package aibridgedmock is a generated GoMock package.
Package aibridgedmock is a generated GoMock package.
aibridgedtest
Package aibridgedtest provides helpers for starting an in-process aibridged daemon in tests.
Package aibridgedtest provides helpers for starting an in-process aibridged daemon in tests.
aiseats
Package aiseats is the AGPL version the package.
Package aiseats is the AGPL version the package.
apidoc
Package apidoc Code generated by swaggo/swag.
Package apidoc Code generated by swaggo/swag.
authlink
Package authlink provides analysis and repair utilities for OIDC user link records stored in the user_links table.
Package authlink provides analysis and repair utilities for OIDC user link records stored in the user_links table.
autobuild
Package autobuild contains logic for scheduling workspace builds in the background.
Package autobuild contains logic for scheduling workspace builds in the background.
boundaryusage
Package boundaryusage tracks workspace boundary usage for telemetry reporting.
Package boundaryusage tracks workspace boundary usage for telemetry reporting.
cachecompress
Package cachecompress creates a compressed cache of static files based on an http.FS.
Package cachecompress creates a compressed cache of static files based on an http.FS.
coderdtest/promhelp
Package promhelp provides helper functions for asserting Prometheus metric values in unit tests.
Package promhelp provides helper functions for asserting Prometheus metric values in unit tests.
cryptokeys
Package cryptokeys provides an abstraction for fetching internally used cryptographic keys mainly for JWT signing and verification.
Package cryptokeys provides an abstraction for fetching internally used cryptographic keys mainly for JWT signing and verification.
database
Code generated by scripts/dbgen/main.go.
Code generated by scripts/dbgen/main.go.
database/db2sdk
Package db2sdk provides common conversion routines from database types to codersdk types
Package db2sdk provides common conversion routines from database types to codersdk types
database/dbauthz
Package dbauthz provides an authorization layer on top of the database.
Package dbauthz provides an authorization layer on top of the database.
database/dbmetrics
Code generated by scripts/dbgen.
Code generated by scripts/dbgen.
database/dbmock
Package dbmock is a generated GoMock package.
Package dbmock is a generated GoMock package.
database/gentest
Package gentest contains tests that are run at db generate time.
Package gentest contains tests that are run at db generate time.
database/pubsub/psmock
package psmock contains a mocked implementation of the pubsub.Pubsub interface for use in tests
package psmock contains a mocked implementation of the pubsub.Pubsub interface for use in tests
database/sdk2db
Package sdk2db provides common conversion routines from codersdk types to database types
Package sdk2db provides common conversion routines from codersdk types to database types
dynamicparameters/rendermock
Package rendermock is a generated GoMock package.
Package rendermock is a generated GoMock package.
httpapi/httpapiconstraints
Package httpapiconstraints contain types that can be used and implemented across the application to return specific HTTP status codes without pulling in large dependency trees.
Package httpapiconstraints contain types that can be used and implemented across the application to return specific HTTP status codes without pulling in large dependency trees.
httpapi/httperror
Package httperror handles formatting and writing some sentinel errors returned within coder to the API.
Package httperror handles formatting and writing some sentinel errors returned within coder to the API.
httpmw/loggermw/loggermock
Package loggermock is a generated GoMock package.
Package loggermock is a generated GoMock package.
mcp
notifications/notificationsmock
Package notificationsmock contains a mocked implementation of the notifications.Enqueuer interface for use in tests.
Package notificationsmock contains a mocked implementation of the notifications.Enqueuer interface for use in tests.
oauth2provider/oauth2providertest
Package oauth2providertest provides comprehensive testing utilities for OAuth2 identity provider functionality.
Package oauth2providertest provides comprehensive testing utilities for OAuth2 identity provider functionality.
promoauth
Package promoauth is for instrumenting oauth2 flows with prometheus metrics.
Package promoauth is for instrumenting oauth2 flows with prometheus metrics.
rbac
Code generated by typegen/main.go.
Code generated by typegen/main.go.
rbac/regosql
Package regosql converts rego queries into SQL WHERE clauses.
Package regosql converts rego queries into SQL WHERE clauses.
rbac/regosql/sqltypes
Package sqltypes contains the types used to convert rego queries into SQL.
Package sqltypes contains the types used to convert rego queries into SQL.
runtimeconfig
Package runtimeconfig contains logic for managing runtime configuration values stored in the database.
Package runtimeconfig contains logic for managing runtime configuration values stored in the database.
schedule/cron
package schedule provides utilities for managing template and workspace autostart and autostop schedules.
package schedule provides utilities for managing template and workspace autostart and autostop schedules.
updatecheck
Package updatecheck provides a mechanism for periodically checking for updates to Coder.
Package updatecheck provides a mechanism for periodically checking for updates to Coder.
usage/usagetypes
Package usagetypes contains the types for usage events.
Package usagetypes contains the types for usage events.
util/lazy
Package lazy provides a lazy value implementation.
Package lazy provides a lazy value implementation.
util/namesgenerator
Package namesgenerator generates random names.
Package namesgenerator generates random names.
util/ptr
Package ptr contains some utility methods related to pointers.
Package ptr contains some utility methods related to pointers.
util/shellparse
Package shellparse extracts command steps from shell scripts.
Package shellparse extracts command steps from shell scripts.
util/tz
Package tz includes utilities for cross-platform timezone/location detection.
Package tz includes utilities for cross-platform timezone/location detection.
util/xhttp
Package xhttp contains small helpers extending the standard net/http package for working with HTTP responses from external services.
Package xhttp contains small helpers extending the standard net/http package for working with HTTP responses from external services.
util/xnet
Package xnet classifies network transport errors.
Package xnet classifies network transport errors.
workspaceapps/appurl
Package appurl handles all parsing/validation/etc around application URLs.
Package appurl handles all parsing/validation/etc around application URLs.
wsbuilder
Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a new workspace build into the database.
Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a new workspace build into the database.
wsbuildorchestrator
Package wsbuildorchestrator runs the background worker that fulfills workspace build orchestrations once their parent build reaches a terminal state.
Package wsbuildorchestrator runs the background worker that fulfills workspace build orchestrations once their parent build reaches a terminal state.
x/agenthooks/dispatch
Package dispatch delivers chat lifecycle events to an external webhook.
Package dispatch delivers chat lifecycle events to an external webhook.
x/chatd
Package chatd implements the internal chat service used by Agents.
Package chatd implements the internal chat service used by Agents.
x/chatd/chathooks
Package chathooks integrates chat lifecycle hooks into chatd: it builds event envelopes, dispatches them, and converts consumer responses into transcript effects and permission decisions.
Package chathooks integrates chat lifecycle hooks into chatd: it builds event envelopes, dispatches them, and converts consumer responses into transcript effects and permission decisions.
x/chatd/chatretry
Package chatretry provides retry logic for transient LLM provider errors.
Package chatretry provides retry logic for transient LLM provider errors.
x/chatd/chatstate
Package chatstate owns the durable execution-state transitions for the chatd subsystem.
Package chatstate owns the durable execution-state transitions for the chatd subsystem.
x/chatd/messagepartbuffer
Package messagepartbuffer stores the transient message-part stream that a chat worker emits before those parts are committed to durable chat history.
Package messagepartbuffer stores the transient message-part stream that a chat worker emits before those parts are committed to durable chat history.
x/chatd/toolschema
Package toolschema rejects tool inputs whose object keys the Go decoder and a case-sensitive reader resolve differently.
Package toolschema rejects tool inputs whose object keys the Go decoder and a case-sensitive reader resolve differently.
x/googleopenai
Package googleopenai contains compatibility helpers for Google's OpenAI-compatible Gemini APIs.
Package googleopenai contains compatibility helpers for Google's OpenAI-compatible Gemini APIs.
x/nats/natsbench command
Command natsbench benchmarks Coder's NATS-backed pubsub (github.com/coder/coder/v2/coderd/x/nats) under high fan-out load.
Command natsbench benchmarks Coder's NATS-backed pubsub (github.com/coder/coder/v2/coderd/x/nats) under high fan-out load.
x/skills
Package skills defines the shared model for personal and workspace skills used by chatd.
Package skills defines the shared model for personal and workspace skills used by chatd.
Code generated by scripts/apikeyscopesgen.
Code generated by scripts/apikeyscopesgen.
workspacesdk/agentconnmock
Package agentconnmock is a generated GoMock package.
Package agentconnmock is a generated GoMock package.
x/agenthooks
Package agenthooks defines the experimental wire protocol for Coder agent lifecycle hooks.
Package agenthooks defines the experimental wire protocol for Coder agent lifecycle hooks.
enterprise
cli
cmd/coder command
coderd/httpmw
Package httpmw contains middleware for HTTP handlers.
Package httpmw contains middleware for HTTP handlers.
coderd/legacyscim
Package legacyscim preserves the old imulab/go-scim based SCIM handler.
Package legacyscim preserves the old imulab/go-scim based SCIM handler.
coderd/license
Package license provides the license parsing and validation logic for Coderd.
Package license provides the license parsing and validation logic for Coderd.
dbcrypt
Package dbcrypt provides a database.Store wrapper that encrypts/decrypts values stored at rest in the database.
Package dbcrypt provides a database.Store wrapper that encrypts/decrypts values stored at rest in the database.
pty
scaletest
Package gorules defines custom lint rules for ruleguard.
Package gorules defines custom lint rules for ruleguard.
agenthooks-server command
agenthooks-server is a reference consumer that logs verified lifecycle events as JSON.
agenthooks-server is a reference consumer that logs verified lifecycle events as JSON.
aibridgepricesdiff command
aibridgepricesdiff renders a human-readable Markdown summary of the difference between two AI Gateway price seed files (the prices.json produced by aibridgepricesgen).
aibridgepricesdiff renders a human-readable Markdown summary of the difference between two AI Gateway price seed files (the prices.json produced by aibridgepricesgen).
aibridgepricesgen command
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format:
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format:
apidocgen/swaginit command
Package main wraps swag init with Strict mode enabled.
Package main wraps swag init with Strict mode enabled.
apikeyscopesgen command
apitypings command
auditdocgen command
audittypegen command
check-scopes command
clidocgen command
configdocgen command
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues.
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues.
dbgen command
develop command
Command develop orchestrates the Coder development environment.
Command develop orchestrates the Coder development environment.
docgenenv
Package docgenenv normalizes the process environment so documentation generators produce host-independent output.
Package docgenenv normalizes the process environment so documentation generators produce host-independent output.
docshtmlcheck command
Command docshtmlcheck fails when Markdown files under docs/ contain invalid inline HTML that the documentation site's HTML renderer silently drops or mangles.
Command docshtmlcheck fails when Markdown files under docs/ contain invalid inline HTML that the documentation site's HTML renderer silently drops or mangles.
echoserver command
embedded-pg command
Start an embedded postgres database on port 5432.
Start an embedded postgres database on port 5432.
examplegen command
gensite command
gotestsummary command
intxcheck command
metricsdocgen command
metricsdocgen/scanner command
Package main provides a tool to scan Go source files and extract Prometheus metric definitions.
Package main provides a tool to scan Go source files and extract Prometheus metric definitions.
migrate-ci command
migrate-test command
modeloptionsgen command
oauth2 command
rbac-authz command
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision.
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision.
release command
releaser command
telemetry-server command
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout.
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout.
testidp command
typegen command
tailnettest
Package tailnettest is a generated GoMock package.
Package tailnettest is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL