Skip to content
Use case · Self-hosted

A self-hosted social media scheduler that also learns.

The short answer

Harbor is an open-source, self-hosted social media scheduler for X, LinkedIn, Instagram and Threads. It runs on your own server with Postgres (or an embedded database for local use), publishes through your own developer apps, and keeps your tokens encrypted in your own database. Beyond scheduling, it measures every post at 1h, 6h, 24h, 3 days and 7 days against your own median and uses the results to plan the next week. It’s free under the AGPL, and it runs in a sandbox mode with no keys at all.

The problem

Why self-host

  • Your account tokens, drafts and analytics stay on a server you control.
  • No per-seat or per-channel bill: self-hosted Harbor has every feature and no brand limit.
  • You can read the code that touches your accounts, and change it.
  • Hosted schedulers stop at scheduling. Harbor keeps going after the post is out.
01How Harbor handles it

Publish straight to the platforms

Harbor talks to each platform’s own API through developer apps you register, so there’s no middleman API. Each platform’s rules are checked before sending: text limits, media counts, aspect ratios.

Voice check · platform rulesOne draft, four rulebooks
PlatformTextMediaThreadsCheck
X280 per postUp to 4 images, or 1 videoCrop: 16:9 wideThread: each part replies to the lastChecking…
LinkedIn3,0001 image; video not yetCrop: 1.91:1 landscapeExtra parts post as commentsChecking…
Instagram2,200 captionRequired. JPEG, 4:5 to 1.91:1, up to 10Crop: 4:5 portraitCarousel of up to 10Checking…
Threads500 per postUp to 10 images or 1 videoCrop: 4:5 portraitThread: replies, like XChecking…
A failed check blocks publishing on that platform. Warnings are advice.
02How Harbor handles it

No double posts

If a publish times out after the platform may have accepted it, Harbor marks it "check platform" and waits for you. It never retries an unknown outcome on its own.

ModeSandboxPublishing to practice accountsSimulatedBuilt-in model, no API spend
Sandbox accountNo real platformX ▾@yourbrandSame length and media rules as the real X. Metrics are simulated.
X · @tryharborUnknown
3 weeks, 2 rewrites, 1 feature.
  1. 9:00:00Sent to X
  2. 9:00:20No answer from X: the request timed out
  3. 9:00:20Outcome unknown. Not retried.
Retried automatically only when the error proves nothing went out, like a rate limit.
03How Harbor handles it

Measured after it’s out

Five checkpoints per post, compared with your own median at the same age, so you see what actually worked rather than vanity totals.

Performance · X · views“3 weeks, 2 rewrites, 1 feature.”
03.5K7K1h6h24h3d7d
This post at 1h180
Brand median at 1h150
Ratio1.2×
Median of 14 comparable X posts at the same age. At 1h this post is level with the brand’s usual.
Step by step

From clone to first post

  1. Clone the repo, run pnpm install and pnpm dev. It starts in sandbox mode with a simulated model: no keys, no spend.
  2. Explore with demo data, or add your own brand.
  3. When you’re ready, set HARBOR_SECRET_KEY, a stable HTTPS URL and your platform app keys in .env.
  4. Connect each account through the platform’s own consent screen.
  5. Schedule your first post, then watch its growth curve fill in over the first week.
Run it locally
git clone https://github.com/tryharbor/harbor && cd harbor
pnpm install
pnpm dev     # API on :4800, app on :4801, sandbox mode
FAQ

Questions people ask.

What do I need to self-host Harbor?

Node.js 22.12+ and pnpm. Postgres for production (set DATABASE_URL), or the embedded PGlite database for local use. To go live, developer apps on each platform you want to post to.

Which platforms does it support?

X, LinkedIn, Instagram and Threads. That’s fewer than most hosted schedulers; Harbor goes deep on those four rather than wide.

Does self-hosting cost anything?

Harbor is free. You pay for your own server and database, and X bills its API per post and per read (about 4 cents to publish and track a post). LinkedIn, Instagram and Threads don’t charge.

Is there Docker support?

A one-command Docker setup is next on the roadmap. Today you run it with Node and pnpm.

Get started

Plan next week in an afternoon.

Self-host Harbor free, or get early access to Harbor Cloud. Either way, nothing posts until you say so.