Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make Brave use my docker as sync server? / How to self-host Brave sync? #126

Open
tomasz-lasko opened this issue May 1, 2023 · 3 comments

Comments

@tomasz-lasko
Copy link

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?

@ippocratis
Copy link

ippocratis commented Jun 15, 2023

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

@sgflt
Copy link

sgflt commented May 26, 2024

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

@ippocratis
Copy link

ippocratis commented May 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants