Files
coder/docs/start/first-template.md
T
Nick Vigilante ca337915cc docs: fix broken and naked relative links (#25825)
Several relative links in the docs pointed at pages that no longer exist
or rendered incorrectly on coder.com.

Fixes:

- `start/first-template.md`: IDE links repointed from the removed
`../ides.md` / `../ides/web-ides.md` to their current homes under
`user-guides/workspace-access/`.
- `tutorials/example-guide.md`: contributing link repointed to
`../about/contributing/documentation.md`.
- `about/contributing/backend.md`: the `migrations/testdata/fixtures`
and `full_dumps` references (and the `000024_example.up.sql` example)
used relative paths that escape `docs/` and render as bogus
`/docs/coderd/...` routes on the site. Normalized to the canonical
`github.com/coder/coder/(blob|tree)/main/...` form already used by ~120
other source links in the docs.
- Normalized extensionless directory links (`ai-coder/ai-gateway`,
`user-guides/workspace-access`, `install`) to their `/index.md` targets
for consistency with the rest of the docs.

This class of bug is invisible to the local doc checks (`make
lint/markdown` / `pnpm check-docs` only run markdownlint + table
formatting); only CI's Linkspector job validates link targets. Found via
a relative-link audit while investigating the docs preview on #25816.

Source-link version-awareness (so older docs versions don't all point at
`main`) is tracked separately in DOCS-268 and will be handled in the
coder.com render layer.


Linear: DOCS-278

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 08:47:29 -04:00

4.3 KiB

Your first template

A common way to create a template is to begin with a starter template then modify it for your needs. Coder makes this easy with starter templates for popular development targets like Docker, Kubernetes, Azure, and so on. Once your template is up and running, you can edit it in the Coder dashboard. Coder even handles versioning for you so you can publish official updates or revert to previous versions.

In this tutorial, you'll create your first template from the Docker starter template.

Before you start

Use the previous section of this guide to set up Docker and Coder on your local machine to continue.

1. Log in to Coder

In your web browser, go to your Coder dashboard using the URL provided during setup to log in.

2. Choose a starter template

Select Templates to see the Starter Templates. Use the Docker Containers template by pressing Use Template.

Starter Templates UI

You can also a find a comprehensive list of starter templates in Templates -> Create Template -> Starter Templates. s

3. Create your template

In Create template, fill in Name and Display name, then select Create template.

Creating a template

TODO:

  • add CLI guide for making a new template
  • refactor text below to be more beginner-friendly

6. Modify your template

Now you can modify your template to suit your team's needs.

Let's replace the golang package in the Docker image with the python3 package. You can do this by editing the template's Dockerfile directly in your web browser.

In the Coder dashboard, select Templates then your first template.

Selecting the first template

In the drop-down menu, select Edit files.

Edit template files

Expand the build directory and select Dockerfile.

Selecting source code

Edit build/Dockerfile to replace golang with python3.

Editing source code

Select Build template and wait for Coder to prepare the template for workspaces.

Building a template

Select Publish version. In the Publish new version dialog, make sure Promote to active version is checked then select Publish.

Publish a template

Now when developers create a new workspace from this template, they can use Python 3 instead of Go.

For developers with workspaces that were created with a previous version of your template, Coder will notify them that there's a new version of the template.

You can also handle change management through your own repo and continuous integration.

Next steps