Sync Zen Browser spaces, tabs & sessions across devices
Install • Usage • Sync modes • How it works • Limitations • License
Linux only. Tested on Arch Linux with Wayland. May work on other distros but is not tested.
Zen Browser doesn't sync spaces or tabs across devices yet. zen-sync fills that gap. Push your entire browsing session from one machine to another in seconds.
Built because I kept switching between my desktop and laptop and wanted my spaces and tabs to follow me. Firefox Sync covers bookmarks and passwords, but not Zen's workspaces. This tool transfers the raw session files, similar to sharing a profile on a dual-boot system.
curl -fsSL https://raw.githubusercontent.com/enisbudancamanak/zen-sync/main/install.sh | bashThen run the setup wizard:
zen-sync init- Linux (tested on Arch Linux with Wayland/Hyprland)
- Zen Browser (same version on both devices)
python3+liblz4(formergeandstatus)- SSH mode. SSH access between devices (ideally with key-based auth via
ssh-copy-id) - R2 mode. Cloudflare R2 bucket +
agefor encryption
During zen-sync init, you choose how devices communicate:
| Mode | How it works | Best for |
|---|---|---|
| SSH | Direct device-to-device transfer | Same network, both devices online |
| R2 | Encrypted upload/download via Cloudflare R2 | Different networks, async sync |
SSH is the simplest. Push and pull files directly between machines. Both devices need to be online and reachable.
R2 stores your session encrypted (using age) in a Cloudflare R2 bucket. Push from one device, pull from another whenever you want. Devices don't need to be online at the same time. Free tier (10GB) is more than enough.
📦 R2 setup guide
- Create a free Cloudflare account
- Go to R2 Object Storage and create a bucket (e.g.
zen-sync) - Go to R2 > Manage R2 API Tokens > Create API Token with Read & Write permissions
- Note your Account ID (visible in the dashboard URL), Access Key ID, and Secret Access Key
- Install
age:sudo pacman -S age(Arch) - Run
zen-sync init, select R2 mode, and enter your credentials - On the second device, run
zen-sync initwith the same credentials and copy over the age key file
🔗 SSH setup guide
- Make sure both devices can reach each other via SSH
- Set up key-based auth for passwordless access:
ssh-copy-id user@other-device - Run
zen-sync initon both devices, select SSH mode
Before pushing, close Zen on the other device (or use
--restart). Before pulling, close Zen on your device (or use--restart). Zen writes session files when it closes. If it's still open, it will overwrite your sync.
| Situation | Command |
|---|---|
| Switch to other device | zen-sync push --restart |
| Come back from other device | zen-sync pull --restart |
| Used both, want to combine | zen-sync merge --restart |
| Just check what's where | zen-sync status |
Transfers your complete session (spaces, tabs, preferences). The target session is fully replaced.
zen-sync push --restart # Close Zen on target, sync, reopen
zen-sync pull --restart # Close Zen locally, sync, reopenWithout --restart, close Zen on the target device manually first.
In R2 mode,
--restartonly applies locally. There is no remote device to close/reopen.
Adds tabs from the remote into your local session without removing existing tabs. Deduplicated by URL + workspace. A backup is created automatically before each merge.
zen-sync merge --restartMerge is one-directional (remote → local). To get everything on both devices, run
mergethenpush --restart.
Push/pull copies only the essential session files (~10 seconds over LAN, ~15 seconds via R2):
zen-sessions.jsonlz4— space definitions & tab assignmentssessionstore-backups/recovery.jsonlz4— active session with all open tabsprefs.js— active workspace & preferencescontainers.json— container tab config
In R2 mode, files are packed into a tar.gz archive, encrypted with age, and uploaded to your R2 bucket.
Merge reads both zen-sessions.jsonlz4 files, combines missing spaces and tabs, and updates the sessionstore so Zen loads them on startup.
| Synced | Not synced (use Firefox Sync) |
|---|---|
| Spaces / Workspaces | Bookmarks |
| Open tabs & tab groups | Passwords |
| Pinned tabs | Browsing history |
| Active workspace | Extensions & their data |
| Container tabs | Cookies & site storage |
| Tab folders | Cached data |
Built for a specific setup, may need adjustments for yours.
- Linux only. macOS/Windows store Zen profiles in different locations
- Wayland.
--restartreopen usesWAYLAND_DISPLAY=wayland-1. X11 or other compositors may need adjustment - Single remote. One remote device per config (SSH mode)
- Push/pull overwrites. Last push/pull wins, use
mergeto combine - Same Zen version. Both devices should run the same version
Config: ~/.config/zen-sync/config. Profile paths are auto-detected during zen-sync init.