my process

curl -X PUT http://127.0.0.1:5984/_users -H "Authorization: Basic XXXXX"

curl -X PUT http://127.0.0.1:5984/obsidian -H "Authorization: Basic XXXXXXX"

curl -X GET http://127.0.0.1:5984/_all_dbs -H "Authorization: Basic XXXXXXX"

  • generate the cert and key: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 36500

  • was sindn des für scheiss err msgs: Pasted image 20250313195616.png

CouchDB

  • added to nix config:
  ############################ couchdb for Obsidian Live sync
  services.couchdb.enable = true;
  services.couchdb.extraConfigFiles = [ "/home/files/storage/files/stuff/obsidian-live-sync/local.ini" ];
  services.couchdb.databaseDir = "/home/files/storage/files/stuff/obsidian-live-sync/data";
  • don’t forget to open firewall port…

  • that does not start, but turning all Environment vars, execstart and exexPreStart into a run script like so Pasted Text - 29384298374923 and running that with sudo, makes it run

  • the local.ini: Pasted Text - 2938472938

  • make sure, the obsidian-live-sync/data folder exists…

  • cochdb only listens on the ip from the tailscale network…

Tailscale

  • to add another layer of encription and not need to expose the Couchdb port to the internet
  • and also, this will route through the local network when home…
  • all just magically worked here… Tailscale is AWSOME

HTTPS = Hyper Text Transfer Protocol Secure

Resilio Sync

  • WHYYYYYYYYYYYYYYY is Resilio Sync replacing ??, < > and some other things with ____… and creating duplicate files with the different name

  • also Resilio Sync creates a second file, when i rename and only change the case, wich the old caseing… then i then rm one of the two.. both get deleted…

  • with resilio changes take up to 20 secs to get synced… but the do reliably make it across…

    • the delay is not so much a problem, if kept in mind… and edits on different devies are 30s apart..
  • there is a special problem with daily notes though…

    • if i create the one for today… and fill it in… then run the “Open Todays note” command on tab, before it synced (it can also happen, that it never syncs untill i am next at the laptop, because i modified the daily note and then right after hibernated the pc… this is quite a common workflow for me)… it will also create a new daily note there, which is empty… this one will have the newer modified time… and therefore replaces the one from the laptop, when it next gets online…
    • solution: use the “Open next daily note” command, which does not create a new note… and only works, when the existing note is already synced

things

  • the dev console shows a CORS = Cross Origin Resource Policy error, when a TCP connection to te DB cant be established (eg because the /etc/hosts file was reset due to a nixrebuild)… which has nothing to do with cors…