Skip to main content
On a self-hosted PostQueen you register a Mastodon app on one Mastodon server and give PostQueen its client key and secret. Every Mastodon channel on your install then signs in on that server.

Before you start

One server per install. A Mastodon app exists only on the server you register it on, so accounts on other servers cannot connect to your install. To use another server, such as https://fosstodon.org, register the app there and set MASTODON_URL to it.

Register the app

Register it in the web interface of the server, or with one API call. Both give you the same client key and secret.
1

Open Development

Sign in on the server and open its settings. Choose Development in the settings menu, at /settings/applications, then New application.
2

Fill in the form

  • Application name: a name for your install, such as PostQueen.
  • Application website: optional.
  • Redirect URI: your address, one per line. See the addresses below.
  • Scopes: tick write:statuses, write:media and profile, and untick everything else.
Save the application.
3

Copy the key and secret

Open the new application. Copy the Client key and the Client secret. You do not need Your access token.
The redirect URI is the one that matches how you run PostQueen:
The redirect URI is where the network sends the browser back after someone approves PostQueen. It is your FRONTEND_URL + /integrations/social/ + the network’s identifier, for example https://postqueen.example.com/integrations/social/pinterest. Most networks need exactly one URI, with no trailing slash. Two exceptions: TikTok Business needs the trailing slash (/integrations/social/tiktok-business/), and a Google web client that also serves Google Business Profile lists both /integrations/social/youtube and /integrations/social/gmb. Channel developer apps lists every network’s ending.

Set the variables

Add the server and the two keys to your environment. MASTODON_URL is the server’s address with https:// and no trailing slash:
Recreate the app container so it reads the new variables. A plain docker restart or docker compose restart keeps the old container and its old environment. In the folder that holds docker-compose.yaml, recreate only the postqueen service:
The database, Redis and Temporal keep running. Avoid docker compose down for a settings change: on a host that runs other Compose services in the same project, it stops them too. Then open PostQueen, go to Channels, choose Add Channel and pick this network. You are sent to its login to authorize PostQueen, and the channel appears in the Channels list once you accept.
The channel is in the Channels list with its avatar and name.
Add Channel does not check whether your variables are set. A missing or misspelled key shows up as a broken authorization page on the network’s side rather than a helpful message in PostQueen, so if the login page itself looks wrong, check the keys before anything else.
Pick Mastodon, sign in on the server, and approve access. PostQueen does not check which scopes were granted, so a missing one shows up later as a failed post.

Troubleshooting

The address PostQueen sent is not one of the app’s redirect URIs. It is exactly your FRONTEND_URL followed by /integrations/social/mastodon. Edit the application in Development and add it.
PostQueen could not reach the server in MASTODON_URL. From inside the PostQueen container, run curl -I against the server’s address and fix DNS or outbound access until it answers. If the logs show Blocked IP, the server’s name resolves to a private address, which PostQueen’s SSRF guard refuses.
Before it uploads a picture to Mastodon, PostQueen downloads it from your own media address. When that name resolves to a private address inside the container, which is common behind a home reverse proxy or split DNS, the SSRF guard refuses the download and the logs show Blocked IP. Make the media address resolve to a public address from inside the container. If every account on your install is trusted, you can instead set DISABLE_SSRF_PROTECTION=true, which turns the guard off for every request. Read its entry in the configuration reference first.
A file in a later thread part was not processed yet. PostQueen waits for the first post’s media, but not for the media of later parts. Schedule the post again, or move the video to the first post.
Last modified on September 23, 2026