Skip to content
Get Started for Free

Auth Token

An Auth Token is a mandatory credential required to start the LocalStack container and activate licensed features. It links your running LocalStack instance to your workspace license and unlocks the services and capabilities available to your account.

You can manage Auth Tokens from the Auth Tokens page in the LocalStack Web Application.

Token TypeScopeUse Case
Developer TokenIndividualLocal development workstations. Managed per user.
CI Auth TokenWorkspaceAutomated pipelines and shared runners. Managed by workspace admins.

Authentication requirements vary based on your chosen execution method.

The lstk CLI automates the authentication lifecycle. On initial execution, it triggers a browser-based OAuth flow and stores the resulting token in your system keyring. No manual environment variable configuration is required.

Terminal window
lstk start

If you use the LocalStack CLI, set your token with the auth command. This stores the token in your local configuration.

Terminal window
localstack auth set-token <YOUR_AUTH_TOKEN>
localstack start

For direct container execution, inject the token as an environment variable. For complete startup examples, see the Docker Compose and Docker CLI installation options.

Docker CLI:

Terminal window
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN}

Docker Compose:

environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN}

CI environments should use a dedicated CI Auth Token stored in your CI provider’s secret manager. For complete examples, see the CI/CD guide.

Verify the activation status by querying the LocalStack info endpoint:

Terminal window
curl http://localhost:4566/_localstack/info | jq
Output
{
"edition": "pro",
"is_license_activated": true
}

The edition field should be pro, and is_license_activated should be true.

An Auth Token can only activate licensed features if a license is assigned to the associated user or workspace.

  1. Navigate to the Users & Licenses page.
  2. Identify the target user in Workspace Members.
  3. Select the appropriate Member Role.
  4. Save the configuration to activate the license for that identity.

Rotate an Auth Token if it has been exposed, shared accidentally, or stored in a place where it should not be. Go to the Auth Tokens page and select the reset option for the affected token.

After rotation, update every local shell, container configuration, or CI secret that used the old token.

LocalStack requires successful license activation during startup. If activation fails, LocalStack exits and displays an error message:

Terminal window
===============================================
License activation failed! 🔑❌
Reason: The credentials defined in your environment are invalid. Please make sure to either set the LOCALSTACK_AUTH_TOKEN variable to a valid auth token, or the LOCALSTACK_API_KEY variable to a valid LocalStack API key. You can find your Auth Token or API key in the LocalStack web app https://app.localstack.cloud.
Due to this error, Localstack has quit. LocalStack for AWS features can only be used with a valid license.
- Please check that your credentials are set up correctly and that you have an active license.
You can find your credentials in our webapp at https://app.localstack.cloud.
- If you want to continue using LocalStack without pro features you can set `ACTIVATE_PRO=0`.

Activation may fail for several reasons, and the most common ones are listed below.

You need to provide an Auth Token to start the LocalStack for AWS image successfully. You can find your Auth Token on the Auth Tokens page in the LocalStack Web Application.

If you are using the localstack CLI, you can set the LOCALSTACK_AUTH_TOKEN environment variable to your Auth Token or use the following command to set it up:

Terminal window
localstack auth set-token <YOUR_AUTH_TOKEN>

The issue may occur if there is no valid license linked to your account due to expiration or if the license has not been assigned. You can check your license status in the LocalStack Web Application on the My License page.

LocalStack initiates offline activation when the license server is unreachable, requiring re-activation every 24 hours. Log output may indicate issues with your machine resolving the LocalStack API domain, which can be verified using a tool like dig:

Terminal window
dig api.localstack.cloud

If the result shows a status other than status: NOERROR, your machine is unable to resolve this domain. Certain corporate DNS servers may filter requests to specific domains. Kindly reach out to your network administrator to safelist localstack.cloud domain.

If you have any further problems concerning your license activation, or if the steps do not help, don’t hesitate to contact us.

After configuring your Auth Token, continue to the Local Development guide to start LocalStack and deploy a local serverless API.

Was this page helpful?