NanoGPT + LibreChat Setup Guide 2026
LibreChat is the best open-source ChatGPT alternative. NanoGPT gives it access to 400+ models. together, they're the ultimate self-hosted AI setup.
TL;DR: install LibreChat, add your NanoGPT API key as a custom endpoint, pick your models. takes about 15 minutes if you've used Docker before.
👉 Get NanoGPT with 5% discount — you'll need an account and API key.
What Is LibreChat?
LibreChat is an open-source AI chat interface. think of it as a self-hosted ChatGPT that supports multiple AI providers. it's free, runs on your own server, and gives you full control over your data.
Why Use LibreChat with NanoGPT?
| Benefit | Explanation |
|---|---|
| Self-hosted | your data stays on your server |
| Multi-model | NanoGPT provides 400+ models |
| Free UI | no subscription for the interface |
| Customizable | change themes, plugins, behavior |
| Privacy | no tracking, no data collection |
| Multi-user | share with family or small team |
compared to using NanoGPT's web interface directly, LibreChat gives you a better UI, conversation history, presets, and plugins.
Prerequisites
before you start, you need:
- a NanoGPT account with credits and an API key (sign up here)
- Docker installed on your machine or server
- Git installed (to clone the LibreChat repo)
- 15 minutes of your time
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 2 GB | 4 GB |
| Storage | 5 GB | 10 GB |
| CPU | 1 core | 2 cores |
| OS | Linux, Mac, Windows | Linux (Ubuntu 22.04+) |
Step-by-Step Installation
Step 1: Clone LibreChat
git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
Step 2: Configure Environment
copy the example environment file:
cp .env.example .env
edit .env and add your NanoGPT configuration:
# NanoGPT Configuration
NANOGPT_API_KEY=your-nanogpt-api-key-here
NANOGPT_BASE_URL=https://api.nano-gpt.com/v1
Step 3: Start with Docker
docker compose up -d
this starts LibreChat and its MongoDB database. first run takes a few minutes to download images.
Step 4: Access LibreChat
open your browser and go to:
http://localhost:3080
create your admin account on first visit.
Step 5: Add NanoGPT as Endpoint
- go to Settings (gear icon)
- click Endpoints
- click Add Custom Endpoint
- fill in:
- Name: NanoGPT
- Base URL:
https://api.nano-gpt.com/v1 - API Key: your NanoGPT API key
- Models: select the models you want (or add manually)
- click Save
Step 6: Test the Connection
select a model from the dropdown and send a test message. if you get a response, you're done.
Model Configuration
Adding Models Manually
if models don't appear automatically, add them manually:
- go to Settings → Endpoints → NanoGPT
- in the Models field, add model IDs:
gpt-4oclaude-3-5-sonnetgemini-1.5-promistral-largedeepseek-v3gpt-4o-mini
Recommended Model Presets
| Use Case | Model | Why |
|---|---|---|
| General chat | GPT-4o | Best all-around |
| Writing | Claude 3.5 Sonnet | Better prose |
| Coding | GPT-4o | Most consistent code |
| Quick answers | GPT-4o-mini | Fast and cheap |
| Long documents | Gemini 1.5 Pro | Huge context window |
| Budget use | DeepSeek V3 | 10x cheaper than GPT-4o |
check our best models for coding and best models for writing for detailed recommendations.
Advanced Configuration
Custom System Prompts
LibreChat lets you set default system prompts per conversation. go to Settings → System Prompt and configure:
You are a helpful assistant. Be concise and direct.
Preset Configurations
create presets for different use cases:
- click the Preset dropdown
- click Create Preset
- configure:
- name (e.g., "Coding Helper")
- model (e.g., GPT-4o)
- system prompt
- temperature (0.7 for balanced, 0.3 for focused)
- max tokens
- save
Conversation Organization
LibreChat supports folders and tags for organizing conversations:
- folders — group conversations by project or topic
- search — full-text search across all conversations
- export — download conversations as JSON or markdown
- pin important chats — keep frequently used conversations at the top
this is especially useful if you're using NanoGPT for both work and personal tasks. keep them separate with folders.
Multi-User Setup
for sharing with others:
- in
.env, set:ALLOW_REGISTRATION=true - others can create accounts at
http://your-server:3080 - each user gets their own conversation history
- all users share the same NanoGPT API key
Troubleshooting
Common Issues
| Problem | Cause | Fix |
|---|---|---|
| "Invalid API key" | Wrong key or base URL | Check settings in Endpoints |
| No models showing | Endpoint not configured | Add models manually |
| Slow responses | Server resources | Increase Docker memory limit |
| Connection refused | Docker not running | Run docker compose up -d |
| "Rate limited" | Too many requests | Wait or upgrade NanoGPT balance |
| Blank responses | Model error | Try a different model |
Docker Issues
# check if containers are running
docker compose ps
# view logs
docker compose logs
# restart everything
docker compose down && docker compose up -d
# rebuild after updates
git pull
docker compose build
docker compose up -d
API Connection Issues
test your NanoGPT API key directly:
curl https://api.nano-gpt.com/v1/models \
-H "Authorization: Bearer your-api-key"
if this returns a list of models, your key works. the issue is in LibreChat configuration.
see our API key setup guide for key troubleshooting.
Performance Tuning
if LibreChat feels slow:
- increase Docker memory — allocate at least 2GB RAM to Docker
- use SSD storage — MongoDB performs much better on SSD
- reduce context size — lower the context window in model settings
- close unused conversations — long conversation histories slow down responses
- use faster models — GPT-4o-mini responds faster than GPT-4o
LibreChat vs Other Interfaces
| Feature | LibreChat | Open WebUI | NanoGPT Web |
|---|---|---|---|
| Self-hosted | Yes | Yes | No |
| Multi-model | Yes | Yes | Yes |
| Plugins | Yes | Limited | No |
| Multi-user | Yes | Yes | No |
| Mobile friendly | Yes | Yes | Yes |
| Setup difficulty | Medium | Medium | None |
| Conversation search | Yes | Yes | Basic |
| Presets | Yes | Yes | No |
see our Open WebUI setup guide for an alternative interface.
LibreChat + NanoGPT FAQ
Is LibreChat free?
yes. it's open-source under the MIT license. you only pay for the AI model usage through NanoGPT.
Can I use LibreChat on a VPS?
yes. many people run it on a $5/month VPS (DigitalOcean, Hetzner, etc.). the VPS runs LibreChat, NanoGPT runs the models.
Does LibreChat support streaming?
yes. streaming works out of the box with NanoGPT. responses appear token by token. no extra configuration needed.
Can I use LibreChat on my phone?
yes. LibreChat is responsive and works well on mobile browsers. access it via your server's IP address on your local network, or set up a reverse proxy with HTTPS for remote access.
Can I use multiple NanoGPT accounts?
not directly. LibreChat uses one API key per endpoint. you could set up multiple endpoints with different keys, but it's not the intended workflow.
How do I update LibreChat?
cd LibreChat
git pull
docker compose build
docker compose up -d
Is my data private with LibreChat?
yes. everything runs on your machine or server. the only external connection is to NanoGPT's API when you send a message. LibreChat itself doesn't phone home or collect analytics.
My Setup
i run LibreChat on a Raspberry Pi 5 at home. it's connected to NanoGPT via a VPN. total cost: ~$8/month for NanoGPT credits, $0 for LibreChat.
compared to $20/month for ChatGPT Plus, i get a better interface, more models, and full control over my data.
the setup took me about 30 minutes (including Docker installation). if you already have Docker, expect 15 minutes.
Last updated: July 2026
Related Articles
- NanoGPT + Open WebUI Setup — alternative interface
- NanoGPT API Key Setup — get your key first
- NanoGPT Pricing — how much you'll spend
- Best NanoGPT Models — full model list
- NanoGPT Privacy Review — data handling details
- SillyTavern + NanoGPT Setup — for roleplay users
Disclosure: This article contains affiliate links. If you sign up through our referral link, you get a 5% discount and we earn a small commission. This doesn't affect our reviews — we pay for all services ourselves.