Self-hosting with Docker
This guide walks you through the process of installing the self-hosted backend of Standard Notes. In this example, we used a server running Ubuntu 20.04, with 2GB RAM and 1 CPU.
Due to mounted volumes, we recommend running the setup as a root user. If you wish to run it as a non-root user, please see Docker's post-installation steps for Linux.
#
PrerequisitiesUpdate your
apt
repositories and upgrade any out-of-date packages:Install Docker Engine:
Verify that Docker is installed:
This should output something like:
Verify that Docker Compose is correctly installed:
This should output something like:
Enable the
ufw
firewall:Enter
y
when prompted.Enable SSH connections:
This should output something like:
Allow incoming TPC connections on ports
80
and443
:Check the status of your
ufw
settings:This should output something like:
Configure a domain name (or subdomain) to point to your server's IP address. Consult your domain registration provider for how to configure your domain name.
#
Install Standard NotesClone the
standalone
repo:Initialize default configuration files:
This will output something like:
Generate random values for the necessary environment variables:
Note: If you are running
sed
on macOS or BSD, change instances ofsed -i
tosed -i ''
.(Optional) Restart the server:
(Optional) By default, the syncing server will run on port
3000
. If you have a different service running on that port, you can customize the port on which you want to run the infrastructure by editing theEXPOSED_PORT
variable in the.env
file.Once the server has finished rebooting, log back into the server and start the Standard Notes server process:
Docker will start outputting lots of information about the containers it is pulling in and installing. This process took about 8 minutes on a Ubuntu 20.04 server with 2GB RAM and 1 CPU.
Once Docker has finished installing, the Standard Notes install script will output:
Check the status of your server:
This will output something like:
Your Standard Notes server is ready once all the services have a
STATUS
ofUp
. This process took about 11 minutes on a Ubuntu 20.04 server with 2GB RAM and 1 CPU.You should be able now to check that the syncing server is running by checking
http://localhost:3000/healthcheck
. You must do this on the server:If you changed the
EXPOSED_PORT
variable, checkhttp://localhost:{EXPOSED_PORT}/healthcheck
.You're done!
#
Securing your serverTo start using your new server with the Standard Notes app at app.standardnotes.com,
you have to configure an HTTPS reverse proxy. Head over to Securing HTTP traffic of your Sync server for more information on how to set up a reverse proxy.
#
Using your new serverIn the account menu, choose Advanced options
and enter the address of your new server in Custom sync server
. Then, register for a new account or log in to an existing account and begin using your private new secure Standard Notes server!