go-sync
go-sync copied to clipboard
How to make Brave use my docker as sync server? / How to self-host Brave sync?
After I run the docker based on this repo (few steps in README) e.g. on my local network, then how do I make Brave devices (both desktop and android) start syncing over my running docker instead of Brave cloud servers?
And after I manage that, I think it would be good to answer #81 to persist data - is it correct that this way I would have my self-hosted Brave Sync?
For the first part
On android: enable brave://flags/#enable-command-line-on-non-rooted-devices and then create /data/local/tmp/chrome-command-line and add --sync-url=192.168.x.x:8295/v2 to it starting with in underscore over adb
adb shell
echo "_ --sync-url=192.168.1.24:8295/v2" > /data/local/tmp/chrome-command-line
For linux Mac windows you can run the brave executable with feature flags
https://www.chromium.org/developers/how-tos/run-chromium-with-flags/
For persistent storage just mounting the /db on a docker volume is not enough as the amazon/dynamodb-local uses an in-memory dynamodb
Add a command in the docker compose with the -sharedDb -dbPath directive and then mount that path
https://stackoverflow.com/a/52853294
I wasn't able to switch on android to private sync server. sync-url in /data/local/tmp/chrome-command-line switches to https://clients4.google.com/chrome-sync regardles what ip is set in flag.
Verified configuration on brave://sync-internals
Correct url should contain protocol: _ --sync-url=http://192.168.1.24:8295/v2
Correct url should contain protocol:
_ --sync-url=http://192.168.1.24:8295/v2
Sorry if that wasnt clear.
/data/local/tmp/chrome-command-line
is a file.
It should contain 2 lines.
First line is an underscore _
Second is your URL --sync-url=http://192.168.1.24:8295/v2
After changing sync URL restart brave (clear from recents) for the effect to take place.