.How do I install Shopware 6 using Docker and Docker Compose?
Quick Answer
You can install Shopware 6 locally with Docker by using the official production template, Docker Compose, and a few environment variables. The setup usually takes under an hour and gives you an isolated development stack with PHP, MySQL, Redis, Elasticsearch, and Nginx already wired together. The steps below cover the full setup, database installation, permissions, and the issues most developers hit on first boot.
Before You Start
- ✦ Docker Desktop or Docker Engine — Shopware relies on multiple containers and won’t run correctly without Docker Compose support.
- ✦ At least 8 GB RAM allocated to Docker — Elasticsearch and MySQL get unstable on smaller allocations.
- ✦ Git and terminal access — you’ll clone the Shopware template and run install commands from CLI.
- ✦ Composer authentication keys — required if you’re installing commercial Shopware packages or plugins.
Clone the template
Start with Shopware’s production template instead of building your own container stack from scratch. It already includes Docker Compose files, PHP services, database containers, and sane defaults for local development. Most failed setups happen because developers mix old Dockware examples with newer Shopware templates.
- Create a new project directory
- Clone the Shopware production template repository
- Move into the project root before running Docker commands
git clone https://github.com/shopware/production.git shopware-docker
cd shopware-dockerCreate the container stack
Next, define the Docker services. Most teams use separate containers for PHP, MySQL, Redis, Elasticsearch, and Nginx. You can simplify this later, but keeping them isolated makes debugging easier when something crashes or consumes too much memory.
- Create a docker-compose.yml file in the project root
- Map port 80 or 8000 for local access
- Mount the Shopware project directory into the PHP container
docker compose up -dInstall dependencies
Once the containers are running, install Composer packages inside the PHP container. This downloads Shopware core packages and prepares the application for the database installer. If Composer fails here, it is usually an authentication issue or missing PHP memory allocation.
- Enter the PHP container shell
- Run Composer install from the project root
- Wait for assets and packages to finish downloading
docker compose exec app bash
composer installRun the installer
Now install Shopware itself. This creates the database schema, default sales channel, admin account, and demo storefront. Use environment variables instead of hardcoded credentials where possible. It saves time later when you move the project into staging or CI pipelines.
- Create or update the .env file
- Configure the DATABASE_URL value
- Run the Shopware system install command
bin/console system:install --create-databaseBuild assets and test
Before opening the storefront, build administration assets and warm the cache. This catches missing Node packages, broken permissions, and failed Elasticsearch connections early. Most “blank admin page” problems appear here instead of during installation.
- Run cache clear and asset build commands
- Open the storefront URL in your browser
- Verify admin login and storefront rendering
bin/console cache:clear
bin/build-storefront.shShopware Docker Setup Checklist
0 of 8 completeMistakes Most Developers Make
! Using outdated Docker examples
What happens: Older container examples often use unsupported PHP or Elasticsearch versions.
Fix: Start with the latest Shopware production template and update container images before building.
! Wrong file permissions
What happens: Cache clears fail and the administration panel randomly throws 500 errors.
Fix: Match container user IDs correctly and avoid running Composer as root where possible.
! Ignoring Elasticsearch memory limits
What happens: Containers restart constantly and indexing jobs silently fail.
Fix: Allocate more Docker memory and lower Elasticsearch heap size for local development.
Key Takeaway
The short version: installing Shopware 6 with Docker is mostly about getting the container structure and permissions right early. Use the official production template, keep your services isolated, and verify Composer plus storefront builds before assuming the install succeeded. Most failed setups come from old Docker examples, low memory allocation, or incorrect cache permissions. Once the stack is stable, Docker makes local development, onboarding, and CI deployments much easier to manage. Start with Step 1—that one alone handles most of it.
Related Answers
Still need help?
Talk to our Shopware experts
We've handled GDPR/CCPA compliance for dozens of EU & US Shopware stores.