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
On a fresh installation, copy the example once:
cp .env.example .envEasiest: in Publit.Si open Settings › Platform setup › Enter credentials. It writes
.envand restarts worker and gateway with the new values. Secrets are never shown again there.Or edit
.envin a text editor, then runpnpm ops:installagain (or restartpnpm devand the services).
Tunnel and operator
Needed for Instagram, Facebook, Threads, LinkedIn, TikTok and YouTube production. See Cloudflare tunnel.
| Variable | Default | What it does |
|---|---|---|
PUBLITSI_PUBLIC_URL | Public 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_NAME | Your name or company, shown on the gateway's public /privacy and /terms pages that Meta, Google and TikTok look at. | |
PUBLITSI_OPERATOR_EMAIL | Contact email for the same pages. |
Instagram and Facebook
From your Meta app. See Connect Instagram and Connect Facebook.
| Variable | Default | What it does |
|---|---|---|
INSTAGRAM_APP_ID | Older Meta apps only: the Instagram app ID from API setup with Instagram login (not the Facebook app ID). | |
INSTAGRAM_APP_SECRET | The matching Instagram app secret. | |
INSTAGRAM_INSIGHTS | 0 | 1 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_COMMENTS | 0 | 1 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_ID | Meta 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_SECRET | The matching app secret. | |
INSTAGRAM_UNIFIED_CONFIG_ID | ID of the configuration under Facebook Login for Business › Configurations. | |
INSTAGRAM_UNIFIED_ACCOUNT_ID | Only 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_ID | Only 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.
| Variable | Default | What it does |
|---|---|---|
THREADS_APP_ID | The Threads app ID from your Meta app's use case Access the Threads API › Customize › Settings (not the Meta app ID). | |
THREADS_APP_SECRET | The matching Threads app secret. |
From your LinkedIn developer app, tab Auth. See Connect LinkedIn.
| Variable | Default | What it does |
|---|---|---|
LINKEDIN_CLIENT_ID | The Client ID of your LinkedIn developer app (tab Auth). | |
LINKEDIN_CLIENT_SECRET | The matching Primary Client Secret. |
YouTube and Search Console
From your Google project. See Connect YouTube.
| Variable | Default | What it does |
|---|---|---|
GOOGLE_CLIENT_ID | Client ID of your Google OAuth client of type Web application. Also used for Search Console. | |
GOOGLE_CLIENT_SECRET | The matching client secret. |
TikTok
From your TikTok developer app. See Connect TikTok.
| Variable | Default | What it does |
|---|---|---|
TIKTOK_CLIENT_KEY | Client key of your TikTok app (Login Kit and Content Posting API). | |
TIKTOK_CLIENT_SECRET | The matching client secret. | |
TIKTOK_AUDITED | 0 | 1 only after TikTok approved your app's audit. Unlocks public Direct Posts. |
TIKTOK_ANALYTICS | 0 | 1 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.
| Variable | Default | What it does |
|---|---|---|
CREATIFY_API_ID | API ID from creatify.ai › API Dashboard. Needs a Creatify API plan. | |
CREATIFY_API_KEY | The matching API key. | |
CREATIFY_MAX_CREDITS_PER_CHAT | 20 | Most 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.
| Variable | Default | What it does |
|---|---|---|
ANTHROPIC_API_KEY | Claude Code uses this key instead of a login, billed per request by Anthropic. Restart Publit.Si after setting it. | |
CURSOR_API_KEY | Cursor's agent uses this key instead of a login. | |
MISTRAL_API_KEY | For 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.
| Variable | Default | What it does |
|---|---|---|
PUBLITSI_WEB_PORT | 3000 | Port of the app on 127.0.0.1. Settings › General › Address changes it and restarts the app. |
PUBLITSI_WEB_ORIGIN | http://localhost:<PUBLITSI_WEB_PORT> | Where the app runs. OAuth sign-ins return the browser here. |
PUBLITSI_GATEWAY_PORT | 3100 | Port of the gateway on 127.0.0.1. Change the tunnel config to match. |
PUBLITSI_GRACE_MINUTES | 120 | How late a missed post (computer asleep) may still go out on its own. |
PUBLITSI_DATA_DIR | Another data folder for the database, media and logs. | |
PUBLITSI_CONTENT_DIR | Another place for the content/ folders, e.g. on another drive. A symlink works too. | |
PUBLITSI_MASTER_KEY | The token key itself, instead of the Keychain, DPAPI or keyring. Only for special setups. | |
PUBLITSI_NOTIFICATIONS | 1 | 0 turns notifications off. |
PUBLITSI_ENABLE_FAKE_PLATFORM | 0 | 1 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.