How To Install Parse Server on Ubuntu 20.04 LTS

Install Parse Server on Ubuntu 20.04

In this tutorial, we will show you how to install Parse Server on Ubuntu 20.04 LTS. For those of you who didn’t know, Parse is an open-source Backend as a Service (BaaS) platform commonly used over the last few years. It is written in Node.js and can be used for any application running Node.js. Parse Server comes with a simple and easy-to-use web interface that can be used for data manipulation, to view analytics, and to schedule and send push notifications.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Parse Server on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Install Parse Server on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing Node.js.

Now add Node.js repository to your system:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs

Next, install a yarn package manager on your system. This will be used to install node modules:

npm install -g yarn

Step 3. Installing MongoDB.

By default, MongoDB is available in the Ubuntu 20.04 default repository. You can install it by running the following command:

sudo apt install mongodb-server

Step 4. Installing Parse Server on Ubuntu 20.04.

You can install the parse-server module using the Yarn package manager:

yarn global add parse-server

Then, create a Parse server configuration file and define the attributes of the parse server:

nano config.json

Add the following line:

{
  "appName": "My Parse Server App",
  "databaseURI": "mongodb://localhost:27017/parsedb",
  "appId": "KSDJFKASJFI3S8DSJFDH",
  "masterKey": "LASDK823JKHR87SDFJSDHF8DFHASFDF",
  "serverURL": "https://localhost:1337/parse",
  "publicServerURL": "https://0.0.0.0:1337/parse",
  "port": 1337
}

The configuration details are as follows:

  • appName: Set any name for your Parse server
  • databaseURI: Connection string to the MongoDB database
  • appID: Set a random string as appID, which will be used to connect the server.
  • masterKey: Set a random string for the master key.
  • serverURL: Set a URL for your parse server
  • publicServerURL: Set a public URL for your parse server
  • port: Indicate the server port

Save and close the file then start the parse server using the following command:

nohup parse-server config.json &

Step 5. Configure Parse Server Dashboard.

Parse server comes with a Dashboard for managing your Parse server applications. It is accessible through a web browser. Run the below command to install parse-dashboard:

yarn global add parse-dashboard

After that, create a configuration file for the parse dashboard:

nano parse-darshboard-config.json

Add the following file:

{
  "apps": [
    {
      "serverURL": "http://67.205.146.114:1337/parse",
      "appId": "KSDJFKASJFI3S8DSJFDH",
      "masterKey": "LASDK823JKHR87SDFJSDHF8DFHASFDF",
      "allowInsecureHTTP": "true",
      "appName": "MyApps"
    }
  ],
 "users": [
    {
      "user":"admin",
      "pass":"your-password"
    }
  ],
  "iconsFolder": "icons"
}

Save and close the file, then start the Parse dashboard with the following command:

nohup parse-dashboard --dev --config parse-darshboard-config.json &

Step 6. Configure Firewall.

We are using port 1337 for the parse server and 4040 for the dashboard. Run the following commands to allow access for public users for the Parse server. To open port type:

sudo firewall-cmd --permanent --zone=public --add-port=1337/tcp
sudo firewall-cmd --permanent --zone=public --add-port=4040/tcp
sudo firewall-cmd --reload

Step 7. Accessing Parse Server Dashboard.

Once successfully installed, you can also access the parse server dashboard by visiting the URL http://your-server-ip-address:4040 in your web browser. You should see the following screen:

Install Parse Server on Ubuntu 20.04

Congratulations! You have successfully installed Parse. Thanks for using this tutorial for installing the Parse Server on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Parse Server website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!