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 15:04] – willy | services:silverbullet [2025/04/17 06:53] (current) – willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Silverbullet ====== | ====== Silverbullet ====== | ||
| - | [[https:// | + | [[https:// |
| ===== Installation ===== | ===== Installation ===== | ||
| Line 8: | Line 8: | ||
| <code bash> | <code bash> | ||
| useradd -d / | useradd -d / | ||
| - | </bash> | + | </code> |
| 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. | 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. | ||
| Line 17: | Line 17: | ||
| </ | </ | ||
| - | Now, just download the latest release from [[https:// | + | Now, just download the latest release from [[https:// |
| <code bash> | <code bash> | ||
| + | mkdir / | ||
| + | chown silverbullet: | ||
| su - silverbullet | su - silverbullet | ||
| wget ' | wget ' | ||
| Line 32: | Line 34: | ||
| Here is the NGINX configuration file: | Here is the NGINX configuration file: | ||
| <file - silverbullet.conf> | <file - silverbullet.conf> | ||
| - | # Manage tunnels request from external server | + | |
| - | # casa.gardiol.org is the main domain | + | access_log / |
| - | # old.gardiol.org is the " | + | error_log / |
| - | # HTTPS listen on a custom port (8443) because this is authenticated | + | |
| + | # login protected access from outside | ||
| server { | server { | ||
| server_name notes.mydomain.com; | server_name notes.mydomain.com; | ||
| listen 8443 ssl; | listen 8443 ssl; | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | location |
| - | | + | |
| - | client_max_body_size 512M; | + | include "com.mydomain/ |
| - | proxy_pass http:// | + | if ($http_origin = '' |
| + | set $http_origin " | ||
| + | } | ||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| } | } | ||
| - | include certbot.conf; | ||
| } | } | ||
| Line 54: | Line 63: | ||
| # HTTPS on port 443 for direct local connections | # HTTPS on port 443 for direct local connections | ||
| server { | server { | ||
| - | server_name notes.gardiol.org; | + | server_name notes.mydomain.com; |
| listen 443 ssl; | listen 443 ssl; | ||
| - | | + | |
| - | | + | |
| - | location / { | + | location / { |
| - | client_max_body_size 512M; | + | if ($http_origin = '' |
| - | proxy_pass http:// | + | set $http_origin " |
| - | } | + | } |
| - | include certbot.conf; | + | |
| - | } | + | |
| + | client_max_body_size 512M; | ||
| + | | ||
| + | | ||
| + | } | ||
| </ | </ | ||
| Line 79: | Line 92: | ||
| pidfile="/ | pidfile="/ | ||
| command_background=true | command_background=true | ||
| - | command="/ | + | command="/ |
| command_args="/ | command_args="/ | ||
| command_user=" | command_user=" | ||
| + | output_log="/ | ||
| + | output_err="/ | ||
| depend() { | depend() { | ||