Logo
  • Posts
  • Talks
  • Hire me (only long term missions)!
  • Contact
January 29, 2016
Julien Renaux
Back End, Tools, Tutorials
100

Complete Parse Server migration guide

PreviousNext

Learn how to transfer your Parse data and run Parse server on your own infrastructure in less than an hour.

ParseCloud

Table of Contents

  • Prerequisites
  • Installation
    • Node 4.1
    • MongoDB
    • Python
  • Migrate Parse DB
    • Prepare external connections
    • Transfer data
  • Configure Parse server
    • Install
    • Use your database
  • Secure your server
    • Create a New User
    • Give Root Privileges to your new user
    • Copy your ssh key to the server
    • Add Public Key to New Remote User
    • Configure SSH Daemon

Facebook surprised hundred thousands of developers on January 28th by shutting down Parse services.

We have a difficult announcement to make. Beginning today we’re winding down the Parse service, and Parse will be fully retired after a year-long period ending on January 28, 2017

This announcement created a cataclysm amongst the community and the #parse became trending on Twitter.

If you are like me, struggling about what to do with your current applications running on Parse, you can stop worrying right now. With 20 minutes of your time and only $5/month you can have your Parse server running with your current data.

First you will need to create a droplet at DigitalOcean (Using this referral link you will get $10 credit).

Select whatever Linux distribution you want but for this tutorial we will use Ubuntu 14.04 (64-bit):

droplet

Add your machine SSH key then click “Create”. In less than a minute you will get your droplet ready.

To log in your new machine get your IP address and type this command on your terminal:

$ ssh root@<yourIpAddress>

Now that we are logged in as Root, it is time to setup your machine!

Prerequisites

  • Node 4.1
  • MongoDB version 2.6.X or 3.0.X
  • Python 2.x

Installation

Start by updating the package list and install basic packages.

sudo apt-get update
sudo apt-get install build-essential

Node 4.1

We will install Node 4.1 via NVM (Node Version Manager)

# get the latest nvm release https://github.com/creationix/nvm/releases
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash

# Restart your terminal or run
source ~/.profile
 
# Install the NodeJS version needed
nvm install 4.1

# Select the right version
nvm use 4.1
 
# update npm
npm install npm -g

Now to test that node is installed type node:

$ node
> console.log('foobar')
foobar

Source


MongoDB

Ubuntu ensures the authenticity of software packages by verifying that they are signed with GPG keys, so we first have to import their key from the official MongoDB repository:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

After successfully importing the key you will see:

Output
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Next, we have to add the MongoDB repository details so APT will know where to download the packages from:

echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

Now we can update packages and install MongoDB:

sudo apt-get update
sudo apt-get install -y mongodb-org

Make sure MongoDB is running:

$ service mongod status
mongod start/running, process 2008

You can also stop, start, and restart MongoDB using the service command (e.g. service mongod stop, server mongod start).

To avoid the following error Failed global initialization: BadValue Invalid or no user locale set when trying to log in to your database, we need to set the locale:

$ nano /etc/environment

Add those two lines at the end of the file:

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

Then save, exit (CTRL+O CTRL+X), logout and re log in:

$ exit
# Re log in
$ ssh root@<yourIpAddress>

We can now log in your MongoDB instance:

$ mongo
MongoDB shell version: 3.0.9

Source


Python

Python is already installed on DigitalOcean’s droplets:

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)

Migrate Parse DB

Prepare external connections

To migrate your data we need to create an admin user first:

$ mongo
> use admin
switched to db admin

Add a user to the admin DB (change <username> and <password> with your own):

> db.createUser(
  {
    user: 'username',
    pwd: 'password',
    roles: [ { role: 'userAdminAnyDatabase', db: 'admin' } ]
  }
)

Once Successfully added user message is display we can turn the localhost exception off:

> auth = true
> setParameter = enableLocalhostAuthBypass=0

To allow external connection to your database we need to temporarily disable the remote restriction (until you completely stop using parse.com services).

$ nano /etc/mongod.conf

Comment this line (adding # at the beginning of the line):

bind_ip = 127.0.0.1

Then restart the MongoDB instance:

$ service mongod restart

Transfer data

Use the Parse database migration tool to transfer your data (found in the new dashboard under App Settings > General > Migrate to external database).

Migration tool

Click “migrate”:

MongoDb migration

Then it will ask for the MongoDB URI connection scheme which looks like this:

mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

In the input type mongodb://<username>:<password>@<yourIpAddress> and click “Begin the migration”.

As we made sure that the user in the connection string had admin privileges so the next screen you see would be an prompt about SSL connection:

parse_migration_ok

Depending on the privacy of the data you want to transfer use the SSL option or not ?ssl=true.

Next screen will be this one:

Migration start

When the transfer is finished you will see the following:

Migration Sync

We have now access to our data!

$ mongo
MongoDB shell version: 3.0.9
connecting to: test
> show dbs
admin  0.078GB
local  0.078GB
test   0.953GB
> use test
switched to db test
> show collections
_Cardinality
_GlobalConfig
_Index
_JobSchedule
_SCHEMA
etc..

Configure Parse server

Install

Parse Server is meant to be mounted on an Express app. Express is a web framework for Node.js. The fastest way to get started is to clone the Parse Server repo, which at its root contains a sample Express app with the Parse API mounted.

First install Git:

$ sudo apt-get install git

Then find a place to clone the parse-server-example repository. Recommended /var/www/:

$ cd /var/
$ mkdir www
$ cd www/
$ git clone https://github.com/ParsePlatform/parse-server-example.git parse
$ cd parse/

Now we can instal the dependencies express, parse and parse-server:

$ npm install

To make sure the Parse server is running you can run this npm script:

$ npm run start

> parse-server-example@1.0.0 start /var/www/parse
> node index.js
DATABASE_URI not specified, falling back to localhost.
parse-server-example running on port 1337.

Now open your browser at http://<yourIpAddress>:1337/parse.

You should see this JSON response:

{"error":"unauthorized"}

Use your database

There are four environment variables that you can use:

  • DATABASE_URI (default ‘mongodb://localhost:27017/dev’)
  • CLOUD_CODE_MAIN (default ‘/cloud/main.js’)
  • PARSE_MOUNT (default ‘/parse’)
  • PORT (default 1337)

We can keep the default for now but if you want to modify one of them:

export PARSE_MOUNT=<yourEndpoint>

Open index.js and add your <appID> and <masterKey>:

$ nano index.js
var api = new ParseServer({
  databaseURI: process.env.DATABASE_URI || 'mongodb://localhost:27017/dev',
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: '<appID>',
  masterKey: '<masterKey>'
});

Restart your server:

$ npm run start

Then to test if you can query your own Parse server run the following CURL command on your machine:

curl -X GET \
  -H "X-Parse-Application-Id: <appID>" \
  -H "X-Parse-Master-Key: <masterKey>" \
  -G \
  http://<yourIpAddress>:1337/parse/classes/<yourClass>/<yourClassItemId>

The result should be a JSON response containing the item you queried:

{"objectId":"CbsgKCNZxM","createdAt":"2015-12-14T05:26:03.609Z","updatedAt":"2015-12-21T00:23:44.561Z","title":"What's new this week?","type":"info","active":false}

That’s it you are now running your own Parse server on your own architecture.

If you want your app to point to your own Parse server do not forget to configure your Parse SDK:

// JavaScript
Parse.initialize("YOUR_APP_ID");
Parse.serverURL = 'http://localhost:1337/parse'

Using Parse SDKs with Parse Server

Now it is time to secure your server and move on!


Secure your server

Now that you have your Parse server running is it time to secure you server starting with removing Root access and creating your own user.

First log in as root

$ ssh root@<yourIpAddress>

Create a New User

We will create a new user named newUser for demonstration purpose. You can call it whatever you want.

$ adduser newUser
Adding new group `newUser' (1000) ...
Adding new user `newUser' (1000) with group `newUser' ...
Creating home directory `/home/newUser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:

Give Root Privileges to your new user

$ gpasswd -a newUser sudo
Adding user newUser to group sudo

Copy your ssh key to the server

In your local machine run the following:

$ ssh-copy-id root@<yourIpAddress>

After providing your password at the prompt, your public key will be added to the remote user’s .ssh/authorized_keys file. The corresponding private key can now be used to log into the server.

Add Public Key to New Remote User

Enter the following command to switch to the new user

root@XXXX:~# su - newUser
newUser@XXXX:~$

Create a new directory called .ssh and restrict its permissions with the following commands:

$ mkdir .ssh
$ chmod 700 .ssh

Copy the SSH key (local machine) to your clipboard:

# OSX
$ pbcopy < ~/.ssh/id_rsa.pub

# Unix
$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub

# Windows
$ clip < ~/.ssh/id_rsa.pub

Now insert it into .ssh/authorized_keys and save using nano nano .ssh/authorized_keys.

# set permission
$ chmod 600 .ssh/authorized_keys

Then got back to the root user so we can modify ssh access.

newUser@XXXX:~$ exit

Configure SSH Daemon

Open ssh config file:

$ nano /etc/ssh/sshd_config

Search for PermitRootLogin using CTRL+W command.

Change it from yes to no then save CTRL+o, CTRL+x.

To finish reload SSH:

$ service ssh restart

At this point logging in with root should be forbidden. You can try using the same command we used before:

$ ssh root@<yourIpAddress>

However logging in with newUser is permitted:

$ ssh newUser@<yourIpAddress>

More details


Thanks for reading, you can interact about this post by leaving a comment here, or directly on Twitter and Facebook!

  • Facebook
  • Twitter
  • Google
  • LinkedIn
  • Pocket
  • Reddit
  • Email
  • Print
CloudDigitalOceanHostingMongoDBParse.comServer

The Author Julien Renaux

Freelance Front End Engineer @toptal. Blogger and creator of WordPress Hybrid Client http://wphc.julienrenaux.fr

  • Daniel Martin

    I don’t really like all that command line interface. SO I prefer using GS Rich Copy 360 for all my copying needs. It’s not too cheap (around $120) but it is one of the best file copying software I’ve ever used so far!

  • jack reacher

    use robocopy..,.,.,

  • jack reacher

    Hey there,
    I saw this tool by pure accident. I think it suits my needs for this week as one of my servers is compromized and I wasnt to migrate around 50 websites to 2 other servers I own. I want to ask a few questions, I can understand the obvious backup it does,

  • Munim

    Great tutorial Julien. I followed your tutorial to install parse server on a VPS server. Thanks a lot!
    I am having an issue to migrate parse db to self hosted mongodb. Server OS Ubuntu 14.04, MongoDB 3.0.12. When I try to migrate from from parse.com, get following error: “Server returned error on SASL authentication step: Authentication failed.” My mongo connection uri in parse.com is mongodb://xxxxxx:xxxxx@66.11.xx.xx:27017/bpb2

    If you can help me to get this error resolved i will greatly appreciate. I have been trying for weeks now with different version of OS, Mongo, but no luck

    Thanks again!

    • Julien Renaux

      Apart from stating the obvious: You have a problem with the DB connection. I have no idea how to fix that sorry 🙁 Let us know if you find a solution!

  • Showaz

    does push notification work on parse server? we had tried alot of things but didn’t work. can you help out

  • Showaz

    how to configure push notification ?

  • Gd Web Graphic

    how i can use a mongodb database with password? i don’t understand how to connect parse with mongodb, if the database has got a password 😛
    Can u help me?

  • OMCO

    Hi
    I Got this Error When I run npm install in parse example server folder:

    > grpc@0.13.1 install /home/push/parse-server-example/node_modules/grpc
    > node-pre-gyp install –fallback-to-build

    /usr/bin/env: node: Permission denied
    parse-server-example@1.4.0 /home/push/parse-server-example
    ??? (empty)

    npm ERR! Linux 4.2.0-27-generic
    npm ERR! argv “/root/.nvm/versions/node/v5.10.1/bin/node” “/root/.nvm/versions/node/v5.10.1/bin/npm” “install”
    npm ERR! node v5.10.1
    npm ERR! npm v3.8.3
    npm ERR! code ELIFECYCLE

    npm ERR! grpc@0.13.1 install: `node-pre-gyp install –fallback-to-build`
    npm ERR! Exit status 126
    npm ERR!
    npm ERR! Failed at the grpc@0.13.1 install script ‘node-pre-gyp install –fallback-to-build’.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the grpc package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-pre-gyp install –fallback-to-build
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs grpc
    npm ERR! Or if that isn’t available, you can get their info via:
    npm ERR! npm owner ls grpc
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /home/push/parse-server-example/npm-debug.log
    npm ERR! code 1

    please Help me How I Can solve This?!

  • B?a?ej Chwie?ko

    Hey there! Well written tutorial! I’m having problem with migrating app from Parse. I’m getting error: “Auth failed” when trying to link my new database on parse.com. It’s weird because I can log into it using robomongo on Mac. Does anyone having the same problem?

  • Cristian

    Great tutorial!!!!! But after a few days of the migration I get this error in Parse: “This migration was cancelled. You can try again from the app settings page.” I don’t know why this is happening! The droplet is always power on! Anyone can help me with this please? Thanks!

  • Kapil Karda

    Hello,

    Thanks for this, It works fine with curl but we are unable to use old parse.com code using javascript can you please help me in that ?

    Thanks

    • stevenleeDisqus

      I want to know it too. Anybody knows the answer?

      • Julien Renaux

        You need to point to your Parse server:

        https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#using-parse-sdks-with-parse-server

        “`
        Parse.initialize(“YOUR_APP_ID”);
        Parse.serverURL = ‘http://localhost:1337/parse’
        “`

      • Kapil Karda

        Hello,
        I solved it Thanks

  • Paul Freeman

    Thank you for the tutorial, it was a great startup.

    One thing I discovered after a lot of trouble was that in order for cloud-code to work you need an additional entry in the definition of the parse server initialisation

    Your example is here.

    var api = new ParseServer({
    databaseURI: process.env.DATABASE_URI || ‘mongodb://localhost:27017/dev’,
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + ‘/cloud/main.js’,
    appId: ”,
    masterKey: ”
    });

    In addition to this I needed an entry for

    serverURL : ‘http://localhost:1337/parse’

    in order for the mounted parse server to actually be available at the desired endpoint to make cloud-code work. This is not (yet) documented on the parse-server docs so its hard to find.

    • Guy Bridge

      I’m getting a similar error when I do “npm run start”. It fails and I get the error: You must provide a serverURL! .

      In what file and where do you add the serverURL variable?

      • Abhijeet Kulkarni

        You must provider server url. If your hosting on your localhost then you should provide url in app.js

        var api = new ParseServer({

        databaseURI: ‘mongodb://localhost:27017/myapp’,

        appId: ‘appid’,

        cloud:”,

        masterKey: ‘master’,

        fileKey: ‘optionalFileKey’,

        serverURL:’http://localhost:1377/parse/’

        });

  • bhirawa

    Hi, your tutorial is awesome!

    By the way, i get “No reachable servers” when i was trying to migrate database, i’m sure that my vps is up, so i dont what to do. Any idea?

    • Cristian

      I have the same problem! Could you solve it?

      • bhirawa

        Well, basically i just forgot to enable firewall and open port 27017, use vps Centos 6. I dont know if it helps. Did you migrate it to your self-hosted like vps or third party service like mongolabs…if you not sure whether you configure mongod correctly just try access it using mongodb-client, then find out what’s wrong…

  • Daniel Blyth

    Great tutorial, helped heaps. Just wondering, how do you update to the newest release of parse-server?

  • Perry

    Searched around and found the answer: You need to set the fileKey in your Parse server. The fileKey can be found in the new Parse dashboard! But the real question is, what to do about http://files.parsetfss.com? Is that site going to be retired along with Parse?

    In any event, thanks to your help, I managed to port over my apps and website to my very own open source parse server!

    Thank you very much!

    Perry

  • Perry

    Julien:
    Everything you showed here today works perfectly as far as data is concerned. However when I migrated to my new Parse server running on my own Droplet, the application accessing the data was not able to access image data.

    http://files.parsetfss.com/invalid-file-key/tfss-5fb35995-63e5-41ba-8056-1d71b376f707-image1455649375549.png

    the ‘invalid-file-key’ what shows up now

    What do you know about this situation?

    • Julien Renaux

      I do not know as I never hosted images on Parse (because they cannot be migrated between instances). You should have a look on the open source projet => https://github.com/ParsePlatform/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+image

      • Perry

        Hi Julien:
        I figured out how the Parse Server does it’s images. The migration tool doesn’t bring those across. Whether this is an oversight or not doesn’t matter because in my case I happened to have a backup/restore feature on my clients website that backed up both data in text format as well as images, so I lucked out on that one. When I did a complete backup followed by a complete restore the images were inside my MongoDB safe and sound. Clicking on my images in the website confirmed this. So you might want to pass the message on.

        The next big hurdle however is the whole Keys generation thing. Parse.com won’t be around so I need to know how it generates it’s keys for new apps.

        There is a CLI interface for it’s Cloud Code version of Parse:

        https://parse.com/docs/cloudcode/guide#command-line

        And it generates app keys for a new app. The trouble is, is that it stores these keys into the Parse.com website.

        Just would love to know your thoughts on this!

        Cheers,

        Perry

  • Perry

    Hi Julien:

    I just went thru each of your step-by-step instructions today and it all went pretty smoothly, but the same typo is still there:

    var api = new ParseServer({
    databaseURI: process.env.DATABASE_URI || ‘mongodb://localhost:27017/dev’,
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + ‘/cloud/main.js’,
    appId: ”,
    masterKey: ”
    });

    Needs to be:

    var api = new ParseServer({
    databaseURI: process.env.DATABASE_URI || ‘mongodb://localhost:27017/test’,
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + ‘/cloud/main.js’,
    appId: ”,
    masterKey: ”
    });

    The ‘test’ is the name of the migrated database that gets specified earlier. If you don’t change the ‘dev’ to a ‘test’ the curl -POST will interact with the ‘dev’ database on mongo and not your migrated database!

    But for all that this article has been a real life saver for me!

    Cheers,

    Perry

    • Julien Renaux

      Hi,

      That is the default address from parse server example: https://github.com/ParsePlatform/parse-server-example/blob/master/index.js#L14

  • Perry

    In light of the current situation with Parse.com, being able to host my own Parse server has become critical. You have been most helpful to me with this posting. I really appreciate you taking the time to post this for us!

  • Perry

    And you spelled Installation wrong, you said ‘Instalation’

    😉

    • Julien Renaux

      Thanks it is fixed

  • Perry

    Also, you didn’t show the command line to install node

    nvm install node
    use 4.3

    • Julien Renaux

      it is on top of the article:

      “`
      # Install the NodeJS version needed

      nvm install 4.1

      # Select the right version

      nvm use 4.1
      “`

  • Perry

    But there were a couple gitches. The most annoying glitch was here:
    ‘mongodb://localhost:27017/dev’,
    because you just migrated to a database called test it should be:
    ‘mongodb://localhost:27017/test’,

  • Perry

    This article really helped me out. Thanks for taking the time to post it.

  • Paul Freeman

    Hi Julien, thanks for this detailed tutorial, I plan to give this a try. Is the migration of the Mongo DB a one shot operation? i.e.: Once its done can you repeat it. I’d quite like to bring up a test server using your tutorial and only after that migrate my live DB. Is that possible? I guess the safe option is to export the data and import it rather than using the migration process?

  • Oyvind

    Hi, and thanks for the tutorial!

    I am having trouble getting my cloud code to work. I just have a simple code like this in my cloud/main.js now, but it never gets called:

    Parse.Cloud.afterSave(‘SomeClass’, function(request) {
    console.log(‘##### INSIDE AFTER SAVE SOMECLASS’);
    });

    Do you have any idea why?

    • Julien Renaux

      How do you know it is never called? Where do you check the logs?

      • Oyvind

        I check the log in the terminal, ‘heroku logs’

        • Julien Renaux

          I do not understand, do you host on your machine or on heroku?

          • Oyvind

            I host it on Heroku. And I deploy via git heroku, from the terminal. So, after I deploy the code, I can type ‘heroku logs’ in my osx terminal when standing in my git heroku repo folder, and see the heroku logs..

          • Julien Renaux

            I do not know, I never used heroku

  • Cristian

    Great tutorial! Thanks!! But I have a question… When I make the migration from Parse the data is stored in my Mongodb in a database named ‘test’ How can I change this name? And its posible to migrate more than one db to my server? because I try with another app in Parse and I get the message ‘the database is not empty’.
    Please help 🙂

    • Julien Renaux

      I guess you can select the name of your db using Mongo URI: mongodb://[username:password@]host1[:port1][,host2[:port2],…[,hostN[:portN]]][/[database][?options]]

    • Julien Renaux

      mongodb://:@/

  • Shayno

    Hi Julien, how can I run the Parse Server without needing to keep terminal open on my mac. The server works fine when i call ‘npm run start’ and everything works fine in the iOS app also, but I can’t figure out how to get the server to work without needing to keep it running in terminal.
    Thanks again 🙂

    • Shayno

      For anyone else who has limited knowledge of node like myself, use `nohup npm start &`

      • Julien Renaux

        Good stuff, thanks for sharing 🙂

  • Cheryl

    I’ve migrated and tested the parse server but noticed that the file assets were not migrated over to my local mongodb instance and its still pointing at parse cloud. I’ve sent an email to one of the developers who mentioned that file assets migration tool will be coming soon. Anyone else here had a similar issue?

    • Hok Shun Poon

      Transferring files is pretty vital…!

    • Alexander Mogavero

      add a comma (,) to the end of masterKey and then add fileKey: ” on the next line. You can get your file key from the Parse Beta Dashboard then save the file and re run your server, you should be able to pull your images from Parse

      • Paul Freeman

        This doesn’t migrate the files though does it Alexander? It just allows the references to the existing Parse hosted URLs to be resolved. Users will still have to download the actual files and move them to a different URL/store before the end of the sunset period (Jan 2017). I hope that Parse will provide a tool to assist with this process.

  • Shayno

    Hi, thanks for the tutorial, I have completed the tutorial and everything seems to be working fine except for one thing. When I perform the curl command in the terminal I get the error {“error”:”unauthorized”}.
    How can i fix this?

    • Julien Renaux

      Are you sure masterKey and appId are correct?

      • Shayno

        You are absolutely correct! I just needed to delete the text between “appId:” and “”,” in index.js and it works like a charm. Thank you so much for this tutorial! I never would have figured it out on my own!

  • A. Jesse Jiryu Davis

    Thanks for writing this. Why is Python a prerequisite? I don’t see that Parse itself, or any of your instructions, uses Python.

    • Julien Renaux

      good question, that must be a Parse server requirement, I got the prerequisite list from the official docs.

  • Seb

    Great tutorial!

    I’ve got one problem though: when I query the server in the end I get an empty object:
    {

    “results”: []

    }

    That’s also for querying just classes. I’ve checked my db and it has all the data and all the classes from parse. Any idea why I don’t get them?

    • Seb

      Got it. Needed to change the db url from /dev to /test – i.e. the db’s name

  • Alejandro Fdez

    Excellent tutorial, there are many solutions out there for heroku, azure and other services, first one in days I’ve seen for DO.

    Some questions you know why is the unauthorized response, because I can make curl calls but when I make it through javascript I get the unauthorized error?

    Another thing is mostly people from where I am are looking for tutorials like this in spanish, you mind I can base a tutorial in that language from your tutorial because it is the most useful I have found??

  • talkaboutdesign

    Hey got to the step after installing parse-server. Trying to start it using nam run start and got the following error.

    sh: 1: node: not found

    npm ERR! weird error 127

    npm WARN This failure might be due to the use of legacy binary “node”

    npm WARN For further explanations, please read

    /usr/share/doc/nodejs/README.Debian

    npm ERR! not ok code 0

    • Julien Renaux

      Have you installed node correctly? If so use this command: “nvm use 4.1”

  • Vincent Raja

    Do i get Parse Dashboard in my Migrated Parse Server?

    • Julien Renaux

      Nope you do not but you could install your own MongoDb admin UI: https://docs.mongodb.org/ecosystem/tools/administration-interfaces/

  • Pingback: A Summary of Backend Options for HTML5 Mobile Applications | HTML5 Mobile Tutorials | Ionic, Phaser, Sencha Touch & PhoneGap()

  • salim

    Hi, thanks Julien for this tuto.
    I deleted first droplet because of linux packages problem. I create a new on, install mongo on it and when i try to migrate db second time i got this messages.

    • Julien Renaux

      Please check directly with Parse for this error, I have seen people complaining about that on Twitter.

      • salim

        Parse already corrected the bug, it is now working.
        Great tuto Julien. Thanks a lot.

  • salim

    Hi,
    I’ve deleted the first droplet because of some package errors, so when i try a second time the migration , Parse fails to start migration and shows this message (image 1). When i check status/migration, i found the second image

    • Julien Renaux

      I have no idea, you should check with parse directly.

  • Rafael Ruiz Muñoz

    Bonjour!
    I’m at the moment just migrating the DB, which was successfully migrated:

    https://cloud.githubusercontent.com/assets/6842786/12714250/808399b4-c8cb-11e5-936b-f91f633bbb53.png

    but now when I enter in the new dashboard, nothing appears. I can’t query my data from the dashboard and my apps don’t work. I can see just the cloud code in JS. What have I done bad migrating only the DB?

    • Julien Renaux

      I think you migrated everything properly. You need to redirect your app to use the new Parse server location: https://parse.com/docs/server/guide#using-sdks

      • Rafael Ruiz Muñoz

        I haven’t migrated the parse API, just the DB

        this is what I’ve done, should I do what you mention anyway?
        http://i.stack.imgur.com/csxbS.png

        merci

  • noja Adegoroye

    Hi i was wondering would this still work with parse cloud code? Also after setting this up would we still get the GUI parse offered (admin area) or would we have to complete tasks using the CLI

    • Julien Renaux

      Cloud code can be used yes but you will not have a GUI admin dashboard anymore. You can use any Mongo DB admin UI https://docs.mongodb.org/ecosystem/tools/administration-interfaces/

  • Josh Robbins

    Hi,
    Im following your tutorial, which is very useful, however when calling: npm run start
    I get this error:

    /var/www/parse/node_modules/parse-server/index.js:153

    request(options, (error, response, body) => {

    ^

    SyntaxError: Unexpected token >

    at Module._compile (module.js:439:25)

    at Object.Module._extensions..js (module.js:474:10)

    at Module.load (module.js:356:32)

    at Function.Module._load (module.js:312:12)

    at Module.require (module.js:364:17)

    at require (module.js:380:17)

    at Object. (/var/www/parse/index.js:5:19)

    at Module._compile (module.js:456:26)

    at Object.Module._extensions..js (module.js:474:10)

    at Module.load (module.js:356:32)

    npm ERR! weird error 8

    npm WARN This failure might be due to the use of legacy binary “node”

    npm WARN For further explanations, please read

    /usr/share/doc/nodejs/README.Debian

    Any ideas?

    • Julien Renaux

      Looks like this issue: https://github.com/ParsePlatform/parse-server/issues/95

    • Pancake345

      I had the same problem then realized I was in the node console and needed to exit. Worked after that.

      • Julien Renaux

        Haha good catch 😉

  • Abhigyan Singh

    How to edit ios client code to point to our server ?
    Please provide the code and also where to put it.
    I added the code given in documentation but I am getting compilation error.

  • João Massena

    Hi,

    I followed your guide, but using a ec2 linux instance (yum instead of apt-get).

    I think I got it right. The Parse Current Progress doesn’t update, no error but no change whatsoever in the progress.

    So, how long should I wait (btw, I’m testing with an empty Parse DB (just one entry on Users table).

    Thanks for the guide!

    • João Massena

      Nervermind, script was being blocked…

  • Tr?n Huy Phúc

    Great tutorial. You saved my life :). Can we continue use Parse SDK (for android, iOS, …) after migrating to new host?

    • Julien Renaux

      If you do not use push notifications you can continue using Parse SDK with your own Parse server yes!

      • Tr?n Huy Phúc

        Yes, I need push notifications in my apps. Can I use Parse server on my host and implement Push?

        • Julien Renaux

          You can use another service for push notifications such as https://batch.com/ or implement it yourself.

          • Tr?n Huy Phúc

            Ah, thanks Julien. I will implement it myself. I learnt a big lesson from Parse, relying on other services is really dangerous 🙂

          • Tr?n Huy Phúc

            I just tested my apps. The database are uploaded on both Parse and my hosting. But in the DB, looks like my files in DB still point to Parse. I am wondering if Parse migrated files to my host or not? And when should I stop use Parse?

          • Julien Renaux

            They keep data in both side for now so any write action on parse will write on your db as well. Stop using Parse service when you are ready and confident on your infrastructure.

          • Tr?n Huy Phúc

            I just edited a record on my host database. Then reload data on apps, and it is still loading data from Parse 🙁

          • Julien Renaux

            You need to set the parse url in your client to your own parse server now. https://parse.com/docs/server/guide#using-sdks

          • Tr?n Huy Phúc

            Yes, I did this. But I got this error “bad json response”. I can use postman to get data, but mobile app is not working.

        • Venkat Venky

          if you want free push service for any scale (except enterprise) try https://onesignal.com (they have migration tool for parse users).

  • Pingback: Migrate Parse to Ubuntu on Digital Ocean – Vi?t IT()

  • Dylan Diamond

    Great tutorial, quick question: Why does Parse recommend that you use MongoLabs, yet this tutorial does not use it?

    • Julien Renaux

      mongolabs is another online service, if you want to be dependant on another service it is up to you. I personnaly have learnt a lesson with Parse shutdown… do not rely on someone else service if you have enough knowledge

      • Dylan Diamond

        Thanks and me too…it really was shocking and devastating that Parse shutdown so I’ll never use another BaSS again.

  • SimonDawlat

    that’s one badass tutorial

  • Michael

    Thank you so much! I’ve been searching the internet for this exact tutorial. The internet thanks you sir!

    • Julien Renaux

      Glad you like it 🙂
      Do not hesitate to share or retweet https://twitter.com/julienrenaux/status/693120788476641280
      Thanks

Newsletter

 
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.