NodeJS + MongoDB Web Server Raspberry Pi Tutorial

How to Install a NodeJS Web Server using Mongo DB on your Raspberry Pi

1. Install NVM (Node Version Manager)

2. Update Bash Profile

This will give you the ability to install NodeJS versions (comes with npm).

3. Install a NodeJS Version

Using NVM, we will install NodeJS and be able to access node and npm commands.

4. Check Installations

Verify that you have done the previous steps below.

5. Install MongoDB, Create Database, and Update config/database.js localUrl

Now we will install MongoDB so that you can have a Mongo Database on your Raspberry Pi.

Now you have to update your database config file for the directory we just created in /data/db.

This is what my ~/projects/node-todo/config/database.js file looks like:

6. Grab Node-ToDo files from Github

This is a beginner project created by

7. Install Packages

Install the node packages via npm. This may take a minute or two so go grab a coffee. 🙂

8. Edit Config and Startup the Server!

9. View Your Application

10. I can’t find my IP Address…

You want the first IP address shown after inet addr. Mine is You can now head to http: to view your application!

In the terminal, you should see all HTTP requests to your Raspberry Pi.


Please comment below if you would like to see more tutorials like this, or have any questions!

1 Response

  1. RPi Admin says:

    Please feel free to comment if you would like to see more tutorials (advanced or similar)!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.