blackvoid Standard Notes - Docker self-hosted alternative for all your note needs

Currently reading
blackvoid Standard Notes - Docker self-hosted alternative for all your note needs

Standard Notes - Docker self-hosted alternative for all your note needs

Not another one of those notes apps am I, right? I mean we have Synology Note Station, a globally popular Evernote, Apple Notes, Bear app, and a million others, so what makes Standard Notes special?

Notes? Who needs a notes app...?​


Before I write a bit why this article should make sense, in case you are not interested in what I have to say and are looking for the know-how of running this on your own Docker (Synology) platform, jump down to the "Requirements" section.

Standard Notes - Docker self-hosted alternative for all your note needs

Key features of Standard Notes
Standard Notes - Docker self-hosted alternative for all your note needs

More features can be unlocked with extensions (also free and covered by this tutorial)

As you can see from the images above, SN offers a lot. From a modern minimalistic look to a full mobile and desktop app, along with 2FA support, FaceID, and super fast sync service that just works.

You can host it yourself, preserving the data 100% on-site, access it anywhere from a web browser app connected to your server. Brilliant, just as Bitwarden setup is for passwords.

SN offers also a paid solution unless you don't feel up to it hosting it yourself and offers about 30 extensions at the moment to make your instance even more powerful than a simple notes app.

With its spartan looks and features, out of the box, you get a free note-taking app with sync. More than enough for the majority of people. If you are looking a bit more, like support for markdown, code, themes, 2Fa, etc, then you will need to either pay a small monthly fee or host them yourself.

This article will show you how to make it all happen and run it inside Docker on your Synology NAS along with (also free and open-source) all extensions that SN offers.


Continue reading...
 
If it does not disappear after a reinstall, I will try to contact the programmers and see if it's an account/licensing issue or anything else.
I have to comment again on this and correct myself. The IOS app can't install new extensions, it can use them but there is no option to install them as you can on the desktop/webapp. So I guess this is by design on the mobile end.
 
So, then SN is in parts useless for me if I cannot use the same editors (e.g. Code Editor) or extensions in Android.

I had and still have almost the same issues within DS Note, too: If I format certain parts of a text on Windows, the format looks different on Android and vice versa. Because of this annoying issue and more, I switched to Bookstack. OK, not fully comparable because Bookstack does not offer a native Android version at all, at least to my knowledge.

To sum up, Standard Notes, is in my opinion better that DS Note and more specialized then Bookstack but unfortunately not all features are available in mobile versions.

As a side note: the Android app yet shows up all themes that I've installed on SN Windows application, but claims I cannot use them on mobile. So there is a kind of awareness of any installed extensions, but obviously not fully supported.

Btw, I noticed when enabling the error console, that the Windows app offers in Help-> Toggle Error Console, I get the standard browser F12 debugging console. Hence, I assume the Windows application is still a web based program.
For this reason I will have a further look into the web app and install the docker container you mentioned already on you blog and see if this is the way to go.
 
So, then SN is in parts useless for me if I cannot use the same editors (e.g. Code Editor) or extensions in Android.
No no not what I meant. For example, extensions what are already installed I CAN use on IOS for example. I just can't install the extension unless I do it over desktop/web. But in any case, if you install all that you need, then you should be able to "use" them. Still, there might be some Android-specific problems that I can't confirm.
 
This would explain my words when saying that themes are know to the Android app but cannot be used.

OK, will see if this is true for those others extensions, too.
All of my extensions are reachable from external using https. So the Android app should have access to them...
 
@Rusty guess your are correct. Once those extensions are installed on Windows the Android app tries to load them, too.
I wrote "tries" because the app tries to access an URL located on s.murrum.eu and throws a 404 inside the app where normally the editor's toolbar shows up. This happens with all other extension editors, too.

I observed this error on Windows, too, initially after activating an editor extension. However, after closing and restarting the Windows application, the error went away and was available for usage.

Obviously, the same process does not work within the Android app. The 404 does not disappear after a restart.
I had a look into the index.json file that gets loaded when pointing the SN apps to the docker extensions URL.

Most of the URLs that are available in this JSON file are unreachable, 404. The appropriate ZIP files, however, can be downloaded, though. I assume that those files contain the source code of thkse editors.

At this point I'm clueless. Can you check your index.json? Are they pointing to the domain above, too? Or is it just me using the docker container for those extensions instead of building them manually?
 
@Rusty guess your are correct. Once those extensions are installed on Windows the Android app tries to load them, too.
I wrote "tries" because the app tries to access an URL located on s.murrum.eu and throws a 404 inside the app where normally the editor's toolbar shows up. This happens with all other extension editors, too.

I observed this error on Windows, too, initially after activating an editor extension. However, after closing and restarting the Windows application, the error went away and was available for usage.

Obviously, the same process does not work within the Android app. The 404 does not disappear after a restart.
I had a look into the index.json file that gets loaded when pointing the SN apps to the docker extensions URL.

Most of the URLs that are available in this JSON file are unreachable, 404. The appropriate ZIP files, however, can be downloaded, though. I assume that those files contain the source code of thkse editors.

At this point I'm clueless. Can you check your index.json? Are they pointing to the domain above, too? Or is it just me using the docker container for those extensions instead of building them manually?
Sounds like a CORS problem to me. Check the article link I have some updates in it regarding extensions not loading in the web app. Could be the same problem with an android app.

The idea is to add some custom headers to the rp section or create a htaccess file if using the web station. In worse case disable cors check but I don’t see how that can be done on the android mobile app if the app even support officially extensions install via that same app
 
Last edited:
I want to share my findings with you here as well, since others have problems with CORS as well.

This is what I have done to get it working. (see screen)
In Webstation choose: Name-based
Add your hostename: e.g. extensions.yourdomain.com
Choose HTTP back-end-server: Apache HTTP Server 2.4 (2.2 could also work didn't test it!)
PHP: not configured

Then create a .htaccess file in your extensions public folder and add the following in the file:
Code:
Header always set Access-Control-Allow-Origin '*'

Header always set Access-Control-Max-Age '1728000'
Header always set Access-Control-Allow-Headers 'X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding'
Header always set Access-Control-Allow-Methods 'POST, GET, OPTIONS, DELETE, PUT'
Header always set Access-Control-Expose-Headers 'Content-Security-Policy, Location'

# Don't know if this is really neccesary mabye someone with more experience could check it!
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]

If you have done all these steps then the extensions should now be visible in the different browsers. I tested this with Safari and FireFox (desktop and mobile) . Check to be sure if you still see the CORS error message in your browser via Develop tools.
-- post merged: --

For if someone is interested in installing FileSafe:
Code:
docker pull standardnotes/filesafe-relay:stable
docker run -d \
 --name='standardnotes-filesafe' \
 -v /etc/localtime:/etc/localtime:ro \
 -v /etc/TZ:/etc/timezone:ro \
 --hostname='standardnotes-filesafe' \
 --env-file /volume1/path/to/your_env_file/snfilesafe.env \
 -p 3004:3000 \
 --restart='always' \
 standardnotes/filesafe-relay:stable

This is the env file:
Code:
# ENV setup Variables
# Do not include this new file in source control
#

TZ=Your/Timezone

# Rails Settings
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=false
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=use "bundle exec rake secret"
HOST=https://filesafe.yourdomain.com

# Datadog
DATADOG_ENABLED=false
 

Attachments

  • Screen_Shot 1.png
    Screen_Shot 1.png
    53.7 KB · Views: 22
For if someone is interested in installing Standardnotes web:
Code:
docker pull standardnotes/web:stable
docker run -d \
 --name='standardnotes-web' \
 -v /etc/localtime:/etc/localtime:ro \
 -v /etc/TZ:/etc/timezone:ro \
 --hostname='standardnotes-web' \
 --env-file /volume1/path/to/your_env_file/snweb.env \
 -p 3003:3000 \
 --restart='always' \
 standardnotes/web:stable

The env file:
Code:
# ENV setup Variables
# Do not include this new file in source control
#

TZ=Your/Timezone

RAILS_ENV=production
PORT=3000
WEB_CONCURRENCY=0
RAILS_LOG_TO_STDOUT=false
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=use "bundle exec rake secret"
APP_HOST=https://notes.yourdomain.com

EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
BATCH_MANAGER_LOCATION=extensions/batch-manager/dist/index.min.html
# Add your standardnotes-server URL here
SF_DEFAULT_SERVER=https://snserver.yourdomain.com

# Datadog
DATADOG_ENABLED=false
 
For if someone is interested in installing Standardnotes web:
Code:
docker pull standardnotes/web:stable
docker run -d \
--name='standardnotes-web' \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/TZ:/etc/timezone:ro \
--hostname='standardnotes-web' \
--env-file /volume1/path/to/your_env_file/snweb.env \
-p 3003:3000 \
--restart='always' \
standardnotes/web:stable

The env file:
Code:
# ENV setup Variables
# Do not include this new file in source control
#

TZ=Your/Timezone

RAILS_ENV=production
PORT=3000
WEB_CONCURRENCY=0
RAILS_LOG_TO_STDOUT=false
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=use "bundle exec rake secret"
APP_HOST=https://notes.yourdomain.com

EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
BATCH_MANAGER_LOCATION=extensions/batch-manager/dist/index.min.html
# Add your standardnotes-server URL here
SF_DEFAULT_SERVER=https://snserver.yourdomain.com

# Datadog
DATADOG_ENABLED=false
That is already part of the original article, added a few days ago.
 
If someone is interested in installing Standardnotes FileSafe bar extension:

Create a yaml file named file-safe.yaml in your existing extensions folder and add the following in the file:
Code:
---
id: org.standardnotes.file-safe
npm: sn-action-bar
github: standardnotes/filesafe-bar
main: dist/index.html

name: FileSafe
content_type: SN|Component
area: editor-stack
version: 2.0.10
marketing_url: https://standardnotes.org/extensions/filesafe
thumbnail_url: https://s3.amazonaws.com/standard-notes/screenshots/models/FileSafe-banner.png
description: Encrypted attachments for your notes using your Dropbox, Google Drive, or WebDAV server. Limited to 50MB per file.
flags: []
...

Re-build your extensions with python3 build_repo.py

If all went well you should now see the filesafe-bar folder in your extensions/public folder. And also between your extensions.

Screen_Shot 2.png

Screen_Shot 3.png
-- post merged: --

That is already part of the original article, added a few days ago.
Okay sorry for the double post!
 

Attachments

  • file-safe.yaml.zip
    868 bytes · Views: 3
Last edited:
Still no luck with my Android SN installation. When selecting one of those editors available (from Windows SN application, obviously), I get a 404 page not found.

It seems this is NOT related to any CORS or similar issue. My extesnions are reachable and even after setting up CORS (within HAProxy as reverse proxy running on my firewall, btw - and I do not want to exposed any of my Diskstations to WWW) the 404 does not disappear.

I think this is till related to the fact that many of those URLs that the docker container moookino/snext sends out in index.json, are not reachable:

Code:
{
    "identifier": "org.standardnotes.code-editor",
    "name": "Code Editor",
    "content_type": "SN|Component",
    "area": "editor-editor",
    "version": "1.3.5",
    "description": "Syntax highlighting and convenient keyboard shortcuts for over 120 programming languages. Ideal for code snippets and procedures.",
    "marketing_url": "https://standardnotes.org/extensions/code-editor",
    "thumbnail_url": "https://s3.amazonaws.com/standard-notes/screenshots/models/editors/code.jpg",
    "valid_until": "2030-05-16T18:35:33.000Z",
    "url": "https://s.murrum.eu/extensions/code-editor/1.3.5/index.html",
    "download_url": "https://github.com/sn-extensions/code-editor/archive/1.3.5.zip",
    "latest_url": "https://s.murrum.eu/extensions/code-editor/index.json"
}

This is just one of the exposed editors that is throwing a 404. Any of those links, beginning with , are resulting in 404 page not found, which IMO is the source of the problems.

This is the same error I see in the Android app when switching to any available editors. I do not get this error in the Windows application, btw. Using the very same extensions link.

I still would like to use a docker container for the extensions! All other services, like the SN sync server or MySQL are docker container, too. With other words, I do not want to expose Synology WebServer to external and what's more, the setup of the extensions is a bit complicated, e.g. download Python's PIP and some more files, setting up virtual hosts and much more.

So far I did not find a docker container for extensions that is runable out of the box.

I've tried w/o success: plaguedr/standard-notes-ext - this one does not start up because of missing .env files and a documentation does not exist.

moookino/snext which is currently running, is still returning just a 404's.

Edit: Just did a tcpdump for my Android tablet and indeed while switching editors, SN tries to contact murrum.eu, which obviously fails.
 
Still no luck with my Android SN installation. When selecting one of those editors available (from Windows SN application, obviously), I get a 404 page not found.

It seems this is NOT related to any CORS or similar issue. My extesnions are reachable and even after setting up CORS (within HAProxy as reverse proxy running on my firewall, btw - and I do not want to exposed any of my Diskstations to WWW) the 404 does not disappear.

I think this is till related to the fact that many of those URLs that the docker container moookino/snext sends out in index.json, are not reachable:

Code:
{
    "identifier": "org.standardnotes.code-editor",
    "name": "Code Editor",
    "content_type": "SN|Component",
    "area": "editor-editor",
    "version": "1.3.5",
    "description": "Syntax highlighting and convenient keyboard shortcuts for over 120 programming languages. Ideal for code snippets and procedures.",
    "marketing_url": "https://standardnotes.org/extensions/code-editor",
    "thumbnail_url": "https://s3.amazonaws.com/standard-notes/screenshots/models/editors/code.jpg",
    "valid_until": "2030-05-16T18:35:33.000Z",
    "url": "https://s.murrum.eu/extensions/code-editor/1.3.5/index.html",
    "download_url": "https://github.com/sn-extensions/code-editor/archive/1.3.5.zip",
    "latest_url": "https://s.murrum.eu/extensions/code-editor/index.json"
}

This is just one of the exposed editors that is throwing a 404. Any of those links, beginning with , are resulting in 404 page not found, which IMO is the source of the problems.

This is the same error I see in the Android app when switching to any available editors. I do not get this error in the Windows application, btw. Using the very same extensions link.

I still would like to use a docker container for the extensions! All other services, like the SN sync server or MySQL are docker container, too. With other words, I do not want to expose Synology WebServer to external and what's more, the setup of the extensions is a bit complicated, e.g. download Python's PIP and some more files, setting up virtual hosts and much more.

So far I did not find a docker container for extensions that is runable out of the box.

I've tried w/o success: plaguedr/standard-notes-ext - this one does not start up because of missing .env files and a documentation does not exist.

moookino/snext which is currently running, is still returning just a 404's.

Edit: Just did a tcpdump for my Android tablet and indeed while switching editors, SN tries to contact murrum.eu, which obviously fails.
Sorry to hear that you have so much problems with this. Maybe using the web station method might not be such a bad alternative after all?
 
Still no luck with my Android SN installation. When selecting one of those editors available (from Windows SN application, obviously), I get a 404 page not found.

It seems this is NOT related to any CORS or similar issue. My extesnions are reachable and even after setting up CORS (within HAProxy as reverse proxy running on my firewall, btw - and I do not want to exposed any of my Diskstations to WWW) the 404 does not disappear.

I think this is till related to the fact that many of those URLs that the docker container moookino/snext sends out in index.json, are not reachable:

Code:
{
    "identifier": "org.standardnotes.code-editor",
    "name": "Code Editor",
    "content_type": "SN|Component",
    "area": "editor-editor",
    "version": "1.3.5",
    "description": "Syntax highlighting and convenient keyboard shortcuts for over 120 programming languages. Ideal for code snippets and procedures.",
    "marketing_url": "https://standardnotes.org/extensions/code-editor",
    "thumbnail_url": "https://s3.amazonaws.com/standard-notes/screenshots/models/editors/code.jpg",
    "valid_until": "2030-05-16T18:35:33.000Z",
    "url": "https://s.murrum.eu/extensions/code-editor/1.3.5/index.html",
    "download_url": "https://github.com/sn-extensions/code-editor/archive/1.3.5.zip",
    "latest_url": "https://s.murrum.eu/extensions/code-editor/index.json"
}

This is just one of the exposed editors that is throwing a 404. Any of those links, beginning with , are resulting in 404 page not found, which IMO is the source of the problems.

This is the same error I see in the Android app when switching to any available editors. I do not get this error in the Windows application, btw. Using the very same extensions link.

I still would like to use a docker container for the extensions! All other services, like the SN sync server or MySQL are docker container, too. With other words, I do not want to expose Synology WebServer to external and what's more, the setup of the extensions is a bit complicated, e.g. download Python's PIP and some more files, setting up virtual hosts and much more.

So far I did not find a docker container for extensions that is runable out of the box.

I've tried w/o success: plaguedr/standard-notes-ext - this one does not start up because of missing .env files and a documentation does not exist.

moookino/snext which is currently running, is still returning just a 404's.

Edit: Just did a tcpdump for my Android tablet and indeed while switching editors, SN tries to contact murrum.eu, which obviously fails.
I tried this one but was getting some weird errors.
 
Sorry to hear that you have so much problems with this. Maybe using the web station method might not be such a bad alternative after all?
In the meantime, I did some more tests: I did set up extensions using a docker container and the web station. Both failed on Android when switching the editor.

They do not fail if I use the extensions URL in Windows App, both URLs to be precisely. This is true also for accessing SN from outside, e.g. in office or from LAN.

I'm using HAProxy as reverse proxy on my Firewall. CORS should be running as excpected if this is the cause at all - I doubt.

So next step is setting up the Web App, maybe this is the solution to all my issues. If yes, I will drop the Android app...
 
If someone is interested in installing Standardnotes FileSafe bar extension:

Create a yaml file named file-safe.yaml in your existing extensions folder and add the following in the file:
Code:
---
id: org.standardnotes.file-safe
npm: sn-action-bar
github: standardnotes/filesafe-bar
main: dist/index.html

name: FileSafe
content_type: SN|Component
area: editor-stack
version: 2.0.10
marketing_url: https://standardnotes.org/extensions/filesafe
thumbnail_url: https://s3.amazonaws.com/standard-notes/screenshots/models/FileSafe-banner.png
description: Encrypted attachments for your notes using your Dropbox, Google Drive, or WebDAV server. Limited to 50MB per file.
flags: []
...

Re-build your extensions with python3 build_repo.py

If all went well you should now see the filesafe-bar folder in your extensions/public folder. And also between your extensions.

View attachment 2312

View attachment 2313
-- post merged: --


Okay sorry for the double post!
Did the installation like you describe for the filesafe-bar but don't see any folder appearing!
 
Did the installation like you describe for the filesafe-bar but don't see any folder appearing!
How did you installed your extensions? did you get an error notification?
It should work out of the box, did you check the permissions of the yaml file?
If all goes well your output in e.g. Terminal should look like this:

EDIT: removed image that provided a public URL
 
Indeed strange! From your screenshot it looks good. Do you see the filesafe-bar extension folder in your public folder? Have you tried to remove the Repository link and re-enter it?
That is all I can think of at the moment
 
I promised to come back to report. Now, I've installed the docker container for SN webapp and I see the 404 here, too.

I stand correct when telling already, that the source of all the trouble is that the browser tries to contact a not-existent web address:
1603565225163.png

Obviously the Android App performs the same actions and fails while the native Windows app has no issues with that.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Article
Synology introduced Docker support back in May 2015. It was the start of a brand new era for Synology NAS...
Replies
0
Views
526
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below...
Replies
0
Views
758
  • Article
Installing Plex Media Server on a Synology NAS in DSM 7.1/7.2: A Step-by-Step Guide Plex Media Server is...
Replies
0
Views
2,163
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below...
Replies
0
Views
1,974
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below...
Replies
0
Views
3,019
  • Article
For anyone not familiar with Markdown it is a markup language for creating formatted text. It's been...
Replies
0
Views
2,173
  • Article
Table of contents Securing your registry Docker-compose Reverse proxy Pulling, tagging, and pushing...
Replies
0
Views
2,278

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top