blob: e397a13492fd164d90fe19da19b4478e66c3818d [file] [log] [blame]
William Kurkianea869482019-04-09 15:16:11 -04001---
2layout: "docs"
3page_title: "Commands: License"
4sidebar_current: "docs-commands-license"
5description: >
6 The license command provides datacenter-level management of the Consul Enterprise license.
7---
8
9# Consul License
10
11Command: `consul license`
12
13<%= enterprise_alert :consul %>
14
15The `license` command provides datacenter-level management of the Consul Enterprise license. This was added in Consul 1.1.0.
16
17If ACLs are enabled then a token with operator privileges may be required in
18order to use this command. Requests are forwarded internally to the leader
19if required, so this can be run from any Consul node in a cluster. See the
Abhilash S.L3b494632019-07-16 15:51:09 +053020[ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls) for more information.
William Kurkianea869482019-04-09 15:16:11 -040021
22
23```text
24Usage: consul license <subcommand> [options] [args]
25
26 This command has subcommands for managing the Consul Enterprise license
27 Here are some simple examples, and more detailed examples are
28 available in the subcommands or the documentation.
29
30 Install a new license from a file:
31
32 $ consul license put @consul.license
33
34 Install a new license from stdin:
35
36 $ consul license put -
37
38 Install a new license from a string:
39
40 $ consul license put "<license blob>"
41
42 Retrieve the current license:
43
44 $ consul license get
45
46 For more examples, ask for subcommand help or view the documentation.
47
48Subcommands:
49 get Get the current license
50 put Puts a new license in the datacenter
51```
52
53## put
54
55This command sets the Consul Enterprise license.
56
57Usage: `consul license put [options] LICENSE`
58
59#### API Options
60
61<%= partial "docs/commands/http_api_options_client" %>
62<%= partial "docs/commands/http_api_options_server" %>
63
64The output looks like this:
65
66```
67License is valid
68License ID: 2afbf681-0d1a-0649-cb6c-333ec9f0989c
69Customer ID: 0259271d-8ffc-e85e-0830-c0822c1f5f2b
70Expires At: 2019-05-22 03:59:59.999 +0000 UTC
71Datacenter: *
72Package: premium
73Licensed Features:
74 Automated Backups
75 Automated Upgrades
76 Enhanced Read Scalability
77 Network Segments
78 Redundancy Zone
79 Advanced Network Federation
80```
81
82## get
83
84This command gets the Consul Enterprise license.
85
86Usage: `consul license get [options]`
87
88#### API Options
89
90<%= partial "docs/commands/http_api_options_client" %>
91<%= partial "docs/commands/http_api_options_server" %>
92
93The output looks like this:
94
95```
96License is valid
97License ID: 2afbf681-0d1a-0649-cb6c-333ec9f0989c
98Customer ID: 0259271d-8ffc-e85e-0830-c0822c1f5f2b
99Expires At: 2019-05-22 03:59:59.999 +0000 UTC
100Datacenter: *
101Package: premium
102Licensed Features:
103 Automated Backups
104 Automated Upgrades
105 Enhanced Read Scalability
106 Network Segments
107 Redundancy Zone
108 Advanced Network Federation
109```