Docs: Social posting
Social posting
Post each published Blog post to Bluesky and Mastodon by itself: connecting accounts, which posts go out, limits and retries.
Since 1.21.0 a published Blog post can be posted to Bluesky and Mastodon by itself. The page is System ▸ Social posting, after Webhooks, with an Accounts tab (the connected accounts) and a Posted tab (what was queued and how it went). It needs the permission Manage social posting, and the Health page has a Social posting row that opens it. It is off for the whole site until you switch On for this site, so an update changes nothing by itself. A site can connect at most 10 accounts.
Connecting an account #
- Bluesky signs in with an app password you make in Bluesky (Settings ▸ Privacy and security ▸ App passwords). Your main password is refused.
- Mastodon signs in through Mastodon's own approval page: you type your server's address, approve there, and come back. The site asks to read your account and posts, and to write posts; the reading is used only to check that a post did not already go out before it is tried again. A server address must start with
https://and must not lead into a private network. - Connecting asks you to confirm it is you, with a code from your authenticator, so two-factor sign-in must be on for your profile first. Nothing is sent to the service before you confirm.
- The site's own address (
SITE_URL) must be set in the configuration file, or no account can be connected.
How sign-ins are kept #
The app password and the Mastodon token are sealed under a key the site holds, SOCIAL_KEY. The site makes it the first time an account is connected, after you have confirmed it is you; the installer and the update never make it. From then on the file that holds it must be backed up together with the database. Without it, every social account has to be connected again after a restore. A sign-in is never shown, logged, returned by the Operator API or written into the off-site backup's rows.
Which posts go out #
- Each post has a Post to social accounts switch (on for a new post) that covers every account, and each Blog category has a Social posting switch.
- A post goes out only while it is published, its own switch is on, it is not hidden, and its category is on or it has none.
- A post is queued once, when it really turns published (a save, a bulk publish or an approved draft). It waits about two minutes first, so an unpublish just after Publish stops it, and a scheduled post waits for its time. The switches are checked again just before the first attempt.
- A post can carry its own text of up to 1000 characters for the social post. Otherwise each account's own text is used, with
{title},{excerpt},{url}and{category}filled in, the link always added, and the text cut to fit the service's limit without cutting the link. - The card's picture is the post's cover image, or the Blog's default image when that is a file in this site's media library.
Account settings #
- Each account has a label, the text of each post, who can see it (public or unlisted, for Mastodon) and Most posts a day, 10 by default and 1 to 100. Past it, a post waits for the next free place.
- Also post what a connection publishes is off by default: posts published by an Operator API credential that approves its own drafts, and posts synced from another site, go out on an account only while it is on.
- Changing an account's text or that switch asks you to confirm it is you again.
Retries and switching off #
A post that fails is tried again after 5 minutes, 30 minutes and 2 hours. An account is switched off, with a notification and a Health row, when its sign-in is refused, when 5 posts in a row failed, when its owner can no longer manage social posting, or when the owner's password or two-step sign-in changed (then only the owner switches it on again). A post that may or may not have gone out is marked for a person to check; nothing is ever posted twice.
In the post editor #
The post editor has a Social posts box. It shows each account's state and a link to the post when it went out. Send now posts to one account at once, without the two-minute wait or the daily limit, and Retry tries a failed post again. Both are offered once the post is live and saved. Text changed in the box reaches only the accounts the post has not been sent or tried on yet.
Limits to know #
- Nothing is changed on the service after a post is edited, and a post deleted after it was posted leaves the social post where it is.
- Posts already scheduled or published when a site updates are never posted.
- Bulk-publishing many posts goes out at each account's daily cap, not all at once.
- These are skipped: a post published more than a day before it went live, imports, converted pages, a revision's restore and a restore from the recycle bin.
- Switching a category on queues nothing; its posts count from their next publish.
The Operator API #
A credential can read the new switches and the queue (GET autopost), and propose changes to an account's text, limit and switches as a draft. A person connects an account, switches one on and approves every change. See Operator API.
Share buttons #
Separate from posting, Share is one core part used by Pages, the Blog and forum posts: a button with links to LinkedIn, X, Facebook, Bluesky and email, and Copy link. It loads no outside script and tracks nothing. Pages ▸ Settings has a Share row switch with one for each network, and each page has its own Share switch (on for a new page); a page shows the row at its end only while both are on. It starts off, so no page changes on update. The Blog's Share row uses the same part and settings, and forums have Share on posts; see Forums.