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...
 

Rusty

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
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.
 
84
13
NAS
DS918+, DS916+, DS214+, DS211j
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.
 

Rusty

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
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.
 
84
13
NAS
DS918+, DS916+, DS214+, DS211j
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...
 
84
13
NAS
DS918+, DS916+, DS214+, DS211j
@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

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
@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
 
89
26
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: 4

Rusty

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
For if someone is interested in installing FileSafe:
Still missing from my article as well. Didn't have time to deal with it over this week but will test it for sure.

Excellent addition to this discussion!
 
89
26
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
 

Rusty

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
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.
 
89
26
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: 1
84
13
NAS
DS918+, DS916+, DS214+, DS211j
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.
 

Rusty

Moderator
NAS Support
2,370
703
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
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?
 
89
26
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.
 
84
13
NAS
DS918+, DS916+, DS214+, DS211j
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...
 
127
33
NAS
DS918+, DS1815+
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
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!
 
89
26
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
 
127
33
NAS
DS918+, DS1815+
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
That's strange, I don't see any error and the extension is not installed.

Screenshot 2020-10-21 at 19.49.25.png


What I am doing, it does not work for me. And no error.
 
89
26
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
 
84
13
NAS
DS918+, DS916+, DS214+, DS211j
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.

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Trending threads

Top