2019-05-26 23:31:04 +00:00
---
2020-06-09 15:08:05 +00:00
stage: Growth
group: Conversion
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2019-05-26 23:31:04 +00:00
---
2022-01-05 00:11:07 +00:00
# Activate GitLab Enterprise Edition (EE) **(PREMIUM SELF)**
2019-05-05 14:17:38 +00:00
2022-01-05 00:11:07 +00:00
When you install a new GitLab instance without a license, it only has the Free features
enabled. To enable all features of GitLab Enterprise Edition (EE), activate
your instance with an activation code or a license file. When [the license expires ](#what-happens-when-your-license-expires ),
some functionality is locked.
2020-11-03 09:09:07 +00:00
2022-01-05 00:11:07 +00:00
## Verify your GitLab edition
2020-11-03 09:09:07 +00:00
2022-01-05 00:11:07 +00:00
To activate your instance, make sure you are running GitLab Enterprise Edition (EE).
2019-05-05 14:17:38 +00:00
2022-01-05 00:11:07 +00:00
To verify the edition, sign in to GitLab and select
**Help** (**{question-o}**) > **Help** . The GitLab edition and version are listed
at the top of the page.
2021-07-20 18:08:46 +00:00
2022-01-05 00:11:07 +00:00
If you are running GitLab Community Edition (CE), upgrade your installation to GitLab
EE. For more details, see [Upgrading between editions ](../../update/index.md#upgrading-between-editions ).
If you have questions or need assistance upgrading from GitLab CE to EE,
[contact GitLab Support ](https://about.gitlab.com/support/#contact-support ).
2021-07-20 18:08:46 +00:00
2022-01-05 00:11:07 +00:00
## Activate GitLab EE with an activation code
In GitLab Enterprise Edition 14.1 and later, you need an activation code to activate
2022-02-03 00:18:25 +00:00
your instance. To get an activation code you have to [purchase a license ](https://about.gitlab.com/pricing/ ).
The activation code is a 24-character alphanumeric string you receive in a confirmation email.
2022-01-05 00:11:07 +00:00
You can also sign in to the [Customers Portal ](https://customers.gitlab.com/customers/sign_in )
to copy the activation code to your clipboard.
To activate your instance with an activation code:
2021-07-20 18:08:46 +00:00
1. Sign in to your GitLab self-managed instance.
2022-01-05 00:11:07 +00:00
1. On the top bar, select **Menu > Admin** .
1. On the left sidebar, select **Subscription** .
1. Enter the activation code in **Activation code** .
2021-07-20 18:08:46 +00:00
1. Read and accept the terms of service.
2022-03-07 15:22:51 +00:00
1. Select **Add license** .
2021-07-20 18:08:46 +00:00
2022-03-07 15:22:51 +00:00
## Activate GitLab EE with a license file or key
2021-07-20 18:08:46 +00:00
2022-01-13 21:14:07 +00:00
If you receive a license file from GitLab (for example, for a trial), you can
upload it to your instance or add it during installation. The license file is
a base64-encoded ASCII text file with a `.gitlab-license` extension.
2021-07-20 18:08:46 +00:00
2022-01-13 21:14:07 +00:00
The first time you sign in to your GitLab instance, a note with a
2022-03-07 15:22:51 +00:00
link to the **Add license** page should be displayed.
2019-05-05 14:17:38 +00:00
2022-03-07 15:22:51 +00:00
Otherwise, to add your license:
2019-05-05 14:17:38 +00:00
2022-01-13 21:14:07 +00:00
1. Sign in to GitLab as an administrator.
1. On the top bar, select **Menu > Admin** .
2022-03-03 12:14:02 +00:00
1. On the left sidebar, select **Settings > General** .
2022-03-07 15:22:51 +00:00
1. In the **License file** area, select **Add a license** .
1. Add a license:
2022-02-14 18:13:23 +00:00
- For a file, either:
- Select **Upload `.gitlab-license` file** , then **Choose File** and
select the license file from your local machine.
- Drag and drop the license file to the **Drag your license file here** area.
2022-01-13 21:14:07 +00:00
- For plain text, select **Enter license key** and paste the contents in
**License key** .
1. Select the **Terms of Service** checkbox.
2022-03-07 15:22:51 +00:00
1. Select **Add license** .
2019-05-05 14:17:38 +00:00
2022-01-11 00:13:53 +00:00
## Add your license during installation
2019-05-07 18:53:25 +00:00
2022-01-11 00:13:53 +00:00
You can import a license file when you install GitLab.
2019-05-07 18:53:25 +00:00
2022-01-11 00:13:53 +00:00
- **For installations from source**
- Place the `Gitlab.gitlab-license` file in the `config/` directory.
- To specify a custom location and filename for the license, set the
`GITLAB_LICENSE_FILE` environment variable with the path to the file:
2019-05-07 18:53:25 +00:00
2022-01-11 00:13:53 +00:00
```shell
export GITLAB_LICENSE_FILE="/path/to/license/file"
```
2019-05-07 18:53:25 +00:00
2022-01-11 00:13:53 +00:00
- **For Omnibus package**
- Place the `Gitlab.gitlab-license` file in the `/etc/gitlab/` directory.
- To specify a custom location and filename for the license, add this entry to `gitlab.rb` :
2019-05-07 18:53:25 +00:00
2022-01-11 00:13:53 +00:00
```ruby
gitlab_rails['initial_license_file'] = "/path/to/license/file"
```
2019-05-07 18:53:25 +00:00
2020-12-04 21:09:29 +00:00
WARNING:
2022-01-11 00:13:53 +00:00
These methods only add a license at the time of installation. To renew or upgrade
2022-03-07 15:22:51 +00:00
a license, add the license in the **Admin Area** in the web user interface.
2019-05-05 14:17:38 +00:00
## What happens when your license expires
2022-01-14 12:18:55 +00:00
Fifteen days before the license expires, a notification banner with the upcoming expiration
2022-01-05 00:11:07 +00:00
date displays to GitLab administrators.
2019-05-05 14:17:38 +00:00
2022-01-05 00:11:07 +00:00
When your license expires, GitLab locks features, like Git pushes
and issue creation. Your instance becomes read-only and
an expiration message displays to all administrators. You have a 14-day grace period
2021-03-30 00:09:26 +00:00
before this occurs.
2022-03-07 15:22:51 +00:00
To resume functionality, [activate a new license ](#activate-gitlab-ee-with-an-activation-code ).
2022-01-05 00:11:07 +00:00
2022-03-07 15:22:51 +00:00
To go back to Free features, [delete all expired licenses ](#remove-a-license ).
2019-05-05 14:17:38 +00:00
2022-03-07 15:22:51 +00:00
## Remove a license
2020-08-19 03:09:59 +00:00
2022-03-07 15:22:51 +00:00
To remove a license from a self-managed instance:
2020-08-19 03:09:59 +00:00
2022-01-05 00:11:07 +00:00
1. On the top bar, select **Menu > Admin** .
1. On the left sidebar, select **Subscription** .
2021-06-15 15:10:04 +00:00
1. Select **Remove license** .
2020-08-19 03:09:59 +00:00
2022-01-05 00:11:07 +00:00
Repeat these steps to remove all licenses, including those applied in the past.
## View license details and history
To view your license details:
2021-07-19 09:08:39 +00:00
2022-01-05 00:11:07 +00:00
1. On the top bar, select **Menu > Admin** .
1. On the left sidebar, select **Subscription** .
2019-05-05 14:17:38 +00:00
2022-03-07 15:22:51 +00:00
You can add and view more than one license, but only the latest license in
2022-01-05 00:11:07 +00:00
the current date range is the active license.
2021-08-24 00:11:18 +00:00
2022-03-07 15:22:51 +00:00
When you add a future-dated license, it doesn't take effect until its applicable date.
2022-01-05 00:11:07 +00:00
You can view all active subscriptions in the **Subscription history** table.
2019-05-05 14:17:38 +00:00
2022-02-10 09:16:20 +00:00
You can also [export ](../../subscriptions/self_managed/index.md ) your license usage information to a CSV file.
2020-12-18 00:10:04 +00:00
NOTE:
2022-01-05 00:11:07 +00:00
In GitLab 13.6 and earlier, a banner about an expiring license may continue to display
2022-03-07 15:22:51 +00:00
when you add a new license. This happens when the start date of the new license
2022-01-05 00:11:07 +00:00
is in the future and the expiring one is still active.
2020-12-18 00:10:04 +00:00
The banner disappears after the new license becomes active.
2020-06-23 03:09:26 +00:00
## Troubleshooting
2019-05-26 23:31:04 +00:00
2022-01-11 00:13:53 +00:00
### No Subscription area in the Admin Area
2019-05-26 23:31:04 +00:00
2022-03-07 15:22:51 +00:00
You cannot add your license because there is no **Subscription** area.
2022-01-11 00:13:53 +00:00
This issue might occur if:
2020-06-23 03:09:26 +00:00
2022-03-07 15:22:51 +00:00
- You're running GitLab Community Edition. Before you add your license, you
2022-01-11 00:13:53 +00:00
must [upgrade to Enterprise Edition ](../../update/index.md#community-to-enterprise-edition ).
2022-03-07 15:22:51 +00:00
- You're using GitLab.com. You cannot add a self-managed license to GitLab.com.
2022-01-11 00:13:53 +00:00
To use paid features on GitLab.com, [purchase a separate subscription ](../../subscriptions/gitlab_com/index.md ).
2020-06-23 03:09:26 +00:00
### Users exceed license limit upon renewal
2022-01-11 00:13:53 +00:00
GitLab displays a message prompting you to purchase
2022-03-07 15:22:51 +00:00
additional users. This issue occurs if you add a license that does not have enough
2022-01-11 00:13:53 +00:00
users to cover the number of users in your instance.
To fix this issue, purchase additional seats to cover those users.
For more information, read the [licensing FAQ ](https://about.gitlab.com/pricing/licensing-faq/ ).
2021-07-20 18:08:46 +00:00
2022-01-11 00:13:53 +00:00
In GitLab 14.2 and later, for instances that use a license file, the following
rules apply:
2021-08-18 21:08:44 +00:00
2022-01-11 00:13:53 +00:00
- If the users over license are less than or equal to 10% of the users in the license
file, the license is applied and you pay the overage in the next renewal.
- If the users over license are more than 10% of the users in the license file,
2021-08-18 21:08:44 +00:00
you cannot apply the license without purchasing more users.
2022-03-07 15:22:51 +00:00
For example, if you purchase a license for 100 users, you can have 110 users when you add
your license. However, if you have 111 users, you must purchase more users before you can add
2022-01-11 00:13:53 +00:00
the license.
2021-08-18 21:08:44 +00:00
2022-01-11 00:13:53 +00:00
### Cannot activate instance due to connectivity error
2021-07-20 18:08:46 +00:00
2022-01-11 00:13:53 +00:00
In GitLab 14.1 and later, to activate your subscription with an activation code,
your GitLab instance must be connected to the internet.
2021-08-13 18:09:11 +00:00
2022-01-11 00:13:53 +00:00
If you have an offline or airgapped environment,
2022-03-07 15:22:51 +00:00
[activate GitLab EE with a license file or key ](license.md#activate-gitlab-ee-with-a-license-file-or-key ) instead.
2021-08-13 18:09:11 +00:00
2022-01-11 00:13:53 +00:00
If you have questions or need assistance activating your instance,
[contact GitLab Support ](https://about.gitlab.com/support/#contact-support ).