Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:silverbullet [2024/08/07 14:54] – willy | services:silverbullet [2024/09/05 12:56] (current) – [Startup] willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Silverbullet ====== | ====== Silverbullet ====== | ||
+ | [[https:// | ||
+ | ===== Installation ===== | ||
+ | |||
+ | As usual you need a dedicated user: | ||
+ | <code bash> | ||
useradd -d / | useradd -d / | ||
+ | </ | ||
+ | |||
+ | Note that i am adding it to the **users** group because i want to share the notes (which are plain md files) via Syncthing later on. | ||
+ | |||
+ | Set umask to 0002 in bashrc, so that any md files created by Silverbullet will also be accessible to all users in **users** group: | ||
+ | <code bash> | ||
+ | echo "umask 0002" >> / | ||
+ | </ | ||
+ | |||
+ | Now, just download the latest release from [[https:// | ||
+ | <code bash> | ||
+ | su - silverbullet | ||
+ | wget ' | ||
+ | unzip silverbullet-server-linux-x86_64.zip | ||
+ | </ | ||
+ | |||
+ | And you are all set! You will need to define a folder to store the notes, i will assume it's / | ||
+ | |||
+ | ===== Reverse proxy ===== | ||
+ | |||
+ | Silverbullet requires a dedicated subdomain, it will not work on subpath. I will assume it's **notes.mydomain.com**. Also, since Silverbullet do not manage authentication, | ||
+ | |||
+ | Here is the NGINX configuration file: | ||
+ | <file - silverbullet.conf> | ||
- | umask 0002 in bashrc | + | access_log / |
+ | error_log / | ||
- | Download: | + | # login protected access from outside |
- | https:// | + | server { |
+ | server_name notes.mydomain.com; | ||
+ | listen 8443 ssl; | ||
+ | http2 on; | ||
+ | include " | ||
+ | |||
+ | location | ||
+ | | ||
+ | | ||
+ | if ($http_origin = '' | ||
+ | set $http_origin " | ||
+ | } | ||
+ | | ||
+ | | ||
- | https://github.com/ | + | |
+ | | ||
+ | } | ||
+ | } | ||
- | unzip silverbullet-server-linux-x86_64.zip | + | # Manage direct request inside home network |
+ | # It's identical to the remote one, but it has no authentication | ||
+ | # HTTPS on port 443 for direct local connections | ||
+ | server | ||
+ | server_name notes.mydomain.com; | ||
+ | listen 443 ssl; | ||
+ | http2 on; | ||
+ | |||
+ | location / { | ||
+ | if ($http_origin = '' | ||
+ | set $http_origin " | ||
+ | } | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | </ | ||
- | ./ | + | Note: do not just copy and paste this file, you need to understand it and adapt where needed. |
===== Startup ===== | ===== Startup ===== | ||
Line 26: | Line 90: | ||
pidfile="/ | pidfile="/ | ||
command_background=true | command_background=true | ||
- | command="/ | + | command="/ |
- | command_args="/ | + | command_args="/ |
command_user=" | command_user=" | ||