Question

How to install standardnotes in ubuntu

I’m trying to self hosted standardnotes app


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
September 8, 2024

Hey there! 👋

If you’re looking to self-host Standard Notes on your Ubuntu server, Docker is a great way to do it.

Docker simplifies the process, ensuring that everything runs smoothly and is easy to manage. Below, I’ll walk you through the steps to get Standard Notes up and running using Docker.

Before you start, make sure you have Docker installed on your server. If you don’t have Docker yet, you can quickly set it up by using this 1-Click Docker image on DigitalOcean.

You’ll also need:

  • An Ubuntu server (22.04 or similar)
  • At least 2GB of RAM and 1 CPU

Once you have Docker installed follow the steps here:

Step 1: Set Up Your Working Directory

First, create a directory where all your Standard Notes files will be stored:

mkdir standardnotes
cd standardnotes

Step 2: Create and Configure Your .env File

Next, you need to create a .env file to store environment variables:

touch .env
curl https://raw.githubusercontent.com/standardnotes/server/main/.env.sample > .env

Open the .env file and ensure the variables in the KEYS section are set properly. Generate secure key values using the following command:

openssl rand -hex 32

Step 3: Prepare Your LocalStack Bootstrap Script

Copy the LocalStack bootstrap script to your working directory and make sure it’s executable:

curl https://raw.githubusercontent.com/standardnotes/server/main/docker/localstack_bootstrap.sh > localstack_bootstrap.sh
chmod +x localstack_bootstrap.sh

Step 4: Set Up Docker Compose

Download the docker-compose.yml file:

curl https://raw.githubusercontent.com/standardnotes/server/main/docker-compose.example.yml > docker-compose.yml

(Optional) If you need to customize your setup, such as changing port mappings, you can edit the docker-compose.yml file according to your needs.

Step 5: Secure Your Database

Generate a secure random password:

openssl rand -hex 12

Update the .env file with this value for the DB_PASSWORD variable. Also, update MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD in the docker-compose.yml file with the same value.

Step 6: Start the Containers

Run the following command to pull the necessary Docker images and start the services:

docker compose pull && docker compose up -d

It may take a moment for everything to spin up. You can monitor the logs using:

tail -f logs/*.log

If you encounter any issues, check the error logs with:

tail -f logs/*.err

Step 7: Access Your Standard Notes Server

Once everything is up and running, you can check your Standard Notes server by visiting http://localhost:3000 in your web browser.

Updating Your Server

Before you update your server, make sure you have a backup of your data. After backing up, stop the server:

docker compose down

Then, update your files (docker-compose.yml, .env, localstack_bootstrap.sh) with the latest versions and restart the server:

docker compose pull
docker compose up -d

To connect to your self-hosted server, go to the account menu in Standard Notes, select “Advanced options,” and enter the address of your server under “Sync Server.”

- Bobby

KFSys
Site Moderator
Site Moderator badge
September 8, 2024

Heya,

he snap packaging technique is the simplest way to install Standard Notes on Ubuntu 22.04. A snap package is a form of universal Linux package that may be installed on any Linux distribution. It’s a self-contained software package that includes the binaries as well as all of the application’s dependencies.

sudo apt install snapd

then

udo snap install standard-notes

Make sure you Update the Standard Notes Package. For that use the command below.

sudo snap refresh --list

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.