xBrowserSync is a free tool for syncing browser data between different browsers and devices, built for privacy and anonymity. For full details, see the project's homepage.
This Railway starter contains the necessary Dockerfile and other niffty gitty stuff in order for you to successfully configure and run your own xBrowserSync API server.
- Create an new project with this template using the deploy button below.
-
After everything is provisioned, install
mongosh
, connect to your MongoDB instance withmongosh <railwayapp-mongodb-url-here>
and run the following inside the shell, one by one:use admin db.createUser({ user: "xbrowsersyncdb", pwd: "[password]", roles: [ { role: "readWrite", db: "xbrowsersync" }, { role: "readWrite", db: "xbrowsersynctest" } ] }) use xbrowsersync db.newsynclogs.createIndex( { "expiresAt": 1 }, { expireAfterSeconds: 0 } ) db.newsynclogs.createIndex({ "ipAddress": 1 })
Remember to generate an secure secret using the
Generate a 32-character secret
in the Command Patlete (Cmd+K) and replace[password]
with that generated secret. -
Go to Variables and set
XBROWSERSYNC_DB_PWD
into that generated secret you set forxbrowsersyncdb
user. -
Wait for the deployment to be restarted. Once successfully deployed, welcome aboard! If your server is also public, the xBrowserSync project maintainers recommend you to add a TTL index on bookmarks.lastAccessed to delete syncs that have not been accessed for atleast 3 weeks using the following command:
use xbrowsersync db.bookmarks.createIndex( { "lastAccessed": 1 }, { expireAfterSeconds: 21*86400 } )
It's advisable to ensure your repository is private. DO NOT DO THIS on public repos and instead edit the template file instead.
- Copy the contents of
settings-template.json
tosettings.json
and edit as needed. Remember to replace the environment variables with its real values since the entrypoint scipt won't parse them all! - Comment out L11 and uncomment L10 in Dockerfile to make use of your config.
- Don't forget to commit and push so Railway can catch these changes.
⚠️ Remember not to downgrade versions as this might be an cause for downtime shitshows of your service.
- Visit https://github.com/xbrowsersync/api/releases and find the latest version. As of writing of the docs, it's
1.1.13
. - In the variables page, set
XBROWSERSYNC_API_VERSION
into that version. This will trigger an redeploy so please hold on.
MIT