Self-hosting Standard Notes on your Synology NAS

You can self-host Standard Notes on your Synology NAS to gain private end-to-end encrypted notes and files securely accessible via the Standard Notes app on all your devices, even when you are on the go and on an external network. All data will be stored on your personal NAS system in the privacy of your own home.

The following instructions were tested on a Synology DS220+ system.

Quick Start

  1. Install the official Docker package on your Synology server via the Package Center by searching for "Docker".

  2. Install the Git Server package.

  3. SSH into your server by following the official instructions.

  4. Once inside your server via command line, change your working directory to the location you'd like to place your Standard Notes related data. In this example, we've chosen /volume1/MySharedFolder. You can navigate to this folder via:

    cd /volume1/MySharedFolder
    
  5. Follow the instructions on our Docker self-hosting page.

  6. If you encounter any issues, see Troubleshooting below.

  7. During the first start of the server, the infrastructure must create and setup your database. This can take some time, depending on your system. In our tests on a Synology DS220, this process took about 15 minutes. You can run tail -f logs/*.log to observe real-time status and logs.

  8. Allow devices to access the server:

    1. In your Synology Control Panel, select Connectivity > External Access > Router Configuration.
    2. Select Create > Built-in application and check "Docker server_self_hosted"
    3. Select Done.
    4. Select Apply in the bottom right corner, if necessary.

You're now up and running with Standard Notes on your Synology NAS! You can verify your server is working by accessing the server endpoint from a web browser by visiting http://{YOUR_SERVER_IP}:3000.

Using your server in the Standard Notes desktop app

Using the Standard Notes desktop app:

  1. In the account menu, choose Advanced options and enter the address of your new server in Custom sync server.
  2. Register for a new account or log in to an existing account and begin using your private new secure Standard Notes server!

Note:

  • You will not yet be able to access your server from the web app or from the mobile app. Keep reading to learn how to expand access to your other devices.
  • File uploads and downloads will not yet work either. We will cover this below.

Accessing your Standard Notes server from other devices

We'll use Tailscale to allow secure access to your self-hosted server from your other devices, no matter where you are in the world.

  1. Install Tailscale on your Synology NAS from the Package Center.

  2. Complete the Tailscale setup wizard until you are presented with the final IP address of your server. It should start with something like 100.xxx.... In this guide, we'll assume the value of 100.130.196.145 for your server Tailscale-based IP.

  3. Install and configure Tailscale on your desktop computer, signing in with the same account you used on your server.

  4. Install and configure Tailscale on your mobile device.

  5. Stop your Standard Notes server:

    docker-compose down
    
  6. Edit the .env file. You can use Vim to open the file in your SSH session:

    vim .env
    
  7. Locate or add the line that defines the PUBLIC_FILES_SERVER_URL variable and modify the value to equal the Tailscale-based IP address of your Synology NAS, followed by 3125 for the port.

    PUBLIC_FILES_SERVER_URL=http://100.130.196.145:3125
    
  8. Start the server via docker-compose up -d.

You can now access your self-hosted server from your mobile device by connecting to the Tailscale VPN. When signing into your account using the Standard Notes mobile app, enter your Synology's Tailscale-based IP address and the self-hosted port. In this example, that would be http://100.130.196.145:3000.

Creating a subscription on your server

Follow the instructions on our Subscriptions on your self-hosted server page.

Accessing your account using the Standard Notes web app

If you plan to access your server from the web app at https://app.standardnotes.com, your server will need an HTTPS certificate. This is because web browsers do not allow a secure page (beginning with https) to access non-secure servers (beginning with http).

Adding an HTTPS certificate to your Synology setup is outside the scope of this guide, but you can take a look at our generic HTTPS instructions for Linux-based servers. These instructions will likely need to be custom-fitted with Tailscale in order to work correctly.

Troubleshooting

  • Depending on the Docker version you have installed, you might need to change your Docker Compose CLI commands from:

    docker-compose ...
    

    to:

    docker compose ...
    
  • If you encounter errors related to permissions, you may prepend your commands with sudo to run those commands with root privileges.

  • You may also need to change the permissions of your data directory: sudo chmod -R 755 ./data/

  • If you encounter issues stating that a folder in the data directory could not be found or does not exist, such as data/mysql, simply create those folders:

    mkdir data/mysql
    

Other ways to get help

Browse or post to the forum
Recommended for non-account related issues.
Join the Standard Notes Discord group
Recommended for small talk.
Send an email to [email protected]
Recommended for account related issues.