1---
2layout: "docs"
3page_title: "Commands: ACL Set Agent Token"
4sidebar_current: "docs-commands-acl-set-agent-token"
5---
6
7# Consul ACL Set Agent Token
8
9Command: `consul acl set-agent-token`
10
11This command updates the ACL tokens currently in use by the agent. It can be used to introduce
12ACL tokens to the agent for the first time, or to update tokens that were initially loaded from
13the agent's configuration. Tokens are not persisted, so will need to be updated again if the
14agent is restarted.
15
16## Usage
17
18Usage: consul acl set-agent-token [options] TYPE TOKEN
19
20
21### Token Types
22
23* `default` - The default token is the token that the agent will use for
24   both internal agent operations and operations initiated by the HTTP
25   and DNS interfaces when no specific token is provided. If not set the
26   agent will use the anonymous token.
27
28* `agent` - The token that the agent will use for internal agent operations.
29   If not given then the default token is used for these operations.
30
31* `master` - This sets the token that can be used to access the Agent APIs in
32   the event that the ACL datacenter cannot be reached.
33
34* `replication` - This is the token that the agent will use for replication
35   operations. This token will need to be configured with read access to
36   whatever data is being replicated.
37
38### API Options
39
40<%= partial "docs/commands/http_api_options_client" %>
41<%= partial "docs/commands/http_api_options_server" %>
42
43## Examples
44
45Set the `default` token:
46
47```
48$ consul acl set-agent-token default c4d0f8df-3aba-4ab6-a7a0-35b760dc29a1
49```