selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

xBrowserSync logo

Self-host xBrowserSync

v1.1.13

Self-hosted browser sync API for bookmarks and history

ReleaseOpen SourceGPL-3.0
Updated5 years ago
LanguageTypescript
Setup difficultyModerate
Stars
855
Port
8080 (HTTP API server)
Requires
MongoDB
Docker
xbrowsersync/api
Install with Docker
xBrowserSync screenshot 1xBrowserSync screenshot 2xBrowserSync screenshot 3xBrowserSync screenshot 4

What is xBrowserSync?

xBrowserSync API is the server-side REST service that powers xBrowserSync, a privacy-focused browser synchronization tool. It enables users to sync bookmarks and other browser data across different browsers and devices without creating accounts or sharing personal data. All data is encrypted on the client before transmission. The API can be self-hosted via Docker, Docker Compose (with MongoDB and Caddy reverse proxy), or manual Node.js installation. It requires MongoDB as a database and Node.js as the runtime. The service exposes a REST API on port 8080 by default, with configuration via JSON file and environment variables. The project is licensed under GPL-3.0 and accepts donations via Liberapay.

Should you self-host xBrowserSync?

xBrowserSync scores 54/100 on selfhost.directory (how scoring works) and ranks #17 of 46 in Bookmarks & Link Sharing. It has 855 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is GPL-3.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Karakeep (82/100, 30 114 stars). It scores higher overall, so compare the two before you pick. See xBrowserSync vs Karakeep side by side.

Features

  • Anonymous usage
  • Configurable sync limits
  • CORS Configuration
  • Cross-browser bookmark sync
  • End-to-end encryption
  • Geographic location tagging
  • HTTPS Support
  • Logging
  • Proxy Support
  • Rate Limiting
  • REST API
  • Service status messaging

xBrowserSync README

How to install xBrowserSync

Install xBrowserSync with Docker

MongoDB instance
Environment variables
XBROWSERSYNC_DB_USER, XBROWSERSYNC_DB_PWD

docker run --name xbs-api -p 8080:8080 -e XBROWSERSYNC_DB_USER -e XBROWSERSYNC_DB_PWD -v /path/to/settings.json:/usr/src/api/config/settings.json -d xbrowsersync/api

Requires external MongoDB instance and optional reverse proxy

How to configure xBrowserSync

  • dailyNewSyncsLimit3The maximum number of new syncs that a user can create per day.

    The maximum number of new syncs that a user can create per day.

    values: Integer, 0 to disable

  • db.authSourceadminThe database to use for authentication.

    The database to use for authentication.

    values: Database name

  • db.connTimeout30000The connection timeout period to use for MongoDB.

    The connection timeout period to use for MongoDB.

    values: Milliseconds

  • db.host127.0.0.1The MongoDB server address to connect to.

    The MongoDB server address to connect to.

    values: Hostname, IP address, or UNIX domain socket

  • db.namexbrowsersyncName of the MongoDB database to use.

    Name of the MongoDB database to use.

    values: Database name

  • db.passwordPassword of the account used to access MongoDB. Set as empty string to use environment variable XBROWSERSYNC_DB_PWD.

    Password of the account used to access MongoDB. Set as empty string to use environment variable XBROWSERSYNC_DB_PWD.

    values: String or empty for env var

  • db.port27017The port to use to connect to MongoDB.

    The port to use to connect to MongoDB.

    values: Port number

  • db.sslfalseConnect to MongoDB over SSL.

    Connect to MongoDB over SSL.

    values: true/false

  • db.usernameUsername of the account used to access MongoDB. Set as empty string to use environment variable XBROWSERSYNC_DB_USER.

    Username of the account used to access MongoDB. Set as empty string to use environment variable XBROWSERSYNC_DB_USER.

    values: String or empty for env var

  • db.useSRVfalseUse MongoDB's DNS Seedlist Connection Format to connect to the database.

    Use MongoDB's DNS Seedlist Connection Format to connect to the database.

    values: true/false

  • locationgbThe geographic location of the service, determined by an ISO 3166-1-alpha-2 code.

    The geographic location of the service, determined by an ISO 3166-1-alpha-2 code.

    values: ISO 3166-1-alpha-2 code

  • log.file.enabledtrueIf set to true, Bunyan will be used to capture minimal logging to file.

    If set to true, Bunyan will be used to capture minimal logging to file.

    values: true/false

  • log.file.levelinfoBunyan log level to capture.

    Bunyan log level to capture.

    values: trace, debug, info, warn, error, fatal

  • log.file.path/var/log/xBrowserSync/api.logFile path to log messages to.

    File path to log messages to.

    values: File path

  • log.file.rotatedFilesToKeep5Maximum number of rotated log files to retain.

    Maximum number of rotated log files to retain.

    values: Integer

  • log.file.rotationPeriod1dThe period at which to rotate log files.

    The period at which to rotate log files.

    values: String format $number$scope (ms, h, d, w, m, y) or named periods

  • log.stdout.enabledtrueIf set to true, Bunyan will be used to capture minimal logging to stdout.

    If set to true, Bunyan will be used to capture minimal logging to stdout.

    values: true/false

  • log.stdout.levelinfoBunyan log level to capture for stdout.

    Bunyan log level to capture for stdout.

    values: trace, debug, info, warn, error, fatal

  • maxSyncs5242The maximum number of unique syncs to be stored on the service.

    The maximum number of unique syncs to be stored on the service.

    values: Integer, 0 to disable

  • maxSyncSize512000The maximum sync size in bytes.

    The maximum sync size in bytes.

    values: Bytes

  • server.behindProxyfalseSet to true if service is behind a proxy, client IP address will be set from X-Forwarded-For header.

    Set to true if service is behind a proxy, client IP address will be set from X-Forwarded-For header.

    values: true/false

  • server.host127.0.0.1Host name or IP address to use for Node.js server for accepting incoming connections.

    Host name or IP address to use for Node.js server for accepting incoming connections.

    values: Hostname or IP

  • server.https.certPathPath to a valid SSL certificate. Required when HTTPS is enabled.

    Path to a valid SSL certificate. Required when HTTPS is enabled.

    values: File path

  • server.https.enabledfalseIf enabled, the service is started using HTTPS.

    If enabled, the service is started using HTTPS.

    values: true/false

  • server.https.keyPathPath to the SSL certificate's private key. Required when HTTPS is enabled.

    Path to the SSL certificate's private key. Required when HTTPS is enabled.

    values: File path

  • server.port8080Port to use for Node.js server for accepting incoming connections.

    Port to use for Node.js server for accepting incoming connections.

    values: Port number

  • server.relativePath/Relative path from the host where the service will be located.

    Relative path from the host where the service will be located.

    values: Path starting and ending with /

  • status.allowNewSyncstrueDetermines whether users will be allowed to create new syncs.

    Determines whether users will be allowed to create new syncs.

    values: true/false

  • status.messageMessage displayed in the service status panel of the client app.

    Message displayed in the service status panel of the client app.

    values: String (markdown supported)

  • status.onlinetrueIf set to false no clients will be able to connect to this service.

    If set to false no clients will be able to connect to this service.

    values: true/false

  • tests.dbxbrowsersynctestName of the MongoDB database to use for e2e tests.

    Name of the MongoDB database to use for e2e tests.

    values: Database name

  • tests.port8081Port to use for running tests.

    Port to use for running tests.

    values: Port number

  • throttle.maxRequests1000Max number of connections during throttle.timeWindow milliseconds before sending a 429 response.

    Max number of connections during throttle.timeWindow milliseconds before sending a 429 response.

    values: Integer, 0 to disable

  • throttle.timeWindow300000Amount of time (in milliseconds) before throttle counter is reset.

    Amount of time (in milliseconds) before throttle counter is reset.

    values: Milliseconds

  • XBROWSERSYNC_DB_PWDEnvironment variable for MongoDB password.

    Environment variable for MongoDB password.

    values: String

  • XBROWSERSYNC_DB_USEREnvironment variable for MongoDB username.

    Environment variable for MongoDB username.

    values: String

xBrowserSync releases & version history

More in Bookmarks & Link Sharing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…