A more complete guide is available here:
https://abhilesh.github.io/blog/2026/self-hosting-logseq-sync/
Trying to consolidate everything into a single place
Special thanks to the Logseq developers, the Discord community and especially @yshalsager for creating the Docker for Logseq Sync and @zetashift for problem solving with me.
This guide is intended for users who want to run a Logseq sync server from home–for instance on a laptop–and then access it remotely when they are away from their home network.
Set up Tailscale
- Install Tailscale on all devices (server + clients).
- Note the Tailscale IP of the device that will host the sync server.
Install Docker and Git
- Install Docker Engine and the Compose plugin on the device that will host the Logseq sync server. On Linux, follow the official Docker installation guide; on macOS/Windows, Docker Desktop includes everything you need.
- Install Git.
Clone the repo and configure
- Create a directory on your server device where you will store Dockers. From that directory:
git clone https://github.com/yshalsager/logseq-selfhost.git
cd logseq-selfhost/images/sync
cp .env.example .envEdit the .env file
- Change the line
DB_SYNC_BASE_URL=https://sync.example.com- to
DB_SYNC_BASE_URL=http://<your.tailscale.ip>:8787Start the server
docker compose pull
docker compose up -dVerify the server is running
curl http://localhost:8787/health # should return {"ok":true}Connect Logseq clients to Your Local Sync Server
- Desktop:
- Click on the hamburger icon → Settings → General → Custom Sync Server URL
- Android:
- Sync on Android requires Logseq credentials. Go to test.logseq.com, click on the hamburger icon → Login → Sign Up
- On your Android client, go to the home menu, click on the hamburger icon → login → sync settings →http://YOUR_TAILSCALE_IP:8787
Create or Sync an Existing Graph
- On any device, go to “Graphs”→ create a new graph → check “Use Logseq Sync Beta” (optionally enable encryption).
- Alternatively, sync an existing graph by clicking on “…” → “Use Logeq Sync Beta”. If the graph is large, wait some time for the upload to finish.
- On the other devices, go to the “Graphs” page and select the graph you just uploaded.
Automatically update the Docker image using Watchtower
- In the terminal run:
docker run -d --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -e WATCHTOWER_CLEANUP=true -e WATCHTOWER_POLL_INTERVAL=86400 -e DOCKER_API_VERSION=1.40 containrrr/watchtower