This guide walks you through deploying your own Parse Server on a Virtual Private Server (VPS). By the end, you’ll have a self-hosted backend for your mobile or web apps, including the Parse Dashboard for management, all under your control. You’ll need a VPS with Ubuntu 22.04 or 20.04, a domain name (optional but recommended for HTTPS), and basic comfort with the command line.
What You’ll Need
- A VPS with Ubuntu 20.04 or 22.04 (1 GB RAM minimum, 2 GB recommended)
- Root or sudo access to the server
- A domain name pointing to your server’s IP (for SSL)
- SSH client (Terminal on macOS/Linux, PuTTY on Windows)
- Node.js 14 or later and npm installed on the VPS
- MongoDB 4.4 or later (or PostgreSQL) – we’ll install MongoDB
Step-by-Step
- Update the system and install dependencies. SSH into your VPS and run:
sudo apt update && sudo apt upgrade -y sudo apt install -y curl git build-essential - Install Node.js and npm. Use the NodeSource repository for a recent version:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejsVerify with
node -vandnpm -v. - Install MongoDB. Import the MongoDB public key and add the repo:
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list sudo apt update sudo apt install -y mongodb-orgStart and enable MongoDB:
sudo systemctl start mongod sudo systemctl enable mongod - Create a project directory and install Parse Server.
mkdir ~/parse-server && cd ~/parse-server npm init -y npm install parse-server parse-dashboard - Create a configuration file. Create
index.jsin the project directory with the following content (replaceYOUR_APP_ID,YOUR_MASTER_KEY, andYOUR_DASHBOARD_PASSWORDwith strong random strings):const ParseServer = require('parse-server').ParseServer; const ParseDashboard = require('parse-dashboard'); const server = new ParseServer({ databaseURI: 'mongodb://localhost:27017/parse', cloud: './cloud/main.js', appId: 'YOUR_APP_ID', masterKey: 'YOUR_MASTER_KEY', serverURL: 'http://localhost:1337/parse', publicServerURL: 'https://yourdomain.com/parse', // use http if no SSL }); const dashboard = new ParseDashboard({ apps: [{ serverURL: 'https://yourdomain.com/parse', appId: 'YOUR_APP_ID', masterKey: 'YOUR_MASTER_KEY', appName: 'MyApp', }], users: [{ user: 'admin', pass: 'YOUR_DASHBOARD_PASSWORD', }], }, { allowInsecureHTTP: false }); const express = require('express'); const app = express(); app.use('/parse', server); app.use('/dashboard', dashboard); app.listen(1337, () => { console.log('Parse Server running on port 1337.'); }); - Create the cloud code directory. Make a folder named
cloudand add an emptymain.jsfile:mkdir cloud touch cloud/main.js - Test the server. Run
node index.jsand check that it starts without errors. Open another SSH session and test with:curl http://localhost:1337/parse/healthYou should see a JSON response with
{"status":"ok"}. - Set up a process manager (PM2). Install PM2 globally and start your server:
sudo npm install -g pm2 pm2 start index.js --name parse-server pm2 save pm2 startupThe
pm2 startupcommand will output a command to run with sudo; do that to ensure PM2 starts on boot. - Configure a reverse proxy with Nginx (for HTTPS and port 80/443). Install Nginx:
sudo apt install -y nginxCreate a config file
/etc/nginx/sites-available/parsewith:server { listen 80; server_name yourdomain.com; location /parse { proxy_pass http://localhost:1337/parse; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } location /dashboard { proxy_pass http://localhost:1337/dashboard; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }Enable the site and restart Nginx:
sudo ln -s /etc/nginx/sites-available/parse /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx - Secure with SSL (Let’s Encrypt). Install Certbot:
sudo apt install -y certbot python3-certbot-nginx sudo certbot --nginx -d yourdomain.comFollow the prompts. Certbot will auto-renew via a systemd timer.
- Update your Parse Server config to use HTTPS. Edit
index.jsand replacehttp://localhost:1337withhttps://yourdomain.comin bothserverURLand the dashboard’sserverURL. Restart PM2:pm2 restart parse-server - Test the public endpoints. Visit
https://yourdomain.com/parse/healthin a browser – you should see the JSON response. Also checkhttps://yourdomain.com/dashboardand log in with your admin credentials.
Common Mistakes
- Using weak or default keys – always generate strong random strings for appId and masterKey.
- Forgetting to update the serverURL after adding SSL – the dashboard and client SDKs need the public URL.
- Not enabling MongoDB to start on boot – it will stop after a reboot.
- Blocking port 1337 in the firewall – if you use Nginx, you only need ports 80 and 443 open; keep 1337 closed.
- Running Parse Server as root without PM2 – use a non-root user and PM2 for better security and uptime.
Tips
- Use a dedicated domain or subdomain for your Parse Server to avoid cookie and CORS issues.
- Set up regular backups of your MongoDB database using
mongodump. - Enable MongoDB authentication if your server is public – edit
/etc/mongod.confand create a user. - Monitor your server with
pm2 monitand set up alerts for high CPU/RAM. - Keep your Node.js and Parse Server versions updated to get security patches.
Troubleshooting
- Health check returns 404: Check that Nginx is proxying correctly – test with
curl http://localhost:1337/parse/healthon the server. If that works, the issue is Nginx config – check for typos and reload. - MongoDB won’t start: Run
sudo systemctl status mongodto see errors. Common fixes: ensure the data directory exists and has correct permissions, or check disk space. - Dashboard shows “Cannot GET /dashboard”: Ensure you have the dashboard mounted in Express and that Nginx proxies the path. Also check that your browser isn’t caching an old response.
- SSL certificate fails: Make sure your domain resolves to your server’s IP before running Certbot. Also check that port 80 is open.
- Parse Server crashes on startup: Look at the PM2 logs (
pm2 logs parse-server). Common issues include missing cloud/main.js or incorrect MongoDB URI.
Frequently Asked Questions
Can I use PostgreSQL instead of MongoDB?
Yes, Parse Server supports PostgreSQL as a database. You’ll need to install PostgreSQL and set the databaseURI to something like postgres://user:pass@localhost:5432/parse.
How do I connect my app to this Parse Server?
In your client SDK, set the server URL to https://yourdomain.com/parse and use the same appId and masterKey (masterKey only on the server). For example, in JavaScript: Parse.initialize('YOUR_APP_ID'); Parse.serverURL = 'https://yourdomain.com/parse';
Is it safe to expose the Parse Dashboard publicly?
It’s safer to restrict access via a VPN or IP whitelist. At minimum, use a strong password and enable HTTPS. You can also add basic auth in Nginx.
How do I update Parse Server later?
Stop the server (pm2 stop parse-server), run npm update parse-server in the project directory, then restart with pm2 start parse-server.
Can I run multiple apps on one Parse Server?
Yes, you can configure multiple apps in the dashboard and use different appId and serverURL paths, but each app needs its own database or collection prefix.
What should I do if I forget the master key?
You can change it in the index.js file and restart the server. Clients will need to be updated with the new key.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Secure Boot Battlefield 6 ASUS: Fix & Enable Guide
- Best Tech Websites to Follow for Pros & Beginners
- Second Wind Quest Walkthrough: Where Winds Meet6.00 min/km
- Enshrouded Weapon Upgrade Guide: How to Improve Gear5.00 min/km
- Connect Phone to Controller for Cloud Gaming
- Python Search Highlighting: Snippets & Matches