---
title: InfluxDB templates
description: InfluxDB templates are prepackaged InfluxDB configurations that contain everything from dashboards and Telegraf configurations to notifications and alerts.
url: https://docs.influxdata.com/influxdb/v2/tools/influxdb-templates/
estimated_tokens: 2164
product: InfluxDB OSS v2
version: v2
---

# InfluxDB templates

This page documents an earlier version of InfluxDB OSS. [InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a copy of the database file doesn’t expose usable tokens. Existing tokens are hashed on first startup and the original strings can’t be recovered afterward — **capture any plaintext tokens you still need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

InfluxDB templates are prepackaged InfluxDB configurations that contain everything from dashboards and Telegraf configurations to notifications and alerts. Use templates to monitor your technology stack, set up a fresh instance of InfluxDB, back up your dashboard configuration, or [share your configuration](https://github.com/influxdata/community-templates/) with the InfluxData community.

**InfluxDB templates do the following:**

-   Reduce setup time by giving you resources that are already configured for your use-case.
-   Facilitate secure, portable, and source-controlled InfluxDB resource states.
-   Simplify sharing and using pre-built InfluxDB solutions.

[View InfluxDB community templates](https://github.com/influxdata/community-templates/)

## Template manifests

A template **manifest** is a file that defines InfluxDB [resources](#template-resources). Template manifests support the following formats:

-   [YAML](https://yaml.org/)
-   [JSON](https://www.json.org/)
-   [Jsonnet](https://jsonnet.org/)

Template manifests are compatible with [Kubernetes Custom Resource Definitions (CRD)](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/).

The `metadata.name` field in manifests uniquely identifies each resource in the template. `metadata.name` values must be [DNS-1123](https://tools.ietf.org/html/rfc1123) compliant. The `spec` object contains the resource configuration.

#### Example

```yaml
# bucket-template.yml
# Template manifest that defines two buckets.
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
    name: thirsty-shaw-91b005
spec:
    description: My IoT Center Bucket
    name: iot-center
    retentionRules:
      - everySeconds: 86400
        type: expire
---
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
    name: upbeat-fermat-91b001
spec:
    name: air_sensor
---
```

*See [Create an InfluxDB template](/influxdb/v2/tools/influxdb-templates/create/) for information about generating template manifests.*

### Template resources

Templates may contain the following InfluxDB resources:

-   [buckets](/influxdb/v2/admin/buckets/create-bucket/)
-   [checks](/influxdb/v2/monitor-alert/checks/create/)
-   [dashboards](/influxdb/v2/visualize-data/dashboards/create-dashboard/)
-   [dashboard variables](/influxdb/v2/visualize-data/variables/create-variable/)
-   [labels](/influxdb/v2/visualize-data/labels/)
-   [notification endpoints](/influxdb/v2/monitor-alert/notification-endpoints/create/)
-   [notification rules](/influxdb/v2/monitor-alert/notification-rules/create/)
-   [tasks](/influxdb/v2/process-data/manage-tasks/create-task/)
-   [Telegraf configurations](/influxdb/v2/write-data/no-code/use-telegraf/)

## Stacks

Use **InfluxDB stacks** to manage InfluxDB templates. When you apply a template, InfluxDB associates resources in the template with a stack. Use stacks to add, update, or remove InfluxDB templates over time.

For more information, see [InfluxDB stacks](#influxdb-stacks) below.

### [Use InfluxDB templates](/influxdb/v2/tools/influxdb-templates/use/)

Use the `influx` command line interface (CLI) to summarize, validate, and apply templates from your local filesystem and from URLs.

### [Create an InfluxDB template](/influxdb/v2/tools/influxdb-templates/create/)

Use the InfluxDB UI and the `influx export` command to create InfluxDB templates.

### [InfluxDB stacks](/influxdb/v2/tools/influxdb-templates/stacks/)

Use an InfluxDB stack to manage your InfluxDB templates—add, update, or remove templates over time.

[templates](/influxdb/v2/tags/templates/)
