---
title: "Managing templates in Coder - Blog - Coder"
description: "Coder templates are the DNA used to create workspaces. They abstract the complexity of cloud environments, allowing developers to focus on their projects."
image: "/api/dynamic-og?title=Managing+templates+in+Coder&randomBackground=true&styles=%7B%22height%22%3A162%2C%22width%22%3A302%2C%22padding%22%3A16%2C%22titleSize%22%3A24%2C%22logo%22%3A%7B%22width%22%3A80%2C%22height%22%3A12.15%7D%7D"
canonical: "https://coder.com/blog/managing-templates-in-coder"
---

Mar 15 20233 min read

# Managing templates in Coder

[M Atif Ali](https://coder.com/blog/author/matifali)

Share this article

Coder templates are the DNA used to create workspaces. They abstract the complexity of cloud environments, allowing developers to focus on their projects.

![Managing templates in Coder](https://www.datocms-assets.com/19109/1677621117-templates.png?fit=clip&fm=webp&w=3840&q=90)

## Organizing your templates

There are many ways to organize your templates. You can use them to:

- **Team based templates**: A template for each of your teams e.g. a template for your _frontend_ team and a template for your _backend_ team.
- **Project based templates**: A template for each of your projects e.g. a template for your _cool-project_ and a template for your _awesome-project_.
- **Image based templates**: A single template that is used for all your projects but with a different image for each project.

![](https://www.datocms-assets.com/19109/1679054855-templates-cases.png?fit=clip&fm=webp&w=3840&q=90)

## What is the difference between a template and an image?

A template is a collection of settings that are used to create a workspace. An image is a collection of software that is used to create a workspace. A template can use one or more images. For example, you can have a template that uses the _ubuntu_ image and the _node_ image and the user will have the choice of which image to use when creating a workspace. Choices are managed by a terraform variable e.g.

```

```

## Creating your first template

![](https://www.datocms-assets.com/19109/1677621299-workspace-creation-1.png?fit=clip&fm=webp&w=3840&q=90)

![](https://www.datocms-assets.com/19109/1677621305-workspace-creation-2.png?fit=clip&fm=webp&w=3840&q=90)

1. Create a new repository in your GitHub account. This will be the repository that contains your Coder templates.
2. Create a new directory in your repository called `deeplearning`.
3. Create a new file in the `deeplearning` directory called `main.tf`. This is the terraform file that will be used to create your template.

```

```

1. Create a rich-parameter variable of the form `data coder_parameter <name>`. This will be used to create a rich parameter in the template. For example:

> See full list of available parameters [here](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter)

```

```

1. For this example, we will use the pre-built [DockerDL](https://github.com/matifali/dockerdl) images.

> **Note**: You can use any image you want. You can use a pre-built image or coder can build an image for you from the Dockerfile in _images_ directory. See

```

```

> Full example is available [here](https://github.com/matifali/coder-templates/blob/main/deeplearning/main.tf)
>
>
>
> ## Next steps

Have questions? [Contact us](https://coder.com/contact) or [join us on Discord](https://discord.gg/coder)

Stay tuned for the next post: How to keep your templates up to date.

### Subscribe to our newsletter

Want to stay up to date on all things Coder? Subscribe to our monthly newsletter for the latest articles, workshops, events, and announcements.
