Ecommerce Blog Filters
Picture for blog post GrandNode and MongoDB in a 3 minutes - the fastest installation with Docker

GrandNode and MongoDB in a 3 minutes - the fastest installation with Docker

Created on:  21.03.2018

Few days ago I described you how to create a DigitalOcean droplets and how to install GrandNode and MongoDB with Docker on them. It was easy way, but you need to spend some time with it. Today, I will show you how to install GrandNode and MongoDB just in a 3 minutes. It's one of the fastest way to install GrandNode!

How to create an account and Droplet?

It's very simple process. I've described it in our earlier tutorial. You can check it here. 

How to install GrandNode?

Now let's begin the journey. In the previous tutorial, you learned how to install GrandNode and MongoDB in different droplets. It was easy, but you need to make some customizations to secure your mongodb. Today I will show you how to create a single droplet with multiple docker containers. 

Please login to your DigitalOcean droplet with your new account. Please remember to install Droplet with One-Click app - Docker. It's required! 

If you installed your droplet, open the cmd or console and let's start the installation process. Use the following command to install MongoDB on your server. 

docker run -d -p --name mongodb mongo

Docker run MongoDB

It will pull the newest image of mongo. 

Now let's install GrandNode and link it to installed MongoDB.

docker run -d -p 80:80 --name grandnode --link mongodb:mongo grandnode/release_4.10

Docker run GrandNode

Where grandnode is the name of your container, you can name it by yourself and where mongodb is a name of your mongodb container.

And that's all. Open the website with the droplets IP and install GrandNode. During installation, as the name of MongoDB server use the name of your mongodb container (in my case it's mongodb).

It's really one of the simplest and the fastest way of installing GrandNode. 

Leave your comment


4/14/2018 7:23 PM
I like the tutorial. I have successfully installed. But i want to copy code from local to docker container. I have a problem:
- Command line "docker cp" cannot copy file to host and return message "Could not find the file [path] in container [container_name]".
Can anyone support me?
Many Thanks,
4/17/2018 2:40 PM
Hi Duy,

docker cp command is used to copy files from host to container. Probably you are trying to copy file from local computer to host, what's impossible to do.
4/17/2018 8:33 PM
Hello, i was trying to run grand node via docker on windows 10
i have followed all instructions here

and i have image running on docker but when i navigate to as mentioned
i get no response i have also tried other ips like local ip of listed from ipconfig command but in vain ,any help?
4/18/2018 8:27 AM
Hello Hassan,

What did you set in the docker run command? If you want to run it locally, you should use for example:

If you used something different, you won't be able to connect with it.

You can also look at this article. It may be useful for you:

9/25/2018 4:39 AM
great tool.  docs are helpful (including the write up on this page).  I needed to change the port so I ran
"docker rm <my name>"
//which stopped and removed the instance of GN
//then i ran
"docker run -d -p<my new port>:80 --name <reused the same name for my last GN instance> --link <the existing mongo instance with data I setup a few minutes ago and want to keep>:mongo grandnode/release_4.20"
// but now I am taken to the install page which give me an error that a mongo DB already exists...  how to connect to an exiting DB?  I get this 'This database already exists and has GrandNode installed on it. Choose different database.'  Any advice on how to connect a new GN web server instance to an existing mongo db instance?
9/25/2018 4:41 AM
**how to connect to an existing DB?
9/25/2018 12:06 PM
it means that you've already installed GrandNode inside this database. So you need change the database name or modify Settings.txt file inside App_Data directory in your GrandNode.
2/18/2019 10:10 AM
I have an issue in first step in your tutorial:
When I try to excuse this command:
docker run -d -p --name mongodb mongo
it says:
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container

Any suggestion?
back to top