Parse recently open sourced a server implementation that you can run on your own server using node.js. I’ll show you how to use nginx as a proxy to the local instance of your own Parse Server as well as what configuration is needed to serve your “API” over a secure connection.

I assume you already have the open source server of Parse installed and set up, if not, clone the it fron their git repository which you can find here.

The vhost config for nginx

# /etc/nginx/sites-enabled/
server {
       #listen 443;

       #ssl_certificate /etc/letsencrypt/live/;
       #ssl_certificate_key /etc/letsencrypt/live/;

       location / {
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;

It’s that simple, if you restart nginx now, it should act as a proxy to your Parse server and it should be available on (replace with your domain of course ;)). I highly encourage you to enable SSL as well, in the above example I used a certificate from Let’s Encrypt, the certificates are free and the setup is quick and painless. The actual path to the certificate will vary if you bought the certificate from a different company. In any case, simply remove the # and adjust the paths as needed, restart nginx and you should have the server up and running with SSL.