Installation
Introduction
Section titled “Introduction”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.
Install lstk
Section titled “Install lstk”bash brew install localstack/tap/lstk
bash npm install -g @localstack/lstk Download the binary for your platform from the GitHub
Releases and add it to your
PATH.
Start lstk
Section titled “Start lstk”lstk startThe first execution initiates a browser-based login flow. Subsequent starts use credentials stored in your system keyring.
Update lstk
Section titled “Update lstk”lstk updateFor more details, see the lstk documentation.
Container and orchestration tools
Section titled “Container and orchestration tools”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.
Docker Compose
Section titled “Docker Compose”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.
Docker CLI
Section titled “Docker CLI”Use the Docker CLI for one-off starts or when you want to test a container configuration before moving it into Compose:
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/localstackHelm (Kubernetes)
Section titled “Helm (Kubernetes)”Deploy LocalStack to a Kubernetes cluster:
helm repo add localstack-repo https://helm.localstack.cloudhelm upgrade --install localstack localstack-repo/localstackGraphical user interfaces (GUIs)
Section titled “Graphical user interfaces (GUIs)”LocalStack Desktop
Section titled “LocalStack Desktop”Manage local instances via a standalone desktop application. Download here.
Install the official extension to manage LocalStack directly from the Docker Desktop.
Troubleshooting
Section titled “Troubleshooting”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.
Docker Compose and Docker CLI
Section titled “Docker Compose and Docker CLI”If you started LocalStack with Docker Compose or the Docker CLI:
- License or credential errors: see Auth Token troubleshooting.
- Container exits during startup, proxy/DNS/TLS issues, or port conflicts: see Startup Troubleshooting FAQs.
- DNS server or port conflicts: see the DNS Server guide.
Ensure you have exported LOCALSTACK_AUTH_TOKEN in your shell before running docker compose up or docker run.
View logs
Section titled “View logs”Stream container logs using the command that matches your install method:
lstk logsFor lstk CLI diagnostics (separate from container logs), see Logging.
docker compose logs -f localstackdocker logs -f localstack-mainUse the container name from your docker run --name flag if you set one.
kubectl logs -f deployment/localstackThe deployment name follows your Helm release name (default: localstack).
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?.
Network connectivity
Section titled “Network connectivity”If your application cannot reach LocalStack after installation, see the networking documentation.
Next steps
Section titled “Next steps”Now that you’ve completed installation, proceed to the Auth Token guide to activate LocalStack and prepare your environment for local development.