IssueRaiser

Support ENV Variables for Custom OpenAI Base URL & Model

### 🔖 Feature description Postiz currently uses a fixed OpenAI base URL and model. I am requesting support for customizing these values through **environment variables**, allowing developers and self-hosters to point Postiz to different OpenAI-compatible providers or local LLM servers. This would include supporting: ``` OPENAI_BASE_URL= OPENAI_MODEL= ``` When these environment variables are not provided, Postiz should use the existing default values. ### 🎤 Why is this feature needed ? In my use-case, I need to run Postiz with **local or alternative OpenAI-compatible APIs** such as Ollama, LM Studio, OpenRouter, or custom vLLM deployments. Right now, the base URL and model are hardcoded, making it impossible to change providers without modifying the source code. Examples: * Using local models during development * Switching to more cost-effective API providers * Running internal enterprise LLMs * Testing different models dynamically ENV-based configuration makes Postiz more flexible without requiring UI changes. ### ✌️ How do you aim to achieve this? I want this feature to allow Postiz to read two optional ENV variables: ``` OPENAI_BASE_URL OPENAI_MODEL ``` The app would use these values if available; otherwise, it would fall back to the default OpenAI settings. No UI changes are required; the behavior remains unchanged unless users override it with environment settings. ### 🔄️ Additional Information _No response_ ### 👀 Have you spent some time to check if

Posted by rajubeparybd on Nov 21, 2025, 10:50 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

pricing (SaaS)

Support ENV Variables for Custom OpenAI Base URL & Model

rajubeparybdNov 21, 2025, 10:50 AM

### 🔖 Feature description Postiz currently uses a fixed OpenAI base URL and model. I am requesting support for customizing these values through **environment variables**, allowing developers and self-hosters to point Postiz to different OpenAI-compatible providers or local LLM servers. This would include supporting: ``` OPENAI_BASE_URL= OPENAI_MODEL= ``` When these environment variables are not provided, Postiz should use the existing default values. ### 🎤 Why is this feature needed ? In my use-case, I need to run Postiz with **local or alternative OpenAI-compatible APIs** such as Ollama, LM Studio, OpenRouter, or custom vLLM deployments. Right now, the base URL and model are hardcoded, making it impossible to change providers without modifying the source code. Examples: * Using local models during development * Switching to more cost-effective API providers * Running internal enterprise LLMs * Testing different models dynamically ENV-based configuration makes Postiz more flexible without requiring UI changes. ### ✌️ How do you aim to achieve this? I want this feature to allow Postiz to read two optional ENV variables: ``` OPENAI_BASE_URL OPENAI_MODEL ``` The app would use these values if available; otherwise, it would fall back to the default OpenAI settings. No UI changes are required; the behavior remains unchanged unless users override it with environment settings. ### 🔄️ Additional Information _No response_ ### 👀 Have you spent some time to check if

Comments (0)

No comments yet. Start the discussion.

Comment on this issue