A service for sharing encrypted Markdown notes from Obsidian. Notes are end-to-end-encrypted and are only stored temporarily.

Overview

📝 Noteshare.space

Noteshare.space is a service for sharing encrypted Markdown notes from Obsidian. Notes are end-to-end-encrypted and are only stored temporarily.

I created this service largely for my own use, as I was tired of relying on third-party services to quickly share some Markdown notes I wrote in Obsidian. Because I believe that others may find this useful, I chose to make it available as a public service.

Preview of a noteshare.space shared note

Feedback

The preferred way to report bugs or request new features for the web app or the Obsidian plugin is via the GitHub issues page.

If you want a more interactive way to discuss bugs or features, you can join the Discord server.

Local development

Each subproject (plugin, server, and webapp) is its own npm package with its own configuration and build tooling:

| (root)
|-- package.json
|-- docker-compose.yml
|-- plugin/        // (Obsidian plugin, as submodule at mcndt/obsidian-quickshare)
	|-- package.json
	|-- Dockerfile
|-- server/        // (Express + Prisma + SQLite)
	|-- package.json
	|-- Dockerfile
	|-- prisma/
		|--- Dockerfile
|-- webapp/        // (SvelteKit web application)
	|-- package.json
	|-- Dockerfile

It is necessary to run npm install in every subproject as well as the root.

The root package.json contains a dev script to facilitate simultaneous development of all three components:

npm run dev

Running the script starts a dev server for each, recompiling code on file changes. A reverse proxy (proxy.js in project root) runs the entire application at http://localhost:5000.

If you want to contribute solely to the Obsidian plugin, please pull from the obsidian-quickshare repo directly.

Before you can store notes in the local development environment, you must migrate the local SQLite database (see next section).

Local database

SQLite is used to store encrypted notes during local development as well as in production.

Before you can store notes during local development, you must migrate the local database:

npx prisma migrate deploy

To update the schema and add new migrations, please take a look at the Prisma docs.

Docker Compose

You can run the docker-compose configuration used on the production server locally using the docker-compose.yml file provided in the project root directory:

docker-compose up --build

The compose configuration will:

  1. Build images for the storage server, frontend app, and database migration service.
  2. Mount a persistent volume for the SQLite database
  3. Run Traefik reverse proxy on port 5000
  4. Automatically run prisma migrate deploy to keep the database schema up-to-date.
  5. Start the storage service and web application after succesfuly database migration.

The docker-compose.yml file is suited for testing on a Windows-based system. If you are running locally on Linux or deploying to a server, you will have to change some of the configuration in the Compose file. See this thread for more info.

Environment variables

Both the webapp and server have use environment variables for configuration.

The documentation for the environment variables of each process are kept in the .env.example files in their respective subdirectories.

Setting environment variables in production

.env files are not used in docker-compose deployments.

Most env variables are set in the docker-compose file directly using the environment property. Build-time variables are set using the args property. See docker-compose.yml for an example.

Deployment

I currently deploy the server + webapp using Docker-compose.

The host web server must combine the two services (webapp at port 3000, server at port 8080) into a single HTTPS service using a reverse proxy. I used Traefik in the example docker-compose. The following route mapping must be applied:

  1. https/POST @ /api/note -> http://0.0.0.0:8080/api/note
  2. https/GET @ *http://0.0.0.0:3000/*

The reverse proxy is already set up for HTTP in the example docker compose file. some adaptations are still needed to enable TLS.

[!Warning] Don’t forget to set up TLS! When deploying the application, it is strongly encouraged to run all traffic to the Traefik entrypoint over TLS, e.g. using a self-signed certificate or a cert signed by letsencrypt.

Caching

To limit load on the origin server, traffic to https://noteshare.space/note/* is proxied through Cloudflare servers. By default, Cloudflare does not cache HTML content.

To enable this, I added a custom page rule on noteshare.space/note/* to cache all content.

Comments
  • Rendering Footnotes

    Rendering Footnotes

    It would be good if footnotes were rendered in the copied file.

    In my use case, I write comments and place tags and other annotations in footnotes, but for sharing with others those would be better at the foot of the rendered file.

    feature 
    opened by stoweboyd 10
  •  [Security] Static IV during encryption/decryption

    [Security] Static IV during encryption/decryption

    Leaving notes on this repository as well (Originated from https://github.com/mcndt/obsidian-quickshare/issues/21)


    Came from https://mcndt.dev/posts/how-to-e2e-encryption/ 👋🏻

    Describe the bug

    Currently the code sets the IV to static value of 0s, and this is considered to be insecure.. Consider randomizing your IVs.

    https://github.com/mcndt/obsidian-quickshare/blob/73733c0292cb3f0d6775c69c734e80c690932777/src/crypto/crypto.ts#L45-L49

    https://github.com/mcndt/noteshare.space/blob/f84ddba528b73c160a16b707ede064b752d3528a/webapp/src/lib/crypto/decrypt.ts#L54-L59

    Also, please consider reading https://security.stackexchange.com/a/17046 with regards to secure usage of AES-CBC on your service. I honestly think it's better off to do something with GCM than with CBC mode.

    opened by stypr 2
  • [Feature request] Transparency of ops expenses

    [Feature request] Transparency of ops expenses

    This is a lovely idea. It is very generous of you to offer it freely to the community!

    Would you be willing to write a small doc describing the monetary and personal costs of operating this service?

    As a dev, I'm well aware that there's often a lot more that goes into a service than just writing it and deploying a docker image. Not asking for humble brags: just for you to get the recognition and, ideally, deserves community support.

    Cheers!

    documentation 
    opened by elight 2
  • [Feature request] Updating published notes

    [Feature request] Updating published notes

    Is your feature request related to a problem? Please describe. Currently, when editing a note that you previously published (for example, when you shared a budget breakdown with a friend and they noticed an issue), you have to re-share the note, which also involves sending a new link to the share partner.

    Describe the solution you'd like A command named something like Updated shared note would be nice that, when invoked, updates the note at the location that the previous link was already pointing to.

    It would be extra useful to have a feature that causes selected notes to be updated automatically whenever they change (or whenever they're saved to disk by Obsidian).

    Thanks!

    feature request 
    opened by Ellpeck 2
  • [Bug] certain characters escape tag rendering

    [Bug] certain characters escape tag rendering

    Originally posted in https://github.com/mcndt/obsidian-note-sharing/issues/6:

    It seems ü and - among others break the rendering of tags:

    image

    Text in the picture:

    > [!metadata]-
    > - *status*:: draft
    > - *source*:: [[2022-04-25 Pathologie Vorlesung]]
    > - *tags*:: #krankheitsbild/entzündung #anatomie/darm 
    > - *course*:: [[Pathologie]]
    > - *review*:: #review/semester-5/pathologie 
    
    ### Epidemiologie
    
    bug 
    opened by mcndt 2
  • [Bug] Shorthand strikethrough markdown not displayed properly

    [Bug] Shorthand strikethrough markdown not displayed properly

    Describe the bug

    Obsidian allows for a "shorter" strikethrough format where ~~ is only needed at the beginning of a line to strikethrough the entire line. noteshare.space does not seem to support this

    To Reproduce

    Create & share a note with the following text:

    ~~This is a test

    Expected behavior

    In Obsidian, this produces:

    ~~This is a test~~

    Screenshots

    Screenshot comparing Obsidian vs noteshare.space:

    image

    Environment (please complete the following information):

    • OS: Windows 11
    • Browser: Brave (latest)
    • Obsidian Version: 1.0.3
    opened by derekantrican 1
  • [Feature] add user_id field to anonymously estimate active users

    [Feature] add user_id field to anonymously estimate active users

    user_id should be a random id (e.g. uuid v4) that is used to indicate notes originate from the same user. From this, I can estimate the amount of active users per week/month with no or limited impact on privacy.

    feature 
    opened by mcndt 1
  • [Feature] Use bloom filters to detect request of expired notes

    [Feature] Use bloom filters to detect request of expired notes

    • Improved UX: user knows that the link has expired instead of containing a typo
    • Good perf: check if note ID has ever existed in O(1) time

    Use e.g. https://www.npmjs.com/package/bloom-filters

    feature 
    opened by mcndt 1
  • [Bug] codeblocks with an unregistered language tag render as

    [Bug] codeblocks with an unregistered language tag render as "undefined"

    Describe the bug codeblocks with an unregistered language tag render as "undefined" because Highlight.js throws an exception.

    To Reproduce Steps to reproduce the behavior:

    • Share a note with an unknown lang codeblock (e.g. a dataview query)
    • Example: https://noteshare.space/note/cl6j4lu6b232601mm9t6gtvz4#kbohsMequ_WZDYIdsAncLt4wY7kTThjxJF2Smfo32eY

    Expected behavior

    • The codeblock renders without syntax highlighting

    Screenshots

    e.g.

    ```dataview
    LIST FROM [[]] AND -(outgoing([[]]))
    ```
    

    renders as:

    image

    Environment (please complete the following information):

    • All

    Additional context Add any other context about the problem here.

    bug 
    opened by mcndt 1
  • [Feature] syntax highlighting on code blocks

    [Feature] syntax highlighting on code blocks

    From https://github.com/mcndt/obsidian-note-sharing/discussions/2:

    Code/pre block syntax highlighting would be a welcomed feature for myself and (I assume) other developers.

    example: https://noteshare.space/note/cl6h0wmu1100201mmaukatezp#-EpcJipLRUrjttQiQ8Iu_UHypWLLez0wIjb2GLHkgzU

    Very well-thought out service you've created here.

    feature 
    opened by mcndt 1
  • [Refactor] Migrate to SubtleCrypto

    [Refactor] Migrate to SubtleCrypto

    SubtleCrypto is a web standard and built into most browsers, offering better reliability and performance.

    I see this as a blocking issue for image embedding.

    enhancement 
    opened by mcndt 0
  • [Bug] Inline Links to headings are not functional

    [Bug] Inline Links to headings are not functional

    Hi Maxine,

    enjoy your service to share docs with the small circle of my reading group. Trying to make a content section with live-links to some headings in the text below doesn't seem to work. Link Syntax [[Anuruddha - Sāriputta#With Anuruddha (2nd) / Sujato]] -> this is rendered as faint blue text but not live. Since all the external links are working beautifully I thought this might be more of a bug rather than a feature reqeust... Thanks for looking into it.

    • OS: macOS 12.6.1
    • Browser Opera / Vivaldi / Safari
    • Version 1.01

    Screenshot.pdf Happy to send a link to the document if this is helpful.

    bug 
    opened by kithairon 4
  • [Feature request] Burn after read / link expiration date

    [Feature request] Burn after read / link expiration date

    Hi,

    It'd be a great addition to this plugin to enable a burn after read feature. The ability of setting an expiration date for a link would be nice as well.

    Thanks, Pedro

    feature request 
    opened by pedrompcaetano 3
  • [Bug] Inline footnotes are not rendered

    [Bug] Inline footnotes are not rendered

    Currently inline footnotes are not rendered correctly. See the discussion from #24:

    Yes, it is an inline footnote. Like^[this is a footnote] which shows at the foot of the rendered file with an ordinal and the text. See https://help.obsidian.md/How+to/Format+your+notes

    You can also use inline footnotes. ^[notice that the carat goes outside of the brackets on this one.]

    On Fri, Sep 9, 2022 at 4:53 PM Maxime Cannoodt ***@***.***> wrote:

    So sorry for my late response, I have been traveling.

    I am unfamiliar with this footnote syntax. Is it a way to define the footnote text inline? I was previously only familiar with this syntax:

    This is a paragraph^[1].

    [1]: This is the footnote text, which will be rendered at the bottom of the page.

    — Reply to this email directly, view it on GitHub https://github.com/mcndt/noteshare.space/issues/24#issuecomment-1242461344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXFR3XNZE4KQCMY5H4SLLDV5OPTFANCNFSM57IF3PZA . You are receiving this because you authored the thread.Message ID: ***@***.***>

    Originally posted by @stoweboyd in https://github.com/mcndt/noteshare.space/issues/24#issuecomment-1242593539

    bug 
    opened by mcndt 0
Owner
Maxime Cannoodt
🖐 I’m a computer science engineer with interest in a wide range of topics, including productivity, PKM, artificial intelligence, and product development.
Maxime Cannoodt
A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

Zotero Obsidian Citations Adds colored tags to Zotero items that have associated Markdown notes stored in an external folder. Open an associated Markd

Dae 210 Jan 4, 2023
Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Obsidian daily notes opener This plugin adds a command for opening daily notes in a new pane (so that a keyboard shortcut could be used!) and gives ex

Xiao Meng 16 Dec 26, 2022
Send encrypted messages and decrypt them without sharing keys. Built using the Handshake blockchain.

zmsg Encrypt and decrypt messages using AEAD with an ephemeral key Learn more by joining the Handshake Discord Community I noticed that there wasn't a

Publius Federalist 31 Jul 27, 2022
Generate colorful and temporarily identifiable SVGs with unique urls.

reptiles.dev Generate colorful and temporarily identifiable SVGs with unique urls.

Tim Mikeladze 7 Dec 6, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

Obsidian Publish This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur only, currently) and ex

Addo.Zhang 7 Dec 13, 2022
A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.

Multi-Column Markdown Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document lay

Cameron Robinson 91 Jan 2, 2023
Easily publish notes to the web This plugin integrates with obsius.site to publish markdown notes on the web.

Obsius Publish Easily publish notes to the web This plugin integrates with obsius.site to publish markdown notes on the web. Limitations The type of c

Jon Grythe Stødle 66 Dec 20, 2022
Plugin for Obsidian.md to send markdown notes to Buttondown.email

Obsidian Buttondown Plugin Buttondown is a tool for producing email newsletters. It likes emails written in Markdown, and has an API. This plugin allo

Caro 4 Nov 15, 2022
An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor.

Obsidian Excel to Markdown Table An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor. Demo You can paste the copied Excel d

Ganessh Kumar 108 Jan 4, 2023
End-to-end encrypted environments

Welcome to the EnvKey v2 monorepo! All EnvKey's open source code lives here. End-to-end encrypted environments Fixes configuration sprawl and sloppy s

EnvKey 360 Jan 1, 2023
An end-to-end encrypted note taking alternative to Evernote

Notesnook An end-to-end encrypted note taking alternative to Evernote. Website | About us | Roadmap | Downloads | Twitter | Discord To celebrate the o

Streetwriters 4.9k Dec 28, 2022
An Obsidian plugin for automatically creating notes when linking to non-existing notes

Note Auto Creator for Obsidian Automatically create notes when links are created to them. How to use After enabling the plugin in the settings menu, y

Simon Clement 31 Dec 14, 2022
Obsidian Web: Connect your browser with your Obsidian notes

Obsidian Web: Connect your browser with your Obsidian notes This is an unofficial Chrome extension for Obsidian that lets you send content from the we

Adam Coddington 97 Jan 3, 2023
A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Carlo Zottmann 6 Dec 26, 2022
A file-sharing app providing end-to-end encryption of data.

secsend secsend is a file-sharing app providing end-to-end encryption of data. It provides a web application and a command-line interface (CLI). demo.

Adrien Guinet 28 Dec 22, 2022
An easy to use, selfhostable image sharing service

Picsur Totally not an imgur clone I couldn't really find any open source project that allowed you to easily host images. So I decided to create one. I

Rubikscraft 140 Jan 4, 2023