Using Syncthing, tmux, and Git to Sync My Bioinformatics Workflow Across Devices
π₯οΈ Using Syncthing, tmux, and Git to Sync My Workflow Across Devices
Managing files and analysis sessions across multiple Linux machines can quickly become chaoticβespecially when juggling bioinformatics scripts, results, manuscripts, figures, and a personal website at the same time.
Over the years, I tried:
β manual copying
β cloud storage
β external drives
β SSH-based syncing
Eventually, I realized that no single tool solves everything. Instead, I needed a small set of tools, each doing one job extremely well.
My current setup is simple, reliable, and fully Linux-native:
β Syncthing β real-time file synchronization
β tmux β persistent and shareable terminal sessions
β Git + GitHub β version control and publishing
Together, they let me move seamlessly between desktop, laptop, and HPC systems without losing context.
π· 1. Syncthing β real-time file synchronization
What Syncthing does
Syncthing keeps selected folders identical across machines, automatically and continuously.
β No USB drives
β No cloud storage
β No manual copying
β No βwhich version is correct?β confusion
π¦ Installing Syncthing
On Ubuntu / Debian-based systems:
sudo apt install syncthing
Verify:
syncthing --version
π Starting Syncthing automatically on boot
I want Syncthing to start every time I log in, without manual intervention.
Enable and start the user service:
systemctl --user enable syncthing.service
systemctl --user start syncthing.service
Check status:
systemctl --user status syncthing.service
Now Syncthing:
β Starts automatically on login
β Runs quietly in the background
β Syncs even when the browser UI is closed
π Accessing the Syncthing interface
Open a browser and go to:
http://localhost:8384
This is where I:
β Add devices
β Select folders to sync
β Monitor sync status
π My synced folder structure
I use one top-level folder across all machines:
~/Jojy_Research_Sync/
Inside it: I have many subfolder some examples are below
β scripts/ β Bash, SLURM, Snakemake, R, Python
β Projects/ β intermediate outputs, figures
β notes/ β daily research notes
β website_assets/ β content used by my blog
These are files I edit frequentlyβsometimes switching machines multiple times in a day.
π· 2. tmux β persistent and shared terminal sessions
While Syncthing synchronizes files, it does not preserve live terminal state. For that, I use tmux. π¦ Installing tmux
sudo apt install tmux
Verify:
tmux -V
π§ Creating a persistent session
To start a named tmux session:
tmux new -s shared
β From your laptop: open the shared tmux session (desktop-hosted)
tmux sessions live on the machine where they were created (your desktop or an HPC node). So on your laptop you donβt βopenβ it locally β you SSH into that same machine and then attach to the session.
ssh <user>@<DESKTOP_IP>
tmux attach -t shared
If the session doesnβt exist yet (first time), create it:
ssh <user>@<DESKTOP_IP>
tmux new -s shared
π Find your local IP address (most common case)
On the machine hosting the tmux session (desktop or server), run:
ip a #Run on yur terminal
π₯ Sharing the same session across devices
If I SSH into the same machine from another device, I can attach to the same session.
tmux attach -t shared
This lets me:
β Resume work from a different device
β Monitor long-running commands
β Continue exactly where I left off
β οΈ tmux sessions are host-specific (not shared across different machines).
π§© tmux commands I use daily | Command | Action | | ββββββββββ | βββββ | | tmux new -s shared | Create session | | tmux ls | List sessions | | tmux attach -t shared | Reattach | | tmux kill-session -t shared | End session |
π· 3. Git β version control and publishing
Syncthing is not a replacement for Git.
I use Git + GitHub for:
β My website repository
β Analysis pipelines
β Code meant to be shared or published
π¦ Installing Git
sudo apt install git
π My daily Git workflow*
When starting work on any machine:
git pull
This ensures:
β Iβm working on the latest committed version
β No conflicts with work done on another device
When something is finalized:
git add .
git commit -m "Update analysis / figures / blog post"
git push
π How Syncthing, tmux, and Git work together
| Tool | Role |
|---|---|
| Syncthing | Sync active working files |
| tmux | Preserve live terminal sessions |
| Git | Track history and publish work |
Typical workflow:
β Syncthing syncs drafts and scripts across devices
β tmux keeps my analysis session alive
β Git records finalized work and publishes it
Each tool does one job well, without overlap.
β Why this is important for me
This setup:
β Reduces cognitive overhead
β Prevents accidental overwrites
β Supports HPC + local workflows
β Keeps everything Linux-native and reproducible
Most importantly, it lets me focus on science, not file management.
