On this pageRun n8n on your server
A hosted social media scheduler charges per channel and per seat for a job that is simple at its core: take a queue of posts, and publish each one at its time on the right networks. n8n, the workflow automation tool, can do that job on your own server. The hard part is not n8n. It is each platform's rules for API access, which decide what you can automate at all. This guide sets up n8n, builds the queue and the workflow, goes through the platforms one by one, and ends with ready-made open-source schedulers for when building your own is not worth it.
Run n8n on your server
n8n 2.x is the current line: 2.0 arrived in December 2025, and releases come often. It is distributed under the Sustainable Use License, which allows use for your own internal business purposes and for personal or non-commercial use. Running it to post for your own company fits; selling it as a service to others does not.
A Compose file that keeps the editor behind a reverse proxy:
services:
n8n:
image: n8nio/n8n:stable
restart: unless-stopped
ports:
- "127.0.0.1:5678:5678"
environment:
N8N_HOST: n8n.example.com
N8N_PROTOCOL: https
N8N_WEBHOOK_URL: https://n8n.example.com/
N8N_PROXY_HOPS: "1"
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
GENERIC_TIMEZONE: Europe/Berlin
TZ: Europe/Berlin
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
cd /opt/n8n
echo "N8N_ENCRYPTION_KEY=$(openssl rand -hex 32)" > .env
chmod 600 .env
docker compose up -d
n8n encrypts every stored credential with that key. If you do not set one, it generates its own at first launch, and losing it means re-entering every account. Back the key up with the volume. N8N_WEBHOOK_URL replaces the older WEBHOOK_URL, deprecated since 2.35. Put HTTPS in front with a reverse proxy, for example a Caddy site block containing reverse_proxy 127.0.0.1:5678. On CloudSat, n8n is a one-click app if you would rather skip this part.
Design the content queue
Keep posts in a table that people can edit without opening n8n: a NocoDB or Baserow base, a PostgreSQL table, or a spreadsheet. Our guide to Airtable alternatives you can self-host covers the first two. One row per post:
| Field | Purpose |
|---|---|
text |
The post, written within the shortest platform's limit |
link, image_url |
Optional; Instagram needs a public JPEG URL |
platforms |
Where it goes, such as x,linkedin,mastodon |
publish_at |
When, stored in UTC |
status |
draft, ready, posting, posted or failed |
result |
Post IDs, or the error message |
Length limits differ more than people expect: X allows 280 characters for most accounts, Bluesky 300, a default Mastodon instance 500 and LinkedIn 3,000. Either write every post for the shortest network it goes to, or add a column per platform for the networks that deserve their own wording. A link costs characters on some networks and turns into a preview card on others, so check how each one renders before a campaign goes out.
Build the workflow
- Schedule Trigger every 15 minutes, or a custom cron expression. It uses the workflow's time zone, falling back to the instance's.
- Fetch due rows:
statusisreadyandpublish_atis in the past. - Claim each row by setting
statustopostingbefore calling any API, so an overlapping run cannot post it twice. - Route by platform with a Switch node, one branch per network.
- Post with the platform's node or an HTTP Request node, as in the table below.
- Write back
postedwith the returned IDs. Set the posting nodes to continue through their error output, so a failure marks the rowfailedwith the message instead of stopping the run. - Publish the workflow. n8n 2.x says publish where 1.x said activate; a schedule never fires in an unpublished workflow.
Then add an error workflow: a separate workflow that starts with an Error Trigger and sends you a message on Telegram, Discord or email. Select it in the main workflow's settings as its Error workflow, and publish it too. It fires only for automatic executions, which is exactly when nobody is watching.
Platform by platform
| Platform | How n8n posts | What you need | Plan for |
|---|---|---|---|
| X | Built-in X node | A developer account and app | The API is pay-per-use, with a fee for each post |
| Built-in node, as a person or an organization | Share on LinkedIn (w_member_social) for profiles; the Community Management API for company pages |
Page posting is limited to registered organizations and needs a review | |
| Facebook Page | Facebook Graph API node, /<page-id>/feed |
A Meta app and a Page access token | Meta's app setup and permissions |
| Graph API calls: create a media container, then publish it | A professional account; Instagram Login works without a Facebook Page | JPEG images only, from a public URL; 100 API posts per 24 hours | |
| Mastodon | HTTP Request to POST /api/v1/statuses |
An access token with write:statuses |
scheduled_at lets the server schedule a post at least 5 minutes ahead |
| Bluesky | HTTP Request, or a community node | An app password | Reuse sessions: logins are limited to 30 per 5 minutes |
| Telegram, Discord | Built-in nodes | A bot token or webhook | The bot needs permission to post in the channel |
n8n has no built-in nodes for Mastodon or Bluesky, but both APIs are plain HTTP. The two calls translate directly into HTTP Request nodes:
# Mastodon: post now, or add scheduled_at to let the server publish it later
curl -X POST https://mastodon.example/api/v1/statuses \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-H "Idempotency-Key: queue-row-42" \
--data-urlencode "status=New on the blog: https://example.com/post" \
--data-urlencode "scheduled_at=2026-11-20T15:00:00Z"
# Bluesky: log in with an app password, then create the post record
curl -s -X POST https://bsky.social/xrpc/com.atproto.server.createSession \
-H 'Content-Type: application/json' \
-d '{"identifier":"you.bsky.social","password":"xxxx-xxxx-xxxx-xxxx"}'
curl -s -X POST https://bsky.social/xrpc/com.atproto.repo.createRecord \
-H "Authorization: Bearer $ACCESS_JWT" -H 'Content-Type: application/json' \
-d '{"repo":"you.bsky.social","collection":"app.bsky.feed.post","record":{"$type":"app.bsky.feed.post","text":"New on the blog","createdAt":"2026-11-20T15:00:00Z"}}'
Mastodon keeps an Idempotency-Key for an hour, so a retried request with the same key does not post twice. For Bluesky, store the session token from the first call and reuse it rather than logging in on every run.
Or run a ready-made scheduler
If you would rather not maintain a workflow, two open-source schedulers do the same job with a calendar interface. Postiz, under AGPL-3.0, runs with Docker Compose alongside PostgreSQL, Redis and Temporal, and covers a long list of networks, including Instagram, LinkedIn, X, Mastodon and Bluesky. Mixpost offers a free MIT-licensed Lite edition, with commercial Pro and Enterprise editions. Neither changes the rules above: you still create a developer app on each platform, and each API's limits still apply.
FAQ
Is n8n free to use for this?
For posting on behalf of your own business or yourself, yes, under the Sustainable Use License. Offering scheduling to clients as a hosted service is outside what that license allows, so read it before building a product on it.
Can I post to a personal Instagram account?
No. Instagram's publishing API works only with professional accounts, either business or creator, which you can switch to in the app's settings.
What happens when a platform changes its API?
The posting node starts failing, the row is marked failed, and the error workflow tells you. Keep n8n on the stable tag and update it regularly, because node fixes for API changes arrive in normal releases.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




