Introduction

Shopware 6 continues to evolve as one of the most robust, developer-friendly e-commerce platforms available today. With the release of Shopware 6.7, several architectural improvements have been introduced, including native support for PHP 8.2 and 8.3, migration to Symfony 7, enhanced memory management, and a restructured caching layer that heavily favors Redis as the default backend. While the platform can be installed on traditional shared hosting or VPS environments, running it locally during development is significantly smoother when containerized. Docker provides isolation, consistent dependency versions across team members, and eliminates the dreaded “works on my machine” paradox.

This guide walks you through setting up a production-accurate local Shopware 6.7 environment using Docker Compose. We will focus heavily on the why and how behind each configuration step, ensuring you understand not just the commands, but the architecture driving them. By the end of this article, you will have a fully functional development stack ready for theme customization, plugin creation, and store migration testing.

Prerequisites

Before diving into the setup, ensure your local machine meets the following requirements:

  • Docker Desktop (or Docker Engine + Compose plugin) installed and running
  • Composer 2.x globally available in your terminal
  • Git for repository management
  • At least 4 GB of free RAM allocated to Docker (Shopware's Symfony-based architecture is memory-conscious but not lightweight)
  • A basic understanding of terminal commands and environment variable configuration

Shopware 6.7 officially deprecates PHP 8.1, so all local tooling should align with modern PHP standards. We will leverage official Shopware platform packages alongside community-maintained Docker configurations to keep the stack lightweight yet fully featured.

Step 1: Initialize Your Project Directory

Start by creating a dedicated workspace for your local Shopware instance. Navigation into that directory is essential before running any Docker or Composer commands.

mkdir shopware-6-local && cd shopware-6-local

Rather than pulling pre-made templates, we will build the environment from scratch. This approach gives you full control over container networking, volume mounts, and service dependencies. Shopware 6.7 expects a standard Composer-managed project structure, so we will initialize the core platform first.

Run the following command to scaffold the framework:

composer create-project shopware/platform shopware-dev --no-interaction

This command fetches the latest Shopware 6.7 patch version and resolves all Symfony, Doctrine, and custom Shopware dependencies. Once complete, your project directory will contain app/, custom/, src/, and framework configuration files. However, Composer alone does not provide the database, message queue, or web server needed to run the platform. That is where Docker Compose steps in.

Step 2: Create the Docker Compose Configuration

Shopware 6.7 relies on a tightly coupled service mesh: PHP-FPM serves application logic, Nginx handles routing and HTTPS termination, MariaDB stores session and product data, Redis manages cache and queue payloads, and Mailpit simulates transactional emails during development. Below is a production-accurate docker-compose.yml tailored for 6.7 requirements.

version: "3.8"

services:
  php-fpm:
    image: php:8.3-fpm
    working_dir: /var/www/html
    volumes:
      - ./shopware-dev:/var/www/html
    environment:
      - APP_ENV=dev
      - DATABASE_URL=mysql://app_user:app_pass@mariadb:3306/shopware?charset=utf8mb4&serverVersion=10.11
      - REDIS_HOST=redis
      - MAILER_DSN=smtp://mailpit:1025
    depends_on:
      - mariadb
      - redis
    command: >
      sh -c "apt-get update && apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev git unzip \
      && docker-php-ext-configure gd --with-freetype --with-jpeg \
      && docker-php-ext-install gd pdo_mysql opcache intl gmp \
      && pecl install redis memcached \
      && docker-php-ext-enable redis memcached"

  nginx:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - ./shopware-dev/config/nginx/sites-available:/etc/nginx/conf.d
      - ./shopware-dev/public:/var/www/html/public
    depends_on:
      - php-fpm

  mariadb:
    image: mariadb:10.11
    environment:
      MYSQL_ROOT_PASSWORD: root_pass
      MYSQL_DATABASE: shopware
      MYSQL_USER: app_user
      MYSQL_PASSWORD: app_pass
    volumes:
      - db_data:/var/lib/mysql

  redis:
    image: redis:7-alpine
    command: redis-server --requirepass redis_pass

  mailpit:
    image: axllent/mailpit
    ports:
      - "8025:8025"

volumes:
  db_data:

Why This Structure Works for Shopware 6.7

Shopware 6.7 explicitly requires opcache, pdo_mysql, intl, and gmp extensions, alongside modern cache drivers. The PHP FPM service dynamically installs these at runtime to avoid bloating the base image. MariaDB 10.11 aligns with Shopware's official tested database versions, ensuring full compatibility with Doctrine migrations and JSON column optimizations introduced in recent releases. Redis is configured as a secured service; Shopware 6.7 routes cache, lock, and messenger payloads through it by default, which drastically improves console command execution speed. Nginx is mounted separately so you can drop custom routing rules without rebuilding containers.

Step 3: Configure Environment Variables

Shopware reads configuration from .env files, but Docker Compose injects critical variables directly into the container environment. Create a .env file in your project root to handle application-specific settings.

APP_ENV=dev
APP_DEBUG=true
APP_SECRET=change_me_in_production
DATABASE_URL=mysql://app_user:app_pass@mariadb:3306/shopware?charset=utf8mb4&serverVersion=10.11
REDIS_HOST=redis
REDIS_PORT=6379
MESSENGER_TRANSPORT_DSN=rediss://redis_pass@redis/2?timeout=10&read_timeout=10
MAILER_DSN=smtp://mailpit:1025
APP_URL=http://localhost:8080
SYMFONY_LOCK_ENABLED=false

Notice the MESSENGER_TRANSPORT_DSN syntax. Shopware 6.7 uses Symfony Messenger for async email processing, inventory updates, and search indexing. Prefixing with rediss:// ensures encrypted communication even locally, while /2 selects Redis database index two, keeping data isolated during development. Setting SYMFONY_LOCK_ENABLED=false bypasses file-based locks that can cause concurrency errors in Docker volume mounts.

Step 4: Install Dependencies & Compile Assets

With the compose stack running, you must initialize Shopware's internal structure. Bring up the containers first:

docker compose up -d

Once healthy, enter the PHP container and run Shopware's installation routine:

docker compose exec php-fpm sh -c "cd /var/www/html/shopware-dev && \
composer install --no-interaction && \
bin/console system:install --basic-setup --skip-step=finish"

The system:install command configures database tables, generates admin credentials, and bootstraps the core store structure. Shopware 6.7 introduces a streamlined installer that skips manual session generation and automatically detects your cache backend. After completion, verify asset compilation:

bin/console theme:compile --all
bin/console assets:install public

Theme compilation now leverages Symfony's asset mapper integration in 6.7, meaning less webpack overhead and faster HMR during development.

Step 5: Configure Nginx & Access the Shop

Shopware 6.7 requires a specific Nginx configuration to handle Symfony routing, secure session cookies, and API rate limiting. Create shopware-dev/config/nginx/sites-available/shopware.conf:

server {
    listen 80;
    server_name localhost;
    root /var/www/html/public;
    index index.php;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass php-fpm:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
    }

    location ~ \.php$ {
        return 404;
    }
}

Reload containers with docker compose restart nginx, then navigate to http://localhost:8080. The administration panel is accessible at /admin, using credentials generated during installation.

Shopware 6.7 Specific Considerations

Shopware 6.7 brings notable shifts that affect local development:

  • PHP Version Strictness: PHP 8.2/8.3 is mandatory. Legacy extension warnings have been removed in favor of fatal errors during composer validation.
  • Cache Architecture: Redis is no longer optional for optimal performance. Memcached remains supported but requires explicit configuration in config/packages/cache.yaml.
  • Console Command Optimization: bin/console commands now respect Docker memory limits. If you encounter SIGKILL during deployment or indexing, adjust php_memory_limit=2G in your FPM service environment variables.
  • Plugin Development Path: The custom/plugins/ directory is symlinked automatically by Composer. Use composer require my/vendor/my-plugin --dev to simulate vendor installations locally.

Conclusion

Running Shopware 6.7 locally with Docker eliminates environment drift while mirroring production infrastructure. By understanding why each service exists, how variables cascade through containers, and what architectural shifts 6.7 introduces, you transform from a passive installer into an informed developer. The foundation laid here scales effortlessly to staging environments, Kubernetes deployments, or CI/CD pipelines. Experiment with theme overrides, craft custom plugins, and leverage the enhanced messenger system—all without leaving your terminal. Shopware's local development experience has never been more streamlined, and Docker makes it reproducible across any team member's machine.