AAdebisi Habib Adetoba
Guide

How to Self-Host Postiz: Set Up a Free, Open-Source Social Media Scheduler with Docker

· Adebisi Habib Adetoba

Postiz is a free, open-source social media scheduler — think Buffer or Hootsuite, but you run it on your own server and pay nothing per channel or per seat. I self-host it to schedule my own X and LinkedIn posts, and this guide is the exact process I follow: a VPS, Docker Compose, a domain with HTTPS, and your social accounts connected.

It takes about an hour if you're comfortable with a terminal. If you'd rather not deal with servers, DNS and API keys at all, I can set Postiz up for you on your own domain.

What is Postiz?

Postiz is an open-source (AGPL-3.0) tool for planning, scheduling and publishing social media posts from one dashboard. It has a calendar view, team members, post previews, analytics and an AI writing assistant. It can publish to:

  • X (Twitter), LinkedIn (profiles and pages), Facebook and Instagram
  • TikTok, YouTube, Pinterest, Threads and Reddit
  • Bluesky, Mastodon, Discord, Slack and Dribbble

There's a paid hosted version, but the self-hosted version is the same software. You own the data, there are no channel limits, and the only cost is your server.

Why self-host a social media scheduler?

  • Cost. Buffer, Hootsuite and Later charge per channel or per user. A small VPS costs a few dollars a month no matter how many accounts you connect.
  • Ownership. Your drafts, media and API tokens live on your server, not someone else's.
  • Your brand. It runs on your own domain, e.g. social.yourbusiness.com, which is handy for agencies managing clients.
  • No lock-in. It's open source. If the company behind it changed direction tomorrow, your install keeps working.

What you need before you start

  • A Linux server (VPS). The Postiz docs test on Ubuntu 24.04 with 2 GB RAM and 2 vCPUs. That's the floor — Postiz runs Postgres, Redis, Temporal and Elasticsearch alongside the app, so I'd go with 4 GB if you can. Mine runs on an 8 GB VPS next to another app.
  • A domain or subdomain you can point at the server, e.g. postiz.yourdomain.com.
  • Docker and Docker Compose (installed in step 1).
  • Developer apps for each platform you want to post to (X, LinkedIn, Meta, etc.). These give you the API keys Postiz needs. More on this in step 6.

Shared hosting (cPanel-style) won't work. Postiz needs Docker, so you need a VPS or a dedicated server.

Step 1: Prepare the server and install Docker

SSH into your server, update packages and install Docker using the official convenience script:

ssh root@your-server-ip

apt update && apt upgrade -y
curl -fsSL https://get.docker.com | sh

# confirm both are available
docker --version
docker compose version

Then open only the ports you need. SSH, HTTP and HTTPS are enough — the Postiz app port should stay private behind the reverse proxy we add in step 5.

ufw allow OpenSSH
ufw allow 80
ufw allow 443
ufw enable

Step 2: Get the official Postiz Docker Compose file

The Postiz team maintains the compose file in its own repository. Clone it instead of copying a snippet from a blog post (including this one), so you always start from the current version:

git clone https://github.com/gitroomhq/postiz-docker-compose
cd postiz-docker-compose

Inside you'll find docker-compose.yaml and a dynamicconfig folder that the Temporal service needs. The compose file starts these services: the Postiz app, Postgres, Redis, and Temporal (the workflow engine Postiz uses to publish scheduled posts) with its own Postgres, Elasticsearch and UI.

Step 3: Configure the Postiz environment variables

Postiz is configured entirely through environment variables. Open docker-compose.yaml and find the environment section of the postiz service. Out of the box everything points to localhost:4007. Change these to your domain:

MAIN_URL: "https://postiz.yourdomain.com"
FRONTEND_URL: "https://postiz.yourdomain.com"
NEXT_PUBLIC_BACKEND_URL: "https://postiz.yourdomain.com/api"
JWT_SECRET: "paste-a-long-random-string-here"
DISABLE_REGISTRATION: "false"   # set to "true" after you create your account

Generate a proper JWT_SECRET with openssl rand -base64 48. Don't keep the placeholder — it signs your login sessions.

While you're in the file, bind the app port to localhost so it isn't reachable from the internet directly. Change the postiz service's port mapping from 4007:5000 to:

ports:
  - "127.0.0.1:4007:5000"

This matters because Docker writes its own firewall rules and published ports skip ufw. Without the 127.0.0.1 prefix, anyone could reach Postiz over plain HTTP on port 4007.

Tip: you can also keep secrets out of the compose file by putting them in a postiz.env file mounted at /config, which Postiz reads on start.

Step 4: Start Postiz

docker compose up -d

# watch the logs until the app finishes booting
docker compose logs -f postiz

The first start pulls several images and runs database migrations, so give it a few minutes. Check that everything is healthy with docker compose ps.

Whenever you change environment variables later, recreate the containers so the new values are picked up: docker compose down then docker compose up -d.

Step 5: Add your domain and HTTPS with Caddy

First, create a DNS A record for postiz.yourdomain.com pointing to your server's IP address. Then put a reverse proxy in front of Postiz. I use Caddy because it gets and renews Let's Encrypt certificates automatically:

apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install -y caddy

Replace the contents of /etc/caddy/Caddyfile with:

postiz.yourdomain.com {
    reverse_proxy 127.0.0.1:4007
}
systemctl reload caddy

Visit https://postiz.yourdomain.com, create your account, then set DISABLE_REGISTRATION to "true" and recreate the containers so strangers can't sign up on your instance. Nginx with Certbot works just as well if that's what you already use.

Step 6: Connect your social media accounts

This is the step that takes the most time. For each platform, you create a developer app on that platform, give it your Postiz callback URL, and copy the app's keys into Postiz's environment variables.

  • X (Twitter): X_API_KEY and X_API_SECRET from the X developer portal.
  • LinkedIn: LINKEDIN_CLIENT_ID and LINKEDIN_CLIENT_SECRET. Set the redirect URL to https://postiz.yourdomain.com/integrations/social/linkedin (use linkedin-page instead of linkedin for company pages).
  • Facebook and Instagram (business accounts): FACEBOOK_APP_ID and FACEBOOK_APP_SECRET from a Meta developer app.
  • Instagram (standalone): INSTAGRAM_APP_ID and INSTAGRAM_APP_SECRET.

The callback URL pattern is the same for every provider: https://your-domain/integrations/social/<provider>. Each platform has its own page in the Postiz provider docs with the exact scopes and settings.

Add the keys to the postiz service environment, recreate the containers, then go to Add Channel in the Postiz dashboard and log in to each account.

Step 7: Schedule your first post

  1. Click Create Post in the calendar.
  2. Pick the channels you want to post to. You can customise the text per platform.
  3. Attach images or video, check the preview, and pick a date and time.
  4. Hit Add to calendar. Temporal handles publishing at the scheduled time, even if your browser is closed.

Common Postiz setup problems (and fixes)

Login loops or redirects to localhost

One of MAIN_URL, FRONTEND_URL or NEXT_PUBLIC_BACKEND_URL still says localhost, or you changed them without recreating the containers. Fix the values and run docker compose down && docker compose up -d.

"Redirect URI mismatch" when connecting an account

The callback URL in the platform's developer app must match exactly — https, your domain, and /integrations/social/<provider>, with no trailing slash.

LinkedIn disconnects after a while

Postiz's docs note that without LinkedIn's Advertising API permissions, tokens can't be refreshed. Request them on your LinkedIn app.

Containers keep restarting

Usually memory. Elasticsearch and Temporal are hungry. Check docker compose logs and free -h; if you're on 2 GB, add swap or move up to 4 GB.

Updating and backing up Postiz

# update to the latest images
cd postiz-docker-compose
git pull
docker compose pull
docker compose up -d

# back up the Postiz database
docker exec postiz-postgres pg_dumpall -U postgres > postiz-backup-$(date +%F).sql

Check the Postiz release notes before big version jumps. For example, upgrading from v2.11.2 to v2.12.0 or later needs a migration step because of Temporal changes. Adjust the database user in the backup command if you changed it in the compose file, and back up the postiz-uploads volume too if you care about your media.

Self-hosted Postiz vs Buffer and Hootsuite

  • Price: Postiz self-hosted is free software plus your server. Buffer and Hootsuite bill per channel or per user every month.
  • Setup: Buffer and Hootsuite work in two minutes. Postiz needs a server, a domain and developer apps for each platform.
  • Maintenance: With Postiz, updates and backups are on you.
  • Control: Postiz wins — your data, your domain, no account limits.

If you manage several brands or clients, self-hosting pays for itself quickly. If you manage one account and hate servers, a hosted tool might be fine.

Need help setting up Postiz?

Setting up the server is the easy part; the developer apps, callback URLs and platform reviews are where most people get stuck. I've done it for my own accounts and I offer it as a service: Postiz setup on Fiverr. You get a working Postiz on your own domain, with HTTPS, registration locked, and your channels connected.

Frequently asked questions

Is Postiz free?

Yes. Postiz is open source under the AGPL-3.0 license and the self-hosted version is free to use. You only pay for the server it runs on. There's also a paid hosted version if you don't want to self-host.

How much RAM does Postiz need?

The official docs test on 2 GB RAM and 2 vCPUs. Because it runs Postgres, Redis, Temporal and Elasticsearch, 4 GB is more comfortable for real use.

Can I install Postiz on shared hosting?

No. Postiz runs as a set of Docker containers, so you need a VPS or dedicated server where you can install Docker.

Which social networks does Postiz support?

X, LinkedIn, Facebook, Instagram, TikTok, YouTube, Pinterest, Threads, Reddit, Bluesky, Mastodon, Discord, Slack and Dribbble, among others.

Is Postiz a good Buffer alternative?

For people who are comfortable running a server, or who manage many accounts, yes. It covers scheduling, a calendar, previews, team members and analytics, without per-channel pricing.

Can someone set up Postiz for me?

Yes — I set up Postiz on your server and domain, with HTTPS, and connect your social accounts.