Publit.Si
Docs›Configuration reference

Configuration

Configuration reference

Publit.Si reads its settings from .env in the publitsi folder. This page lists every variable. You only need the ones for the platforms you use.

How to change it

  1. On a fresh installation, copy the example once:

    cp .env.example .env
  2. Easiest: in Publit.Si open Settings › Platform setup › Enter credentials. It writes .env and restarts worker and gateway with the new values. Secrets are never shown again there.

  3. Or edit .env in a text editor, then run pnpm ops:install again (or restart pnpm dev and the services).

Tunnel and operator

Needed for Instagram, Facebook, Threads, LinkedIn, TikTok and YouTube production. See Cloudflare tunnel.

VariableDefaultWhat it does
PUBLITSI_PUBLIC_URLPublic HTTPS address of your tunnel, e.g. https://publish.example.com. Instagram, Threads and TikTok load media from it, and the OAuth callbacks of Instagram, Facebook, Threads, LinkedIn and TikTok use it.
PUBLITSI_OPERATOR_NAMEYour name or company, shown on the gateway's public /privacy and /terms pages that Meta, Google and TikTok look at.
PUBLITSI_OPERATOR_EMAILContact email for the same pages.

Instagram and Facebook

From your Meta app. See Connect Instagram and Connect Facebook.

VariableDefaultWhat it does
INSTAGRAM_APP_IDOlder Meta apps only: the Instagram app ID from API setup with Instagram login (not the Facebook app ID).
INSTAGRAM_APP_SECRETThe matching Instagram app secret.
INSTAGRAM_INSIGHTS01 once the insights permission is in the Meta app (instagram_business_manage_insights, Unified login: instagram_manage_insights): views and reach in Analytics. Reconnect afterwards. Same as the switch under Settings › Platforms › Statistics and comments.
INSTAGRAM_COMMENTS01 once the comments permission is in the Meta app (instagram_business_manage_comments, Unified login: instagram_manage_comments): read and answer comments. Reconnect afterwards. Same as the switch under Settings › Platforms › Statistics and comments.
INSTAGRAM_UNIFIED_APP_IDMeta apps created since late October 2026 (Unified login): the app ID from App settings › Basic. Once set, Connect › Instagram uses Unified login.
INSTAGRAM_UNIFIED_APP_SECRETThe matching app secret.
INSTAGRAM_UNIFIED_CONFIG_IDID of the configuration under Facebook Login for Business › Configurations.
INSTAGRAM_UNIFIED_ACCOUNT_IDOnly when Meta doesn't say which account you shared: the Instagram account's ID (digits, Meta Business Suite › Settings › Instagram accounts). Checked when you connect.
FACEBOOK_PAGE_IDOnly when your Meta login shares several Facebook Pages: the ID of the Page to connect (digits, Meta Business Suite › Settings › Pages). Facebook otherwise uses the INSTAGRAM_UNIFIED_* settings.

Threads

Its own app ID and secret, not the Meta app of Instagram's login. See Connect Threads.

VariableDefaultWhat it does
THREADS_APP_IDThe Threads app ID from your Meta app's use case Access the Threads API › Customize › Settings (not the Meta app ID).
THREADS_APP_SECRETThe matching Threads app secret.

LinkedIn

From your LinkedIn developer app, tab Auth. See Connect LinkedIn.

VariableDefaultWhat it does
LINKEDIN_CLIENT_IDThe Client ID of your LinkedIn developer app (tab Auth).
LINKEDIN_CLIENT_SECRETThe matching Primary Client Secret.

YouTube and Search Console

From your Google project. See Connect YouTube.

VariableDefaultWhat it does
GOOGLE_CLIENT_IDClient ID of your Google OAuth client of type Web application. Also used for Search Console.
GOOGLE_CLIENT_SECRETThe matching client secret.

TikTok

From your TikTok developer app. See Connect TikTok.

VariableDefaultWhat it does
TIKTOK_CLIENT_KEYClient key of your TikTok app (Login Kit and Content Posting API).
TIKTOK_CLIENT_SECRETThe matching client secret.
TIKTOK_AUDITED01 only after TikTok approved your app's audit. Unlocks public Direct Posts.
TIKTOK_ANALYTICS01 only after TikTok approved user.info.stats and video.list. Reconnect afterwards. Same as the switch under Settings › Platforms › Statistics and comments.

Creatify

Only for the optional API way. See Add-ons.

VariableDefaultWhat it does
CREATIFY_API_IDAPI ID from creatify.ai › API Dashboard. Needs a Creatify API plan.
CREATIFY_API_KEYThe matching API key.
CREATIFY_MAX_CREDITS_PER_CHAT20Most API credits one Studio chat may spend.

AI with an API key

Only instead of a login. Your own OpenAI-compatible API for AI texts is set in the app, not here. See Turn on AI and Your own LLM.

VariableDefaultWhat it does
ANTHROPIC_API_KEYClaude Code uses this key instead of a login, billed per request by Anthropic. Restart Publit.Si after setting it.
CURSOR_API_KEYCursor's agent uses this key instead of a login.
MISTRAL_API_KEYFor OpenCode's Mistral provider. Keys for OpenCode reach it only with a name starting with MISTRAL_ or OPENCODE_.

Advanced

Leave these out unless you need them.

VariableDefaultWhat it does
PUBLITSI_WEB_PORT3000Port of the app on 127.0.0.1. Settings › General › Address changes it and restarts the app.
PUBLITSI_WEB_ORIGINhttp://localhost:<PUBLITSI_WEB_PORT>Where the app runs. OAuth sign-ins return the browser here.
PUBLITSI_GATEWAY_PORT3100Port of the gateway on 127.0.0.1. Change the tunnel config to match.
PUBLITSI_GRACE_MINUTES120How late a missed post (computer asleep) may still go out on its own.
PUBLITSI_DATA_DIRAnother data folder for the database, media and logs.
PUBLITSI_CONTENT_DIRAnother place for the content/ folders, e.g. on another drive. A symlink works too.
PUBLITSI_MASTER_KEYThe token key itself, instead of the Keychain, DPAPI or keyring. Only for special setups.
PUBLITSI_NOTIFICATIONS10 turns notifications off.
PUBLITSI_ENABLE_FAKE_PLATFORM01 enables the offline Test platform (development only).

Example

PUBLITSI_PUBLIC_URL=https://publish.example.com
PUBLITSI_OPERATOR_NAME=Jane Doe
PUBLITSI_OPERATOR_EMAIL=jane@example.com

INSTAGRAM_UNIFIED_APP_ID=…
INSTAGRAM_UNIFIED_APP_SECRET=…
INSTAGRAM_UNIFIED_CONFIG_ID=…
INSTAGRAM_INSIGHTS=1
INSTAGRAM_COMMENTS=1

THREADS_APP_ID=…
THREADS_APP_SECRET=…

LINKEDIN_CLIENT_ID=…
LINKEDIN_CLIENT_SECRET=…

GOOGLE_CLIENT_ID=….apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=…

TIKTOK_CLIENT_KEY=…
TIKTOK_CLIENT_SECRET=…

Stuck? Search the troubleshooting list or write to us . Leave out secrets and tokens.