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
- you add
admin = cleartext_pwd
and on the first run, couchdb will change the cleartext to the hashed representation of the password - the log level can be set to “debug” (https://docs.couchdb.org/en/stable/config/logging.html)
- you add
-
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
-
on Android the plugin says… only https urls work here
- so i setup Couchdb with https with a self signed cert and added that as trusted to Android…
- Chrome on Android then was able to connect to couchdb with ssl… other browsers dont as i already found out during gwd mitm presentation, they manage their own cert chain
- obsidian also has it’s own cert chain… that maybe i could edit???? but didn’t know how
- author saying self-signed certs don’t work: https://github.com/vrtmrz/obsidian-livesync/issues/123#issuecomment-1263108036
- so i setup Couchdb with https with a self signed cert and added that as trusted to Android…
-
python simple https server was used to test if the ssl stuff is not working because of smth to do with CouchDB
-
so i setup the domain obsidian.c2vi.dev to pint to ocih (a public server of mine)… got a Letsencrypt cert there, which was used for CouchDB
- i then point obsidian.c2vi.dev to the ip of fusu in the Hostsfile
- this works because of my Rooted Android
-
in the files you get from certbot from Letsencrypt … the fullchain.pem … is what should be used as the cert.pem file for webservers…
-
on tab (my epaper tablet) however the system partition has Android Kernel Write Protection…
- struggeling with EDL = Emergency Download Mode (Qualcom chips) … for ages, see tab
- tab group: write acces to / on tab
-
you need to fully reinstall obdisian (with deleting cache and data) …on Android… if you want to completely resync to this device
- otherwise you get loads of “Something went wrong getting a chunk”… and only a few files synced
- as mentioned here: https://github.com/vrtmrz/obsidian-livesync/issues/80#issuecomment-1155539201
-
changes made on phone came over to main (my main workstation) and that quite fast… but every edit i did on main… was just completely ignored…
-
even worse… if the same file was then changed on phone… it would revert the previous changes from main
-
-
quite some files were just replaced by an empty one (which thanks to my SVN = Subversion setup I can restore…)… for no conceivable reason…
- svn revs, that contain changes of files going empty: r116:r119
- command to turn those refs into obsidian link, to check through faster…
cat ~/things-problematic-files-log | awk '{print $1 " [[" $2$3$4$5$6$7$8$9 "]]"}'
- list of files, that got cleared and i revertet with svn Pasted Text - 92384792374
Resilio Sync…
-
WHYYYYYYYYYYYYYYY is Resilio Sync replacing
??
,< >
and some other things with____
… and creating duplicate files with the different name- Pasted image 20250316222557.png
- all the files of my vault, that got duplicated with replaced chars: Pasted Text - 2384922938469
-
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…
- has to have to do with the case insensitive paths on eg Windows (os, software)
-
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…