Skip to content
Get Started for Free

Installation

LocalStack provides multiple installation paths depending on your development environment and requirements. We recommend a CLI-based installation for the most consistent local startup experience.

Use lstk to install, authenticate, and start LocalStack with minimal setup.

LocalStack for AWS features require an Auth Token to activate your running instance. lstk handles authentication through a browser-based login flow, while Docker and CI workflows can use LOCALSTACK_AUTH_TOKEN.

lstk is a lightweight CLI for LocalStack that manages the authentication and container lifecycle in a single workflow.

Requirement: You must have a working Docker installation before proceeding.

bash brew install localstack/tap/lstk

Terminal window
lstk start

The first execution initiates a browser-based login flow. Subsequent starts use credentials stored in your system keyring.

Terminal window
lstk update

For more details, see the lstk documentation.

Use these methods when you need explicit container configuration, want to run LocalStack alongside other services, or deploy LocalStack in CI and Kubernetes environments. For everyday local development, lstk is usually simpler.

Use Docker Compose when you want a reusable configuration file that can be shared across a team or checked into a project repository. Create a docker-compose.yml with the following configuration:

services:
localstack:
container_name: '${LOCALSTACK_DOCKER_NAME:-localstack-main}'
image: localstack/localstack
ports:
- '127.0.0.1:4566:4566' # LocalStack Gateway
- '127.0.0.1:4510-4559:4510-4559' # external services port range
- '127.0.0.1:443:443' # LocalStack HTTPS Gateway
environment:
# Activate LocalStack for AWS: https://docs.localstack.cloud/getting-started/auth-token/
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} # required for Pro
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
- PERSISTENCE=${PERSISTENCE:-0}
volumes:
- '${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'

Execute docker compose up to start.

Use the Docker CLI for one-off starts or when you want to test a container configuration before moving it into Compose:

Terminal window
docker run \
--rm -it \
-p 127.0.0.1:4566:4566 \
-p 127.0.0.1:4510-4559:4510-4559 \
-p 127.0.0.1:443:443 \
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \
-v /var/run/docker.sock:/var/run/docker.sock \
localstack/localstack

Deploy LocalStack to a Kubernetes cluster:

Terminal window
helm repo add localstack-repo https://helm.localstack.cloud
helm upgrade --install localstack localstack-repo/localstack

Manage local instances via a standalone desktop application. Download here.

Install the official extension to manage LocalStack directly from the Docker Desktop.

Installation issues typically fall into one of three areas: getting your chosen install method working, activating your license, or reaching LocalStack over the network. This section will guide you to the appropriate guide that contains detailed fixes based on your installation method.

If you installed via lstk and LocalStack fails to start, authenticate, or pull its image, see lstk troubleshooting.

For first-run authentication (browser login, keyring tokens, or LOCALSTACK_AUTH_TOKEN in CI), refer to Authentication and the Auth Token guide.

If you started LocalStack with Docker Compose or the Docker CLI:

Ensure you have exported LOCALSTACK_AUTH_TOKEN in your shell before running docker compose up or docker run.

Stream container logs using the command that matches your install method:

Terminal window
lstk logs

For lstk CLI diagnostics (separate from container logs), see Logging.

To enable verbose startup logging, capture logs from a failed container, or share a diagnose bundle with support, see How do I capture and share LocalStack container logs for troubleshooting?.

If your application cannot reach LocalStack after installation, see the networking documentation.

Now that you’ve completed installation, proceed to the Auth Token guide to activate LocalStack and prepare your environment for local development.

Was this page helpful?