flock iconflock

One video, every platform, each on its own schedule.

flock is an open-source, self-hosted publishing tool. You write the text for each platform separately, choose a video and a release time per platform, and a worker on your own storage publishes it to YouTube, TikTok, Instagram and Facebook when the time comes.

YouTube TikTok Instagram Facebook Self-hosted Open source, MIT
The flock icon: a bird over a rising bar chart

What flock is

flock is software you run yourself: a small database (PocketBase), a worker process on a machine that stays on, and the web app in your browser, all on your own hardware and your own network. There is no hosted service and no account with the author. Each installation connects its own YouTube, TikTok, Instagram and Facebook accounts through those platforms' own consent pages, using developer apps the installer registers, so keys and tokens never leave the installer's configuration file. The code is on GitHub under the MIT license.

What it does

Every platform reads differently, so flock treats each one as its own post.

Text per platform

Titles, captions and tags are written separately for each platform, because a link or a hashtag style that works on one reads badly on another. Adaptation rules can rewrite text automatically before it is published.

A release time per platform

Each platform gets its own day and hour on a calendar of the coming days. Drag a card to move it, type an exact time, or pick a saved pattern such as "Fridays at 21:00".

Publishing from the NAS

Confirming an upload only queues it. A worker beside the database publishes at the scheduled time, so the computer that composed the post can be switched off.

Posting to TikTok, TikTok's way

Audience, comments, duets, stitches and the commercial-content disclosure are chosen per post, from what the account offers, with nothing preselected, and the video is previewed before it is posted.

Video from the browser or a folder

A video can be uploaded through the browser, or picked from a watch folder on your network or your PC; a network file is used where it lies, which is how files above the browser's size limit are published. One upload can send a different cut to each platform.

Prepared uploads

Text written elsewhere, in a chat with an assistant for example, goes in with one paste, or as a file in a project folder: flock lists the project, fills the upload from it, release times included, and keeps its progress until it is sent.

Analytics and a log

Live counters for the newest videos on the YouTube channel, and a log of every change with the machine that made it.

The screens

An upload is four steps: Upload, Details, Schedule, Review.

The Upload step: the video box on the left, the file lists on the right
Upload: pick the video. Drop a file on the box, or drag one from the watch folders, or from the project's own folder when the upload came from one; right-click plays it first. One video goes to every platform unless a platform is given a cut of its own with the Own file buttons.
The Details step composing TikTok, with the Post to TikTok box on the right
Details: the text for the platform being composed, switched with the icons at the top. With TikTok selected, the Post to TikTok box names the account, read afresh from TikTok, asks who can view the video with nothing preselected, leaves comments, Duet and Stitch off until ticked, holds the Content Disclosure Setting, and carries TikTok's declaration line. Continue waits until the box is complete.
The Schedule step: a calendar with one card per platform
Schedule: one card per platform on a calendar of the coming days, starting today, dragged to its day and hour, typed exactly, taken from a saved pattern, or released immediately.
The Review step: the video playing beside what each platform will receive
Review: the video plays beside what each platform will receive and when, the account each post goes out as, and TikTok's declaration, before anything is uploaded; with TikTok in the upload, confirming waits until the video has been shown. Confirming stores the video and queues the releases; the worker takes it from there, and a TikTok post may take a few minutes to appear on the profile after it is posted.

Posting to TikTok

flock uses TikTok's Login Kit and the Content Posting API's Direct Post. The post screen follows TikTok's content sharing guidelines.

  • Who posts is shown. The account's display name and handle, read from TikTok each time the post box is shown and again before posting. If TikTok says the account cannot post right now, the post waits, with "try again later".
  • The audience is chosen per post. The list holds exactly the options TikTok reports for the account, and nothing is preselected. A post without one is refused, never sent as public.
  • Interactions are off until switched on. Comments, Duet and Stitch start unticked, and are greyed out where the account has them disabled.
  • Commercial content is disclosed. With the Content Disclosure Setting on, "Your brand", "Branded content" or both must be declared, with TikTok's own note on how the post will be labelled. Branded content cannot be posted privately.
  • The video is previewed first. The review screen plays it, and the post cannot be confirmed until it has been shown. A video longer than the account may post is refused.
  • The declaration is on every post. "By posting, you agree to TikTok's Music Usage Confirmation", with the Branded Content Policy added for branded content.
  • The post is TikTok's to finish. The file is uploaded in chunks, the status is polled until TikTok reports the post published, and the notice says it may take a few minutes to appear.

Permissions requested: user.info.basic, to show which account a post goes to, and video.publish, to post it. Nothing else is read from the account. Each installation uses a TikTok developer app of its own, so its client key and secret stay in its own configuration.

The Post to TikTok box: account, audience, interactions, disclosure and declaration

Get flock

The code, the install steps and the full walkthrough are on GitHub.

  1. What you need

    Node 22 or newer with pnpm, a PocketBase instance of flock's own, and a machine that stays on for the worker, a NAS for example. flock is not meant to be reachable from the public internet.

  2. Install

    Clone the repository, run pnpm install, point .env at your PocketBase, and run pnpm setup-pb once to create the collections. pnpm dev runs it locally; pnpm deploy builds it into PocketBase's own pb_public, so PocketBase serves the app itself.

  3. Connect your accounts

    Register a developer app on each platform you use (Google Cloud for YouTube, TikTok for Developers, a Meta app for Instagram and Facebook), paste its keys into the worker's configuration file, and run the consent flow once per platform from the terminal. The README walks through each portal.

  4. Run the worker

    pnpm worker publishes each release at its slot, keeps the tokens fresh, lists the watch and project folders and feeds the Analytics screen. It belongs on the machine that stays on; a second, credential-free worker on your PC can look after the PC's own folders. Both also come as a single program that needs no Node.

flock is released under the MIT license: use it, change it, and keep the notice.