Coder powers secure, scalable development across key industries — automotive, finance, government, and technology — enabling faster builds, tighter compliance, and seamless AI adoption in enterprise-grade cloud environments.
<your-artifactory-host> with your Artifactory hostname (e.g.,
artifactory.example.com or mycompany.jfrog.io)
<your-artifactory-token> with your Artifactory access token with read permissions to the coder-registry repository
Note
The host block with services is required because Artifactory's global
service discovery endpoint doesn't include the repository name in the modules
path. This explicitly tells Terraform where to find modules in your specific
repository.
Step 4: Update Template Module Sources
Update your Coder templates to use Artifactory instead of the public registry:
# Before: Direct from Coder registry
module "code-server" {
source = "registry.coder.com/coder/code-server/coder"
version = "1.4.2"
agent_id = coder_agent.main.id
}
# After: Through Artifactory mirror
module "code-server" {
source = "https://<your-artifactory-host>/coder/code-server/coder"
version = "1.4.2"
agent_id = coder_agent.main.id
}
Step 5: Configure the control plane or provisioners
For Coder to use the Artifactory mirror, configure the Terraform CLI on your
control plane or external provisioners.
The template builder resolves module
sources against registry.coder.com by default. To make it generate module
source paths that point at your Artifactory mirror instead, set the
CODER_TEMPLATE_BUILDER_REGISTRY_URL environment variable on your control plane:
The value is a bare host, optionally with a port (for example,
artifactory.example.com or mycompany.jfrog.io:8443). A leading http(s)://
scheme and trailing slash are stripped, and a path, query, fragment, or
credentials is rejected at server start.
Without this variable, the template builder still requires outbound access to
registry.coder.com. For fully air-gapped deployments that cannot set a mirror,
disable the builder instead with CODER_DISABLE_TEMPLATE_BUILDER=true. See
Air-gapped Deployments for details.
Caching Behavior
Artifactory uses lazy caching, meaning modules are cached on first request.
For fully air-gapped deployments, pre-warm the cache while connected to the
internet:
Create a test template that references all modules you need
Run terraform init to trigger downloads
Verify modules appear in Artifactory under coder-registry-cache
Once cached, modules remain available even without internet connectivity.
Supported Namespaces
The Artifactory mirror supports all namespaces from the Coder registry:
Verify your .terraformrc includes both the host block with services and
the credentials block. The host.services configuration is required for
Artifactory.
401 Unauthorized errors
Check that your Artifactory token is valid and has read access to the
coder-registry repository.
Modules not caching
Ensure the remote repository URL is set to https://registry.coder.com and not other paths.