You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with the Parse Server.

That's it! You are now running a standalone version of Parse Server on your machine.

Using a remote MongoDB? Pass the --databaseURI DATABASE_URI parameter when starting parse-server. Learn more about configuring Parse Server here. For a full list of available options, run parse-server --help.

Saving your first object

Now that you're running Parse Server, it is time to save your first object. We'll use the REST API, but you can easily do the same using any of the Parse SDKs. Run the following:

Connect your app to Parse Server

Running Parse Server elsewhere

Once you have a better understanding of how the project works, please refer to the Parse Server wiki for in-depth guides to deploy Parse Server to major infrastructure providers. Read on to learn more about additional ways of running Parse Server.

Parse Server Sample Application

We have provided a basic Node.js application that uses the Parse Server module on Express and can be easily deployed to various infrastructure providers:

Documentation

The full documentation for Parse Server is available in the wiki. The Parse Server guide is a good place to get started. If you're interested in developing for Parse Server, the Development guide will help you get set up.

Migrating an Existing Parse App

The hosted version of Parse will be fully retired on January 28th, 2017. If you are planning to migrate an app, you need to begin work as soon as possible. There are a few areas where Parse Server does not provide compatibility with the hosted version of Parse. Learn more in the Migration guide.

Configuration

Parse Server can be configured using the following options. You may pass these as parameters when running a standalone parse-server, or by loading a configuration file in JSON format using parse-server path/to/configuration.json. If you're using Parse Server on Express, you may also pass these to the ParseServer object as options.

For the full list of available options, run parse-server --help.

Basic options

appId(required) - The application id to host with this server instance. You can use any arbitrary string. For migrated apps, this should match your hosted Parse app.

masterKey(required) - The master key to use for overriding ACL security. You can use any arbitrary string. Keep it secret! For migrated apps, this should match your hosted Parse app.

databaseURI(required) - The connection string for your database, i.e. mongodb://user:pass@host.com/dbname. Be sure to URL encode your password if your password has special characters.

port - The default port is 1337, specify this parameter to use a different port.

serverURL - URL to your Parse Server (don't forget to specify http:// or https://). This URL will be used when making requests to Parse Server from Cloud Code.

Client key options

The client keys used with Parse are no longer necessary with Parse Server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.

clientKey

javascriptKey

restAPIKey

dotNetKey

Advanced options

fileKey - For migrated apps, this is necessary to provide access to files already hosted on Parse.

allowClientClassCreation - Set to false to disable client class creation. Defaults to true.

enableAnonymousUsers - Set to false to disable anonymous users. Defaults to true.

filesAdapter - The default behavior (GridStore) can be changed by creating an adapter class (see FilesAdapter.js).

maxUploadSize - Max file size for uploads. Defaults to 20 MB.

loggerAdapter - The default behavior/transport (File) can be changed by creating an adapter class (see LoggerAdapter.js).

sessionLength - The length of time in seconds that a session should be valid for. Defaults to 31536000 seconds (1 year).

revokeSessionOnPasswordReset - When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.

accountLockout - Lock account when a malicious user is attempting to determine an account password by trial and error.

Logging

Use the PARSE_SERVER_LOGS_FOLDER environment variable when starting parse-server to save your server logfiles to the specified folder.

Email verification and password reset

Verifying user email addresses and enabling password reset via email requires an email adapter. As part of the parse-server package we provide an adapter for sending email through Mailgun. To use it, sign up for Mailgun, and add this to your initialization code:

var server = ParseServer({
...otherOptions,
// Enable email verification
verifyUserEmails: true,
// if `verifyUserEmails` is `true` and
// if `emailVerifyTokenValidityDuration` is `undefined` then
// email verify token never expires
// else
// email verify token expires after `emailVerifyTokenValidityDuration`
//
// `emailVerifyTokenValidityDuration` defaults to `undefined`
//
// email verify token below expires in 2 hours (= 2 * 60 * 60 == 7200 seconds)
emailVerifyTokenValidityDuration: 2 * 60 * 60, // in seconds (2 hours = 7200 seconds)
// set preventLoginWithUnverifiedEmail to false to allow user to login without verifying their email
// set preventLoginWithUnverifiedEmail to true to prevent user from login if their email is not verified
preventLoginWithUnverifiedEmail: false, // defaults to false
// The public URL of your app.
// This will appear in the link that is used to verify email addresses and reset passwords.
// Set the mount path as it is in serverURL
publicServerURL: 'https://example.com/parse',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'Parse App',
// The email adapter
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
// The address that your emails come from
fromAddress: 'parse@example.com',
// Your domain from mailgun.com
domain: 'example.com',
// Your API key from mailgun.com
apiKey: 'key-mykey',
}
},
// account lockout policy setting (OPTIONAL) - defaults to undefined
// if the account lockout policy is set and there are more than `threshold` number of failed login attempts then the `login` api call returns error code `Parse.Error.OBJECT_NOT_FOUND` with error message `Your account is locked due to multiple failed login attempts. Please try again after <duration> minute(s)`. After `duration` minutes of no login attempts, the application will allow the user to try login again.
accountLockout: {
duration: 5, // duration policy setting determines the number of minutes that a locked-out account remains locked out before automatically becoming unlocked. Set it to a value greater than 0 and less than 100000.
threshold: 3, // threshold policy setting determines the number of failed sign-in attempts that will cause a user account to be locked. Set it to an integer value greater than 0 and less than 1000.
},
});

You can also use other email adapters contributed by the community such as:

[ ] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Want to ride the bleeding edge?

The latest branch in this repository is automatically maintained to be the lastcommit to master to pass all tests, in the same form found on npm. It isrecommend to use builds deployed npm for many reasons, but if you want to usethe latest not-yet-released version of parse-server, you can do so by dependingdirectly on this branch: