Vue Storefront is now Alokai! Learn More
Magento Installation

Magento Installation

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.

Prerequisites

Before you start, make sure you have the following tools installed:

Installation using CLI

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!

Installation steps

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 Alokai 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.

1

Run CLI to create a new project

npx @vue-storefront/cli m2-only

Under the hood, the CLI uses markshust/docker-magento to install a Magento 2 instance locally using Docker.

2

Enter project name

When prompted, enter the name of your project. This name will be used as a directory name for your project.

ā”Œ Welcome to Vue Storefront 2 CLI! šŸ’š
|
ā—†  šŸš€  Please provide a name for the Magento 2 directory
|  magentolocal

Avoid using special characters and spaces in the project name.

3

Provide Magento 2 API credentials

When prompted, provide your Magento 2 API credentials. You can create them by following the Get your authentication keys guide.

If you're logged in to your Adobe marketplace account, go to Adobe Merchant Center - Magento 2 Access Keys page, to generate the access keys.

When you see following prompt, enter your public and private key information.

ā—† šŸ” Please provide your Magento access keys
|
ā—† šŸ”‘ Magento access key:
| <YOUR_MAGENTO_PUBLIC_KEY>
ā—† šŸ”’ Magento secret key
| <YOUR_MAGENTO_PRIVATE_KEY>

4

Provide Magento 2 instance URL

When prompted, provide the URL of your Magento 2 instance:

ā—† šŸŒ Magento domain name
| <YOUR_MAGENTO_DOMAIN_NAME>

This URL will be used to connect Alokai to your Magento 2 instance - by default, the URL of the local Magento instance is magento.test. Meaning that your Alokai 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.

5

Generate sample data (optional)

When prompted, select the option to generate sample data:

ā—† šŸ›’ Do you want to generate sample data for the store?
| > Yes / No

6

Congratulations! šŸŽ‰

You have successfully installed Magento 2 instance locally. You can now access connect your Alokai application using your instance's base URL and GraphQL URL. šŸš€