FAQ

Frequently asked questions

Everything you need to know about setting up, configuring, and using Secure Custom AI Chat.

Full Documentation Open Chat App
How do I install and run Secure Custom AI Chat?+

Clone the repository, install dependencies, configure environment variables, and start the server:

git clone https://github.com/ssblucky7/Secure-Custom-AI-Chat.git
cd Secure-Custom-AI-Chat
npm install
cp .env.example .env
# Edit .env and set your provider API key and base URL
npm start

The app will be available at http://localhost:3000 by default.

Which AI providers are supported?+

The application supports any provider with an OpenAI-compatible API or Anthropic Messages API. Built-in support includes:

  • OpenAI — GPT-4o, GPT-4o mini, o3, o3-mini
  • Anthropic — Claude 3.7 Sonnet, Claude 3 Opus, Claude 3 Haiku
  • OpenRouter — 200+ models via a single API
  • Groq — Fast Llama, Mistral, and Gemma inference
  • Together AI — Wide model selection
  • DeepSeek — DeepSeek-V3 and DeepSeek-R1
  • Mistral AI — Mistral Large, Codestral
  • Ollama — Local model serving
  • LM Studio — Local inference server

Custom endpoints can be configured for any compatible provider.

Are my API keys safe from the browser?+

In default mode (ALLOW_USER_PROVIDERS=0), yes. API keys are set as environment variables on the server and are never sent to the browser. The browser communicates only with your proxy server.

In per-user mode (ALLOW_USER_PROVIDERS=1), each user enters their own key in the browser. These are stored in localStorage and only sent to the provider endpoint you configure. The server never sees user keys.

Can I use this with Ollama or local models?+

Yes! Ollama and LM Studio are fully supported. For Ollama, set the base URL to http://localhost:11434 and the model name to your Ollama model ID (e.g., llama3.2, mistral, codellama). The app will proxy requests through your server to the local Ollama instance.

Note: Your proxy server must be able to reach the Ollama endpoint (same machine or accessible network).

Does the app cache my conversation history?+

Yes. All conversations are stored locally in your browser using IndexedDB. Nothing is sent to any server except the AI provider you configure. Your history persists between sessions but is never uploaded anywhere.

You can export conversations as Markdown files from the conversation menu.

How do I make the app installable as a PWA?+

The app includes a service worker and web app manifest for PWA support. To install:

  • Chrome/Edge: Click the install icon in the address bar
  • iOS: Tap the Share button → "Add to Home Screen"
  • Android: Tap the menu → "Install app"

Once installed, the app launches in a standalone window and works even with poor connectivity (the UI shell is cached).

Why am I getting a "Invalid provider URL" error?+

This error occurs when the provider URL fails validation. Common causes:

  • The URL does not resolve to a valid IP address (typo in hostname)
  • The resolved IP is in a private/reserved range (SSRF protection)
  • The URL does not start with http:// or https://
  • The URL points to localhost when the server is running remotely

Ensure the provider endpoint is reachable from your server and uses a valid public domain or IP.

How do I enable user-configured providers?+

Set ALLOW_USER_PROVIDERS=1 in your .env file. This enables the "AI Configure / Setup" panel in the app sidebar, allowing each user to enter their own API key and base URL.

The provider configuration panel is only visible when this flag is enabled. In this mode, the server does not need pre-configured API keys — each user provides their own.

Can I deploy this to a production environment?+

Yes. Set NODE_ENV=production before starting. For production deployment:

  • Use a process manager like PM2: pm2 start server.js
  • Serve behind a reverse proxy (nginx, Caddy) with HTTPS
  • Set strong API keys in environment variables
  • Configure rate limits appropriately for your traffic
  • Add authentication at the infrastructure level (the app itself has no login system)

The app is designed to be lightweight and can run on any Node.js 18+ environment including Docker, VPS, or cloud platforms.

Is this app free and open source?+

Yes. Secure Custom AI Chat is released under the MIT License. You are free to use, modify, and distribute it for personal or commercial purposes. The source code is available on GitHub.

You are responsible for your own API costs when using paid providers. This application does not charge any fees.