.How do I run the Shopware 6 installer from the CLI (no browser)?
Quick Answer
You can install Shopware 6 entirely from the command line using the built-in system:install command. This is the preferred setup method for staging servers, CI/CD pipelines, Docker environments, and headless deployments where no browser installer is available. The process mainly involves preparing your database connection and environment variables, then running the installer command from the project root.
Before You Start
- ✦ PHP CLI access — you need shell access to run Shopware console commands.
- ✦ Database credentials — the installer creates tables and writes initial Shopware data.
- ✦ Composer dependencies installed — run composer install before starting the setup.
Prepare the project
Make sure your Shopware project files are already downloaded and dependencies are installed. Most failed CLI installs happen because the vendor directory is missing or the .env file still contains placeholder database values. If you cloned the project from Git, install dependencies first before touching the installer command.
- Navigate to the Shopware root directory
- Run composer install if dependencies are missing
- Verify that the .env file exists
composer installConfigure database access
Shopware reads database credentials from the DATABASE_URL value inside your .env file. The installer will fail immediately if the database server is unreachable or the credentials are wrong. Create the database manually first unless your deployment process handles that automatically.
- Edit the DATABASE_URL value in .env
- Create the target database before installation
- Verify MySQL or MariaDB connectivity
DATABASE_URL="mysql://user:[email protected]:3306/shopware"Run the installer command
Once the environment is ready, run the Shopware installer directly from the CLI. This command creates the database schema, installs default data, and generates the admin user. You can either enter values interactively or pass them as flags for automated deployments and CI pipelines.
- Run the installer from the project root
- Provide admin credentials when prompted
- Wait for cache warm-up and migration completion
bin/console system:install --basic-setupVerify the installation
After the installer finishes, verify that Shopware can serve requests correctly. CLI installs sometimes succeed even when file permissions or cache ownership are wrong. Test both the storefront and the admin area before continuing with plugins or theme deployment.
- Clear and warm up the cache
- Open the storefront homepage
- Log in to the Shopware admin panel
bin/console cache:clearShopware CLI Installation Checklist
0 of 6 completeMistakes Most Developers Make
! Wrong database hostname
What happens: The installer cannot connect to MySQL and exits before migrations start.
Fix: Use the actual database container or server hostname instead of localhost.
! Missing vendor directory
What happens: Symfony commands fail because required PHP packages are not installed.
Fix: Run composer install before using any Shopware console commands.
! Incorrect file permissions
What happens: Cache generation and media uploads fail even though installation completed successfully.
Fix: Make sure the web server user can write to var, public, and generated cache directories.
Key Takeaway
The short version: Shopware 6 can be installed completely from the CLI using the system:install command, which makes it ideal for automated deployments and server-based setups. Most installation problems come from incorrect database credentials, missing Composer dependencies, or broken file permissions after deployment. Configure the .env file first, verify database access, then run the installer command from the project root. After installation, always clear the cache and test both the storefront and admin login before moving on to plugins or themes. Start with Step 2—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.