Welcome to this Magento 2 installation guide! This guide will help you install Magento 2 on your local machine using our CLI.
We created this guide to help you get up and running quickly. If you already have a Magento 2 instance for development, you can skip this guide.
Before you start, make sure you have the following tools installed:
- Node.js - Node.js installed.
- Magento Marketplace account - to get API credentials for your Magento instance.
This is a beta version of the CLI. If you encounter any issues, please report them on GitHub. Thanks for helping us make the CLI better!
Supported OS: MacOS, Linux, Windows (using WSL2) If you are using Windows, please proceed with the Manual Installation guide.
Installation using CLI is a quick and easy way to get your project up and running. It will install Vue Storefront and Magento 2 instance locally using Docker. It will also generate sample data for your store (optional).
The CLI will guide you through the installation process and ask you to provide the required information.
The CLI may take up to 10 minutes to complete the installation process. Please be patient.
npx @vue-storefront/cli m2-only
Under the hood, the CLI uses
markshust/docker-magento to install a Magento 2 instance locally using Docker.
When prompted, provide your Magento 2 API credentials. You can find/create your API credentials by following the Adobe Merchant Center - Magento 2 Access Keys guide.
◆ 🔐 Please provide your Magento access keys | ◆ 🔑 Magento access key: | <YOUR_MAGENTO_ACCESS_KEY> ◆ 🔒 Magento secret key | <YOUR_MAGENTO_SECRET_KEY>
When prompted, provide the URL of your Magento 2 instance:
◆ 🌐 Magento domain name | <YOUR_MAGENTO_DOMAIN_NAME>
This URL will be used to connect Vue Storefront to your Magento 2 instance - by default, the URL of the local Magento instance is
magento.test. Meaning that your Vue Storefront application can use the
https://magento.test/graphql endpoint to communicate with Magento 2.
The CLI will start installing Magento 2 instance locally using Docker. It will take a few minutes.
You will be asked to provide system administrator password to allow Docker to run commands on your machine.