How to Install Magento Open Source on nixOS Latest

Magento Open Source is a free eCommerce platform that you can install on your server to create your online store. In this tutorial, we will guide you on how to install Magento Open Source on nixOS Latest using GitHub.

Prerequisites

Before beginning the installation process, make sure that you have the following prerequisites:

Step 1: Install Required Packages

First, you need to install some required packages that are necessary for the installation process of Magento Open Source. Start by updating your system using the following command:

sudo nixos-rebuild switch

Then, install the following packages:

sudo nix-env -i curl git openssh-server php nginx mariadb

Step 2: Install Composer

Composer is a dependency manager for PHP that you need to install to install Magento Open Source. You can install it using the following command:

sudo curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Step 3: Clone Magento Open Source Repository

Use git to clone the Magento Open Source repository from GitHub:

sudo git clone -b 2.4 git@github.com:magento/magento2.git

Step 4: Install Magento Open Source

Start the installation process by changing to the cloned directory:

cd magento2

Then, run the following command to install Magento Open Source:

sudo composer install

Step 5: Configure Magento Open Source

After installing Magento Open Source, you need to configure it to set up your store. Copy the .env.sample file to .env using the following command:

sudo cp .env.sample .env

Then, run the following command to configure Magento Open Source:

sudo bin/magento setup:install --base-url=http://example.com/ --db-host=localhost --db-name=magento --db-user=root --db-password=password --admin-firstname=admin --admin-lastname=admin --admin-email=admin@example.com --admin-user=admin --admin-password=password123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

You can replace the placeholders with your preferred values.

Step 6: Verify Magento Open Source Installation

Once the installation and configuration are complete, you can verify that Magento Open Source is installed and working by accessing the following URL in your web browser:

http://example.com/

Conclusion

You have now successfully installed Magento Open Source on nixOS Latest using GitHub. You can now start configuring your online store and sell your products online.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!