Today I discovered silverbullet and looks so interesting but some questions comes to my mind.
What I firstly was looking for, was for a way to sync my “vault” to my phone and access it from there, using syncthing. AFAIK Issue here is silverbullet can’t access local files on my phone then, I have to try my second option.
Second option is to access to silverbullet on my computer from my phone, and sync for offline use, but then, my doubt is, how I will sync back to my computer when come back to home?
I know hosting somewhere and access a 24/7 server is an option, but right now I’m trying to avoid this solution and trying to see if there are alternatives
Right now my heart is divided between org-mode, logseq, obsidian and anytype and what one offers me,the others are missing. Silverbullet looks perfect for desktop and mobile use, opensource, and scripting over the pages for complex queries and calcs, but I would love to be able to work offline
Your first option is not going to work with SilverBullet, so we only have option 2.
A few things here:
You can run SilverBullet on your PC, use it locally most of the time.
In principle, you can also connect to it from your mobile phone when you’re on your local network and sync everything locally (using Sync mode, which will be the only mode in v2). The one caveat here is that for the mobile PWA version to be operational (so work without a connection to your home PC), you need to access it via HTTPS. This is a browser restriction, not of my choosing. This means that you somehow have to get your PC an SSL certificate.
You then have two options: you expose your local PC even outside your local network (via the funnel mode described in that topic), or just locally inside your LAN. If you expose it in funnel mode you don’t need a Tailscale client on your mobile device, otherwise you do.
What you can then do is this: open the mobile version when your PC is on to have it sync. You can then shut down your PC if you wish, or leave the home with your mobile phone. All features should remain operational without a connection (again: in sync mode). Then, when you like, you boot up your PC, open up the mobile version, and have everything sync again.
This means if I work with silverbullet from PWA offline, when I wake up my computer again, will sync back changes done from my phone to the computer? Or offline from PWA mainly is for readonly because changes will be lost while offline?
Sync kicks in for the current file every second or so, for the whole space roughly every 20s, you don’t need to explicitly run this although there is a Sync: Now command.
When there is no connection to the server (again: if you’re in Sync mode), your top bar will appear in yellow, but everything will still work (except features that require running shell commands, like for instance Git). Your files are still editable, your queries still update.
One thing might be confusing here. SB itself is only a server. When you access it on your PC you do it through a browser. And you do this through a browser on mobile too.
So there are three components here, and no “sides” You’ll also have three copies of your notes - one on the server, one on mobile and one on PC (if you run server on PC then there are the files and the browser copy of the files).
When you do the Sync: Now operation, it synchronizes your current client with the server. (@zef correct me here if I’m wrong - it’s my educated guess)
So here is an example “flow”:
you are working on mobile and you change and create some notes; at this point only mobile is aware of it
once the sync on mobile is done the server will have the changes, but the PC will not
once the sync on PC is done, it will fetch the changes from the server
Now, given that single page sync fires every ~second and full sync fires every ~20s. It might take up to ~2s (when viewing the same page) or up to ~40s for other pages, for the changes to propagate between mobile and PC clients (unless you invoke Sync: Now first on mobile, then on PC yourself).
The key part here is to understand that there is the server and multiple clients, and the clients only talk to a server and sync changes once in a while.