Historically Consul has had 2 license versions.
- License Version 1 (v1) is for Consul < 1.8
- License Version 2 (v2) is for Consul >=1.8.
- Beware, that v2 licenses will not work with older Consul binaries but v1 licenses do work with newer versions.
- However, it advised that you request an updated v2 license from your Hashicorp account contact once you have upgraded to versions >=1.8.
- V2 is the current version of licensing and is given out by default for all NEW deployments.
- From Consul 1.10+ent onwards certain licensing changes have been implemented the most notable being that, a Consul Enterprise License is needed to start a Consul Enterprise agent.
How to determine which Consul license version is in use?
The first 2 characters in any generated license will tell you the version of that license. If the license begins with 01 it is version 1 (v1) and if it begins with 02 it is version 2 (v2)
- The following command will display that for you.
echo "License Type is: v$(cat <license_file> | cut -c2)"
The above command will read out if the license is a v1 license or a v2 license.
> echo "License Type is: v$(cat license.hclic | cut -c2)"
> License Type is: v2
Another helpful tip is using the consul license inspect command.
- Only v2 licenses will return a meaningful output with this command since this command was introduced in Consul 1.10 and onwards after v2 licenses became mainstream.