Self-hosted multi-profile bookmark sync for Chromium.
+-----------+ +-------------+ +--------+ +----------+
| Chromium | --> | Native Host | --> | data/ | <-- | Hub HTML |
| Extension | | (Python) | | folder | | (viewer) |
+-----------+ +-------------+ +--------+ +----------+
Extension exports bookmarks via native messaging.
Native host writes JSON to data/profiles/{id}/.
Hub reads the data directory and renders all profiles.
- Python 3
- Chromium-based browser (Chrome, Chromium, Brave, Edge)
- Native messaging support (Snap Chromium does NOT support this, use Flatpak or .deb)
- Clone the repository:
git clone https://github.com/otaviosoaresp/bookmarkhub.git
cd bookmarkhub-
Load the extension in one Chromium profile first:
- Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked" and select the
extension/directory - Copy the extension ID that appears (e.g.,
kmmbbobegiidoiknbfoghoffckbinogl)
- Open
-
Register the native messaging host:
bash host/install.shThe script auto-detects Flatpak, Snap, or standard Chromium. It will ask for the extension ID from step 2.
-
Restart Chromium completely (close all windows, reopen).
-
Load the extension in the remaining profiles (same "Load unpacked" step).
-
Configure each profile in the extension popup:
- Click the BookmarkHub extension icon
- Set a unique profile ID (e.g.,
work,personal,research) - Set a display name
- Choose a color
- Click Save
-
Bookmarks auto-export within 30 seconds of any change to
data/profiles/{id}/bookmarks.json. An initial export also runs on every browser startup.
| Install type | Manifest location |
|---|---|
| Flatpak Chromium | ~/.var/app/org.chromium.Chromium/config/chromium/NativeMessagingHosts/ |
| Standard Chromium | ~/.config/chromium/NativeMessagingHosts/ |
| Google Chrome | ~/.config/google-chrome/NativeMessagingHosts/ |
| Snap Chromium | Not supported (sandbox blocks native messaging) |
cd bookmarkhub
python3 -m http.server 8080Open http://localhost:8080/hub/ in your browser.
Build a self-contained HTML file with inline data:
python3 hub/build.pyOpen hub/index-built.html directly in your browser.
Build and deploy the self-contained file:
python3 hub/build.py
scp hub/index-built.html yourserver:/var/www/html/bookmarks.html- Uninstall the BookmarkHub extension from that Chromium profile.
- Delete the profile data directory:
rm -rf data/profiles/{id}- Edit
data/manifest.jsonand remove the profile entry from theprofilesarray.
rsync -avz data/ yourserver:/path/to/bookmarkhub/data/Share the data/ directory between your local machine and VPS using Syncthing. Point both instances at the same folder ID. The hub on the VPS will pick up changes automatically when served via HTTP.