Open Source · MIT License

Local OpenStack
for Developers

Spin up 10 OpenStack APIs locally in seconds. Full API fidelity — no cloud account required. Perfect for CI/CD pipelines, local testing, and Terraform development.

→ Quick Start ⭐ GitHub View Services
Copy
docker run --rm \ -p 5000:5000 # Keystone -p 8774:8774 # Nova -p 9696:9696 # Neutron -p 9292:9292 # Glance -p 9999:9999 # Admin localostack/localostack:latest
Zero Config
Works out of the box
🧩
10 Services
Full OpenStack stack
🎯
API Fidelity
SDK & Terraform compatible
💥
Fault Injection
Simulate real failures
💾
Persistence
SQLite or in-memory
🌍
Multi-Region
LOCALOSTACK_REGION

10 OpenStack APIs, One Container

Every service runs in a single process, sharing one asyncio event loop for minimal resource usage.

🔑 Keystone :5000

Identity & auth service. Token issuance, service catalog, users, projects, roles.

v3 Auth Catalog
🖥️ Nova :8774

Compute service. Server CRUD, flavors, keypairs, state machine, microversions up to 2.47.

v2.1 Microversion State Machine
🌐 Neutron :9696

Network service. Networks, subnets, ports, security groups, MAC/IP auto-assignment.

v2.0 Security Groups
🖼️ Glance :9292

Image service. Image metadata CRUD, file upload/download, cirros pre-loaded.

v2 cirros-0.6.2
💿 Cinder :8776

Block storage. Volume & snapshot CRUD, volume types, RFC3339 timestamps.

v3 Snapshots
📐 Placement :8778

Resource placement. Providers, inventories, allocations, allocation candidates.

v1.0 10K VCPUs
🔥 Heat :8004

Orchestration. Stack CRUD, HOT template parsing, resource & event listing.

v1 HOT Templates
📦 Swift :8080

Object storage. Account/container/object CRUD, in-memory binary storage, ETag.

v1 ETag / MD5
🔐 Barbican :9311

Secret management. Secret CRUD, payload retrieval, secret_ref URL responses.

v1 Secrets
⚖️ Octavia :9876

Load balancing. LoadBalancer → Listener → Pool → Member hierarchy, LBaaS v2.

v2 LBaaS

Up and running in 3 steps

No OpenStack installation. No configuration files. Just Docker.

1
Start LocalOStack

Pull and run the container. All 10 services start automatically.

bash
docker run --rm \
  -p 5000:5000 -p 8774:8774 -p 9696:9696 \
  -p 9292:9292 -p 8776:8776 -p 8778:8778 \
  -p 8004:8004 -p 8080:8080 -p 9311:9311 \
  -p 9876:9876 -p 9999:9999 \
  -e LOCALOSTACK_HOST=0.0.0.0 \
  localostack/localostack:latest
2
Configure your client

Create a clouds.yaml file to use with OpenStack CLI or SDK.

~/.config/openstack/clouds.yaml
clouds:
  localostack:
    auth:
      auth_url: http://localhost:5000
      username: admin
      password: password
      project_name: admin
      user_domain_name: Default
      project_domain_name: Default
    region_name: RegionOne
    interface: public
Python
import openstack

conn = openstack.connect(
    auth_url="http://localhost:5000/v3",
    project_name="admin",
    username="admin",
    password="password",
    user_domain_name="Default",
    project_domain_name="Default",
)

# List servers
for server in conn.compute.servers():
    print(server.name, server.status)
main.tf
provider "openstack" {
  auth_url    = "http://localhost:5000/v3"
  tenant_name = "admin"
  user_name   = "admin"
  password    = "password"
  region      = "RegionOne"
}

resource "openstack_compute_instance_v2" "test" {
  name      = "my-instance"
  flavor_id = "1"
  image_id  = data.openstack_images_image_v2.cirros.id
}
3
Start using it!

Use the OpenStack CLI or any SDK just like you would with a real cloud.

bash
# List flavors
openstack --os-cloud localostack flavor list

# Create a server
openstack --os-cloud localostack server create \
  --flavor m1.tiny \
  --image cirros-0.6.2 \
  my-test-server

# Open the admin dashboard
open http://localhost:9999

Environment Variables

All configuration is done via environment variables. Every setting has a sensible default.

Service Ports
Variable Default Description
LOCALOSTACK_HOST0.0.0.0Bind address
LOCALOSTACK_KEYSTONE_PORT5000Keystone Identity
LOCALOSTACK_NOVA_PORT8774Nova Compute
LOCALOSTACK_NEUTRON_PORT9696Neutron Network
LOCALOSTACK_GLANCE_PORT9292Glance Image
LOCALOSTACK_CINDER_PORT8776Cinder Block Storage
LOCALOSTACK_PLACEMENT_PORT8778Placement
LOCALOSTACK_HEAT_PORT8004Heat Orchestration
LOCALOSTACK_SWIFT_PORT8080Swift Object Storage
LOCALOSTACK_BARBICAN_PORT9311Barbican Secrets
LOCALOSTACK_OCTAVIA_PORT9876Octavia Load Balancer
LOCALOSTACK_ADMIN_PORT9999Admin API & Dashboard
Auth & Region
Variable Default Description
LOCALOSTACK_ADMIN_USERNAMEadminAdmin username
LOCALOSTACK_ADMIN_PASSWORDpasswordAdmin password
LOCALOSTACK_ADMIN_PROJECTadminAdmin project name
LOCALOSTACK_REGIONRegionOneOpenStack region name
LOCALOSTACK_ENDPOINT_HOSTlocalhostService catalog hostname
Persistence
Variable Default Description
LOCALOSTACK_PERSISTENCE memory "memory" or "sqlite"
LOCALOSTACK_DB_PATH /var/lib/localostack/state.db SQLite database file path
Fault Injection
Variable Default Description
LOCALOSTACK_FAULT_RULES "" JSON fault rules — or use Admin API

Works with your existing tools

No special plugins or adapters needed. LocalOStack speaks the same API language as real OpenStack.

🐍
openstacksdk
Python SDK
⌨️
python-openstackclient
CLI tool
🏗️
Terraform
OpenStack Provider
🐹
gophercloud
Go SDK
⚙️
GitHub Actions
CI/CD integration
🐳
Docker Compose
Container orchestration

Fault Injection — Test your resilience

Inject errors, delays, and throttling into any service to test how your application handles failures.

Add a fault rule via Admin API
# Inject 500 errors on 50% of Nova server requests
curl -X POST http://localhost:9999/admin/fault-rules \
  -H 'Content-Type: application/json' \
  -d '{
    "service": "nova",
    "method": "POST",
    "path_pattern": "/v2.1/servers",
    "action": "error",
    "status_code": 500,
    "probability": 0.5
  }'

# Remove all fault rules
curl -X DELETE http://localhost:9999/admin/fault-rules