Self Hosting with Docker

These instructions make the following assumptions:

  • You've just finished setting up a Linux server (say, Ubuntu 16.04 64-bit) and have installed Docker on it.

  • You've configured your security groups to allow for incoming SSH connections from your local IP.

  • You've configured a domain name (or subdomain) to point to your server's IP address.

  • You've configured the DNS to enable HTTPS for your domain (say, using Cloudflare).

Getting started

  1. SSH into your new server:
   $ ssh -l {user} {IP to the server}
  1. Update your system:
   $ sudo apt-get update
   $ sudo apt-get upgrade
  1. Install git
   $ sudo apt-get update
   $ sudo apt-get install -y git
  1. Make sure you are in your home directory and clone the Standard File ruby-server project:
   $ cd ~
   $ git clone
   $ cd ruby-server
  1. Create .env.{app|db}.production files in the project's root directory. Add environment variables (see Environment variables for full listing):
   $ cd $PROJECT_ROOT/docker/environments/
   $ cp
   $ vim


   SECRET_KEY_BASE=use "bundle exec rake secret"


   SALT_PSEUDO_NONCE=use "bundle exec rake secret"
   $ cd $PROJECT_ROOT/docker/environments/
   $ cp .env.db.producion.template .env.db.production
   $ vim .env.db.production


  1. Build the services, without starting them:

    $ docker-compose build
  2. Run the app service to compile the assets:

    $ docker-compose -f docker-compose.yml -f docker-compose.production.yml up app
    $ docker ps
    $ docker exec -it {container ID/name of the app service} /bin/bash
    app> bundle exec rake assets:precompile

At this point the precompiled assets are stored in the public/
folder of the host. Nginx container will mount the folder as volume
and get the assets.

   $ docker-compose down
  1. Start the services:
   $ docker-compose -f docker-compose.yml -f docker-compose.production.yml up -d
  1. Login to the app service to initialize project:

    $ docker ps
    $ docker exec -it {container ID/name of the app service} /bin/bash
    app> bundle exec rake db:create db:migrate
  2. Access the server locally:

    $ curl {domain name}
    <!doctype html>
      <h1> Hi! You're not supposed to be here. </h1>
      <p> You might be looking for the <a href=""> Standard Notes Web App</a> or the main <a href=""> Standard Notes Website</a>. </p>
  3. You're done!

Using your new server

You can immediately start using your new server by using the Standard Notes app at

In the Account menu, enter the address of your new server in "Sync Server Domain" under "Advanced Options".

Then, register for a new account, and begin using your private new secure Standard File server!