Skip to main content

Set up a Magento Open Source Development Store

Magento Open Source is the free, open-source version of Adobe Commerce (formerly known as Magento 2) and is a good option for merchants or agencies that want to test their Bold Checkout integration.

This document outlines the basic requirements and instructions for setting up a Magento Open Source development store locally, using Magento version 2.4.6.

Prerequisites

Installation

The following instructions outline the steps for running a Magento Open Source development store locally:

  1. Create an account in the Adobe Commerce Marketplace.

  2. Get your Adobe Commerce authentication keys.

  3. Open your preferred command line interface. This guide includes commands formatted for the Terminal command line on Mac.

  4. Create and open a folder for your store using the following command:

    mkdir m2.4-dev && cd m2.4-dev
  5. Clone the Magento repository using the following command:

    curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
    note

    This repository is a popular Docker-based development environment for Magento Open Source. This repository is not managed or formally endorsed by Bold Commerce.

  6. Download and set up Magento 2.4.6.

    1. Run the following command:

      bin/download 2.4.6 community
      note

      Refer to the Troubleshooting section for help with any errors that arise from running this command.

    2. When prompted to enter your username|password, provide your Adobe Commerce credentials in the format public_key|private_key.

  7. Connect your port forwarding service to Magento Open Source.

    1. Run the following command:
      bin/setup {tunnel_domain}
      For example, if your tunnel_domain is john-doe.adobetest.com, then you would run the following command:
      bin/setup john-doe.adobetest.com
    2. Input your system password when prompted.
  8. Remove your domain from the hosts file on your machine in order to route through your port forwarding service.

    1. Open the hosts file using the following command:
      code /etc/hosts
    2. Remove the line with your domain. Save and close the file.
  9. Disable two-factor authentication on your admin login. Run the following command:

    bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth && bin/magento module:disable Magento_TwoFactorAuth
    note

    This step is necessary to access admin settings from the command line.

  10. Add test data to your store using the following command:

    bin/magento sampledata:deploy && bin/magento setup:upgrade

Troubleshooting

This section includes information about how to resolve several common errors during the installation process.

Port is already allocated

Error:

Error response from daemon: driver failed programming external connectivity on endpoint……….port is already allocated.  Failed to start Docker services

Troubleshooting steps:

  1. Run bin/removeall to remove other containers on the same port.
  2. Run bin/download 2.4.6 community again.

SSL certificate problem

Error:

SSL certificate problem: unable to get local issuer certificate

Troubleshooting steps:

  1. Turn off VPN or other internet filtering software.
  2. Run bin/removeall.
  3. Run bin/download 2.4.6 community again.

Unexpected Value Exception

Error:

[UnexpectedValueException] ‘/var/www/html/vendor/composer/tmp-58a8acb411b99b6d5a14cec052698eb1’ is not a zip archive.

Troubleshooting steps:

  1. Run composer clear-cache.
  2. Run composer global update.
  3. Run bin/removeall.
  4. Run bin/download 2.4.6 community again.