Self-Hosting with Heroku

Getting started

  1. Configure the Heroku Command Line Interface (CLI) using these steps: Heroku CLI.

  2. Deploy the Standard Notes server to your account using the following deploy link: https://heroku.com/deploy?template=https://github.com/standardnotes/syncing-server/tree/master

  3. Install a MySQL add-on. Here we'll use the JawsDB add-on: https://elements.heroku.com/addons/jawsdb. If you already have a database, you can skip this step.

  4. After installing JawsDB, choose it from the add-ons list in your Heroku dashboard. This will take you to your JawsDB dashboard. You'll need the information found here for the next step.

  5. In your Heroku application, choose the "Settings" tab.

  6. In the "Config Variables" section, click "Reveal Config Variables".

  7. Add 4 new variables:

    KeyDescription
    DB_HOSTUse the "Host" value from your JawsDB dashboard.
    DB_DATABASEIn your JawsDB dashboard, you should see at the top "Connection String". Copy the part after "3306/". That will be the name of your database.
    DB_USERNAMEUse the "Username" value.
    DB_PASSWORDUse the "Password" value.
  8. Restart your Heroku instance using either the web interface (you'll find this option under "More" in the top right) or using the command line:

    heroku restart --app name_of_app
  9. Perform initial database setup:

    heroku run rake db:migrate --app name_of_app
  10. You're done!

Using your new server

You can immediately start using your new server by using the Standard Notes app at https://app.standardnotes.org.

In the account menu, choose Advanced Options and enter the address of your new server in Sync Server Domain.

Then, register for a new account or log into an existing account and begin using your private new secure Standard Notes server!

Note that you should understand the limitations of Heroku's free tier. In particular, your instance will sleep after 30 minutes of idleness, and may take several seconds to start up again on subsequent requests.

Last updated on