1---
2layout: "language"
3page_title: "Backend Overview - Configuration Language"
4---
5
6# Backends
7
8Each Terraform configuration can specify a backend, which defines where
9and how operations are performed, where [state](/docs/language/state/index.html)
10snapshots are stored, etc.
11
12The rest of this page introduces the concept of backends; the other pages in
13this section document how to configure and use backends.
14
15- [Backend Configuration](/docs/language/settings/backends/configuration.html) documents the form
16  of a `backend` block, which selects and configures a backend for a
17  Terraform configuration.
18- This section also includes a page for each of Terraform's built-in backends,
19  documenting its behavior and available settings. See the navigation sidebar
20  for a complete list.
21
22## Recommended Backends
23
24- If you are still learning how to use Terraform, we recommend using the default
25  `local` backend, which requires no configuration.
26- If you and your team are using Terraform to manage meaningful infrastructure,
27  we recommend using the `remote` backend with [Terraform Cloud](/docs/cloud/index.html)
28  or [Terraform Enterprise](/docs/enterprise/index.html).
29
30## Where Backends are Used
31
32Backend configuration is only used by [Terraform CLI](/docs/cli/index.html).
33Terraform Cloud and Terraform Enterprise always use their own state storage when
34performing Terraform runs, so they ignore any backend block in the
35configuration.
36
37But since it's common to
38[use Terraform CLI alongside Terraform Cloud](/docs/cloud/run/cli.html)
39(and since certain state operations, like [tainting](/docs/cli/commands/taint.html),
40can only be performed on the CLI), we recommend that Terraform Cloud users
41include a backend block in their configurations and configure the `remote`
42backend to use the relevant Terraform Cloud workspace(s).
43
44## Where Backends Come From
45
46Terraform includes a built-in selection of backends; this selection has changed
47over time, but does not change very often.
48
49The built-in backends are the only backends. You cannot load additional backends
50as plugins.
51
52## What Backends Do
53
54There are two areas of Terraform's behavior that are determined by the backend:
55
56- Where state is stored.
57- Where operations are performed.
58
59### State
60
61Terraform uses persistent [state](/docs/language/state/index.html) data to keep track of
62the resources it manages. Since it needs the state in order to know which
63real-world infrastructure objects correspond to the resources in a
64configuration, everyone working with a given collection of infrastructure
65resources must be able to access the same state data.
66
67The `local` backend stores state as a local file on disk, but every other
68backend stores state in a remote service of some kind, which allows multiple
69people to access it. Accessing state in a remote service generally requires some
70kind of access credentials, since state data contains extremely sensitive
71information.
72
73Some backends act like plain "remote disks" for state files; others support
74_locking_ the state while operations are being performed, which helps prevent
75conflicts and inconsistencies.
76
77### Operations
78
79"Operations" refers to performing API requests against infrastructure services
80in order to create, read, update, or destroy resources. Not every `terraform`
81subcommand performs API operations; many of them only operate on state data.
82
83Only two backends actually perform operations: `local` and `remote`.
84
85The `local` backend performs API operations directly from the machine where the
86`terraform` command is run. Whenever you use a backend other than `local` or
87`remote`, Terraform uses the `local` backend for operations; it only uses the
88configured backend for state storage.
89
90The `remote` backend can perform API operations remotely, using Terraform Cloud
91or Terraform Enterprise. When running remote operations, the local `terraform`
92command displays the output of the remote actions as though they were being
93performed locally, but only the remote system requires cloud credentials or
94network access to the resources being managed.
95
96Remote operations are optional for the `remote` backend; the settings for the
97target Terraform Cloud workspace determine whether operations run remotely or
98locally. If local operations are configured, Terraform uses the `remote` backend
99for state and the `local` backend for operations, like with the other state
100backends.
101
102### Backend Types
103
104Terraform's backends are divided into two main types, according to how they
105handle state and operations:
106
107- **Enhanced** backends can both store state and perform operations. There are
108  only two enhanced backends: `local` and `remote`.
109- **Standard** backends only store state, and rely on the `local` backend for
110  performing operations.
111