Ecommerce Blog Filters
Picture for blog post How to install GrandNode - step by step guide for Linux, Windows, MacOS, Raspberry PI

How to install GrandNode - step by step guide for Linux, Windows, MacOS, Raspberry PI

Created on:  04.10.2019

From A to Z Installation Guide for GrandNode

PLEASE NOTE THAT THE INSTALLATION GUIDE IS FOR GRANDNODE 2.0.

List of content

1. General overview

GrandNode 2.0 is the most advanced open-source e-commerce platform based on ASP.NET Core and MongoDB. It's a versatile e-commerce platform designed for the majority of online businesses, with out of the box features like multi-tenant, multi-vendor, multi-store, memberships and subscriptions, B2B features and many, many more.

GrandNode System Requirements


Before we start describing the installation processes please be sure that you meet GrandNode system requirements.
First of all let’s start with the supported browsers because without browser you won’t be able to see the GrandNode.
We support the latest released and stable browsers, such as:
- Mozilla Firefox
- Google Chrome
- Microsoft Edge
- Opera
- Safari

Windows System Requirements


GrandNode with .NET Core 6.0 version can be installed on the following versions:
- Windows 10 (version 1607+)- Windows 11
- Windows Server 2016+

To install GrandNode with success you will need to install a database server also, we support:
- MongoDB 4.00 or above

Finally, to run it on a Windows Server, you need to have:
- IIS at least in version 8.0 or above

If you are a programmer, you will have to install Microsoft Visual Studio 2022 with installed .NET Core 6.0 libraries.

Linux System Requirements


Below you will find the complete list of supported operating systems:
- Red Hat Enterprise Linux, CentOS, Oracle Linux – 7 – x64
- Fedora – 29, 30 – x64
- Debian – 9+ – x64, ARM32, ARM64
- Ubuntu – 18.04, 20.04 – x64, ARM32, ARM64
- Linux Mint – 18+ – x64
- openSUSE – 15+ - x64
- SUSE Enterprise Linux (SLES) – 12 SP2+ -x64
- Alpine Linux – 3.8+ - x64, ARM64

If you have the operating system installed, it’s time to install the server. We recommend to use the following one:
- nginx 1.14.0

If you want to host the MongoDB on the same server, you need to install MongoDB server – at least MongoDB 4.0 or higher.

macOS System Requirements


It’s possible to install GrandNode on Mac OS X. It’s dedicated mostly for developers, here is the supported operating system version:
- Mac OS X in version 10.13+ - x64

On Mac OS you will have to download also Visual Studio for Mac with .NET Core SDK for Mac. Download Visual Studio. https://www.visualstudio.com/vs/visual-studio-mac/


2. Manual Installation

Linux Installation from source code


Manual installations are always more tricky than the automated ones, but with our installation guide, you will master this process for good. Please note that in this guide, we're using the newest version of GrandNode with ASP.NET Core 6.0. It's still in the development process, but it will be released at the end of the year, so we've decided to create the installation guide only for the updated version. If you have problems with older versions of GrandNode. Please let us know in the comments or write a post on the community forum.

This part will cover How to run GrandNode on Ubuntu 20.04, if you want, we are looking for contributors who prepare guides for other distributions of Linux. Let’s start from the beginning. Of course, I suppose that you have running Ubuntu 20.04. Open the command line and let’s roll the magic. In the first step, you will learn how to download GrandNode from GitHub.
In the command line, please enter the following commands:

mkdir ~/source
cd ~/source
git clone - b x.x.x https://github.com/grandnode/grandnode2.git

In the x.xx place, please enter the current version of GrandNode. The number for the newest release can be found in GrandNode release notes. 
This command will clone the latest stable version of GrandNode. Please note that you can always download the latest development version of GrandNode, if you are a developer and want to contribute in our project, just remove the parameters from the command above and use the: git clone https://github.com/grandnode/grandnode2.git
In the next step, we will install the latest version of Nginx. We will use it to host GrandNode.

How to install Nginx on Ubuntu 20.04, probably it's your next question. The best information for you is that Nginx comes with Ubuntu’s default repositories, so we can install it with the apt packaging system. Just update your local package index and install it with:

sudo apt update
sudo apt install nginx

And that’s all. Simple. Now it’s time to create our development environment.

Let’s install the ASP.NET Core 6.0.

wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Above steps are done only once per machine, so if you have done it previously you don’t have to do it again.
Now we will install the .NET SDK, but first we want to update the products available for installation:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get install dotnet-sdk-6.0

Now it’s time to prepare a directories for our website. We need to create the main catalog for GrandNode, to perform that, please use the following command:

mkdir /var/webapps

Now it’s time to run our magic and run GrandNode. We need to go to our application’s root directory. We will be able to pull in/download all the required NuGet packages, let’s do that now.

cd ~/source/grandnode
dotnet restore GrandNode.sln

You can take a sip of coffee, it may take a while. After that action, we can continue our spells. Provide the following code:

sudo dotnet build src/Plugins/Authentication.Facebook && sudo dotnet build src/Plugins/Authentication.Google && sudo dotnet build src/Plugins/DiscountRules.Standard && sudo dotnet build src/Plugins/ExchangeRate.McExchange && sudo dotnet build src/Plugins/Payments.BrainTree && sudo dotnet build src/Plugins/Payments.CashOnDelivery && sudo dotnet build src/Plugins/Payments.PayPalStandard && sudo dotnet build src/Plugins/Shipping.ByWeight && sudo dotnet build src/Plugins/Shipping.FixedRateShipping && sudo dotnet build src/Plugins/Shipping.ShippingPoint && sudo dotnet build src/Plugins/Tax.CountryStateZip && sudo dotnet build src/Plugins/Tax.FixedRate && sudo dotnet build src/Plugins/Widgets.FacebookPixel && sudo dotnet build src/Plugins/Widgets.GoogleAnalytics && sudo dotnet build src/Plugins/Widgets.Slider && sudo dotnet publish src/Web/Grand.Web -c Release -o /var/webapps/grandnode

Pretty long, but this simple && characters, will run your commands one by one, it will save your time and automate this process a little. The last command is used to copy the compiled version of GrandNode to our application directory, created in the previous step.

Please note, sometimes you can face problems with pasted commands execution. In that case, please rewrite the command manually. In most cases, it does the trick and executes commands.

Let’s wait with the fireworks, it’s time to give proper permissions to our user and that user will run our service:

sudo chown –R www-data:www-data /var/webapps/grandnode

Now it’s time to automate the whole process. We need to create a systemd file, to create a daemon (service) init script, we will use VIM:

sudo vi /etc/systemd/system/grandnode.service

And below is prepared an example service file, you can copy it and use:

[Unit]
Description=GrandNode 2.0

[Service]
WorkingDirectory=/var/webapps/grandnode
ExecStart=/usr/bin/dotnet /var/webapps/grandnode/Grand.Web.dll
Restart=always
RestartSec=10
SyslogIdentifier=dotnet-grandnode
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

Press ESC and enter :wq to save changes and exit from the editor. After successful creation, we need to enable and start service:

sudo systemctl enable grandnode.service
sudo systemctl start grandnode.service

Now the most tricky part. Everything works fine, but we are not able to connect with our GrandNode from our computer. The reason is simple, GrandNode is running locally on our machine on port 5000. In this example, we will present the simplest way of reverse-proxy traffic to your application. It will forward traffic from port 80 to your local machine on port 5000.
Open the nginx configuration with VIM or favourite text editor:

sudo vi /etc/nginx/conf.d/default.conf

The simplest way is to replace the content of file, delete current content and paste this one:

server {
listen 80;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

As before, press ESC and write :wq to exit and save changes. With the VIM editor open next file – proxy.conf to configure it.

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;

As previous, exit and save changes. By default we won’t be able to use this file, we need to include it to the general nginx config. Open following file:

sudo vi /etc/nginx/nginx.conf

Below the http { line paste the following code include /etc/nginx/proxy.conf, as it’s shown below.

Nginx configuration file

In the same file, we can make one thing to improve GrandNode performance. Please look for the commented section "GZIP Settings". Just remove all # marks from the beginnings of the lines. It will allow us, to use the gzip compression for GrandNode.

Save changes as earlier. Now check the Nginx configuration with the following command:

sudo nginx –t

If everything is ok, you will be able to reload the Nginx configuration. You can do it by running:

sudo systemctl reload nginx.service

Let’s install last packages, firstly we will install the missing libgdiplus package, run the following command:

sudo apt-get –y install libgdiplus && sudo ln -s /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so

Now it’s time to manage how to install MongoDB on Ubuntu. MongoDB installation process is based on the official MongoDB installation guide. And this way of installation is highly recommended.
Import the public key used by the package management system, you can do it by running the following command:

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

Now we need to create a list file for MongoDB, it’s appropriate for Ubuntu 20.04:

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

The installation process is very simple, we need to run two commands:

sudo apt-get update && sudo apt-get install -y mongodb-org=4.4.1 mongodb-org-server=4.4.1 mongodb-org-shell=4.4.1 mongodb-org-mongos=4.4.1 mongodb-org-tools=4.4.1

After successful installation we will be able to enable and start it:

sudo systemctl enable mongod.service && sudo systemctl start mongod.service

Everything is done, so now it's time to run GrandNode! Open the IP of your server and you will see the installation screen of GrandNode. Provide the necessary information, such as:
- Admin e-mail and password
- Mark the checkbox if you want to install sample data
- Fill the server name, by default its localhost:27017,
- Enter the name of the database and finally leave the username and password fields empty.
- Specify also the Collation

Linux installation without source code

This way of installation is the faster one and is recommended for non-developer users. At this point, we won't use the source code of GrandNode, so we won't have to build a solution, build plugins and publish them, we will just learn how to install Nginx, how to run MongoDB and how to install GrandNode.

I assume that you've created your machine, in my case, it will be Ubuntu 20.04, so we will learn how to run GrandNode on Ubuntu 20.04. Let's start with the Nginx installation. As it was provided in the previous way of installation. Nginx comes with the default package in Ubuntu. So to install it, just run the following commands:

sudo apt update
sudo apt install nginx

Counter is running, so we have to speed up, to perform the fastest way of GrandNode installation. Now, let's install the MongoDB server to enable data storage. Add the keys of MongoDB package and create list file with:

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - && echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

As previously, we will use the combined commands with &&. Update packages and install MongoDB on Ubuntu

sudo apt-get update && sudo apt-get install -y mongodb-org=4.4.1 mongodb-org-server=4.4.1 mongodb-org-shell=4.4.1 mongodb-org-mongos=4.4.1 mongodb-org-tools=4.4.1

It will install MongoDB and you will be able to enable and start service. 

sudo systemctl enable mongod.service && sudo systemctl start mongod.service

We've installed nginx, we've installed MongoDB and now it's time to install .NET Core 6.0, without it, we won't be able to run GrandNode. Following commands have to be done only once per machine:

wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Let's download .NET Core. 

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get install dotnet-runtime-6.0

Everything should be done without problems, so now it's time to download the latest version of GrandNode. To perform that, we will use the standard command:

wget https://github.com/grandnode/grandnode2/releases/download/2.1.0/GrandNode2-2.1.0_NoSource.zip

Now it's possible that we have to install missing packages for unzipping, if you have it, just skip that step. Install it:

sudo apt-get install unzip

Now, let's unpack the GrandNode package.

unzip GrandNode2-2.1.0_NoSource.zip -d /var/webapps/grandnode

Remove zip package with:

sudo rm GrandNode2-2.1.0_NoSource.zip

We're almost done! To provide more automation to our application, we will create service for GrandNode, to achieve that, create the service file:

sudo vi /etc/systemd/system/grandnode.service

Then inside it, please paste the following content:

[Unit]
Description=GrandNode 2.0

[Service]
WorkingDirectory=/var/webapps/grandnode
ExecStart=/usr/bin/dotnet /var/webapps/grandnode/Grand.Web.dll
Restart=always
RestartSec=10
SyslogIdentifier=dotnet-grandnode
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

Press ESC and enter :wq to save changes and exit from the editor. After successful creation, we need to enable and start service:

sudo systemctl enable grandnode.service
sudo systemctl start grandnode.service

Let's assing correct permissions to our GrandNode directory with:

sudo chown -R www-data:www-data /var/webapps/grandnode

Now the most tricky part. Everything works fine, but we are not able to connect with our GrandNode from our computer. The reason is simple, GrandNode is running locally on our machine on port 5000. In this example, we will present the simplest way of reverse-proxy traffic to your application. It will forward traffic from port 80 to your local machine on port 5000.
Open the nginx configuration with VIM or favourite text editor:

sudo vi /etc/nginx/conf.d/default.conf

The simplest way is to replace the content of file, delete current content and paste this one:

server {
listen 80;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

As before, press ESC and write :wq to exit and save changes. With the VIM editor open next file – proxy.conf to configure it.

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;

As previous, exit and save changes. By default we won’t be able to use this file, we need to include it to the general nginx config. Open the following file:

sudo vi /etc/nginx/nginx.conf

Below the http { line paste the following code include /etc/nginx/proxy.conf, as it’s shown below.

Nginx configuration file

In the same file, we can make one thing to improve the loading speed of GrandNode. Please look for the commented section "GZIP Settings". Just remove all # marks from the beginnings of the lines. It will allow us, to use the gzip compression for GrandNode. Save changes as earlier. Now check the nginx configuration with the following command:

sudo nginx –t

If everything is ok, you will be able to reload the Nginx configuration. You can do it by running:

sudo systemctl reload nginx.service

The last thing, that we should do is to enable the firewall, run the following commands:

ufw enable
ufw allow www

And open your website! We're done! Everything is done, so now it's time to run GrandNode! Open the IP of your server and you will see the installation screen of GrandNode. Provide the necessary information, such as:
- Admin e-mail and password
- Mark the checkbox if you want to install sample data
- Fill in the server name, by default its localhost:27017,
- Enter the name of the database and finally leave the username and password fields empty.
- Specify also the Collation

Windows installation without source code


Before start, you should download GrandNode from download page

We won't cover the whole stuff related to configuring the IIS Sites.

  • Install the .NET Core Hosting Bundle on Windows Server.
  • Install the MongoDB Server
  • Create an IIS site in IIS Manager.
  • Deploy GrandNode

When you successfully downloaded the No Source (Web) version, you are able to upload it to your server. Basically, no source version is a ready-to-use pre-compiles version of GrandNode. 

Upload GrandNode files

In the next step, you should upload downloaded files to your server. To do this, you will need an FTP connection that will allow you to transfer files between computers, or use the RDP to download GrandNode directly to your server.

Install GrandNode

It's the same process as always. Just fill the necessary fields and press the install button.

Docker installation


Docker installation is very simple. Basically it can be wrapped into two commands. We will use two different docker containers for GrandNode and MongoDB and then, we will link MongoDB to our e-commerce platform.

Let's start with the first command, I assume that you have Docker installed and running. First thing will be a MongoDB container installation, to perform that action, you should use the following command:

docker run -d -p 127.0.0.1:27017:27017 --name mongodb mongo

It will install MongoDB, please remember the name of your container, because it will be used as a MongoDB server name. In the next step, we will download the latest developed version of GrandNode and link installed MongoDB with it. You can do it with:

docker run -d -p 80:80 --name grandnode --link mongodb:mongo grandnode/grandnode2:latest

Now take your server address and jump into the browser, paste the IP address, and check if it works. It should open the installation screen of GrandNode. Provide the necessary information, such as:
- Admin e-mail and password
- Mark the checkbox if you want to install sample data
- Fill the server name, it's your name of MongoDB container, provided in the previous steps,
- Enter the name of the database and finally leave the username and password fields empty.
- Specify also the Collation

Please note, that command used above will download the latest development version of GrandNode. So it's an unsupported version, recommended only for C# developers. If you want to download the latest stable version of GrandNode please use the following command, where x.x.x is a number of GrandNode release:

docker pull grandnode/grandnode2:x.x.x

If you don't know which number you should enter in that place, check the GrandNode release notes.

4. How to install GrandNode on Mac?

It's normal that this type of installation is used only by passionate and developers. The single-user probably would choose the Linux or Windows servers. It's a logical point of view. But as you know, GrandNode is an open-source cross-platform solution, so it's possible to develop it also on Mac OS. Please check the MacOS system requirements, Let's start with the ASP.NET Core 6.0 SDK installation. To get the newest package of ASP.NET Core, please go to the official Microsoft website and download it from the following address:

https://dotnet.microsoft.com/download/dotnet/6.0

Please note that it's already installed with the newest version of Microsoft Visual Studio for Mac, so if you keep this software up-to-date, probably you have it installed and you can go to the next step. If not, please install the mentioned SDK.

First of all, please download the newest version of GrandNode with source code. You will get the package with an application, please extract the package and open the GrandNode.sln file:

GrandNode on Mac OS

As I mentioned in the previous chapters of this guide, in the GrandNode installation tutorial, we used the newest development version, due to ASP.NET Core 6.0 implementation. If you want to install the previous version, reach us and ask for help.

4. Common issues during the installation process

Commands that I've pasted don't work


It's pretty often an issue. If some of the commands that I've used in this guide don't work, for example:
- You've tried to use sudo chown –R www-data:www-data /var/webapps/grandnode and it failed, that means that you should try to enter this command manually.

5. Have more complicated requirements?

GrandNode can be a scalable e-commerce software with Redis Server, Load Balancers, CDN servers with MongoDB replication. We know that this process may be frustrating and problematic. We are here to bring your ideas to life. You can always base on our experience and knowledge. If you don't have time or resources, it's the best time to send us a message, we will install GrandNode in any configuration for you with pleasure!

Leave your comment

Comments

Ahmed
5/24/2020 11:07 AM
Linux installation does not gos smoothly during the steps beside its not update  
Patryk
5/25/2020 11:43 AM
If you facing problems with installation, please post the question on the community forum. Cheers.
Hamun
8/6/2020 9:09 AM
you will have to update /etc/nginx/sites-available/default instead of /etc/nginx/default.conf and restart nginx
Ümit
12/8/2020 6:58 AM
Is there any way to transfer files with Filezilla Pro ?
Patryk
12/8/2020 7:33 AM
Hi, sure. You need to configure an FTP connection, depending on your operating system.
val
12/19/2020 8:49 AM
Hi,
Just some stuff from my experience during installation:
first, depending on your Ubuntu distribution, you might install software-properties-common package before you can run add-apt-repository universe.
Then, depending on how you installed nginx, you might modify the /etc/nginx/sites-available/default instead of .../conf.d/default.conf    

Cheers!
Patryk
12/21/2020 7:36 AM
HI Val!

Thanks for your feedback. We will modify the tutorial and attach your thoughts.
Antonio
6/14/2021 2:24 AM
I am getting this error: A timeout occured after 30000ms selecting a server using CompositeServerSelecto....
I followed "Linux installation without source code". I am able to connect to MongoDb from my local machine using Robo 3T so I don't think that there is an issue with MongoDb connectivity

a side note: I had to make the following changes to get the install screen :
1. Content of default.conf should instead be placed in /etc/nginx/sites-available/default
2. mkdir /var/webapps is missing in this section (to be placed before unzip the deployment code)
Romme
6/15/2021 10:07 PM
Hello,
i just took a digitalocean droplets, i arrive to the page of grandnode installation, which ask me for the MongoDB serveur, but i have no information about that for now; if you have an idea without create another droplet of 5$ for mongodb ?
Tomasz
6/16/2021 7:29 AM
Have you tried that one mentioned in the above tutorial?
>>Fill the server name, by default its localhost:27017
Romme
6/17/2021 8:33 AM
It's ok, thanks.
Serdar
1/22/2022 11:36 AM
1- Before installing nginx, you should use cd to change directory
cd
sudo apt update
sudo apt install nginx

2 - cd ~/source/grandnode --> cd ~/source/grandnode2
Liviu
5/2/2022 3:43 PM
I tried to install it with OLS but I never manage to make it work. Would be useful a tutorial for those who use OSL instead of NGINX.
Alex
10/10/2022 12:57 PM
Can I install using apache2 instead nginx and follow the same steps?
Diego
3/13/2024 5:55 PM
I follow the docker installation steps with success , but when I try to run http://localhost/, I'm given an error with ERR_EMPTY_RESPONSE.
Both dockers are running.
What can I do?
back to top
Filters