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?

BenefitExplanation
Self-hostedyour data stays on your server
Multi-modelNanoGPT provides 400+ models
Free UIno subscription for the interface
Customizablechange themes, plugins, behavior
Privacyno tracking, no data collection
Multi-usershare 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:

  1. a NanoGPT account with credits and an API key (sign up here)
  2. Docker installed on your machine or server
  3. Git installed (to clone the LibreChat repo)
  4. 15 minutes of your time

System Requirements

ComponentMinimumRecommended
RAM2 GB4 GB
Storage5 GB10 GB
CPU1 core2 cores
OSLinux, Mac, WindowsLinux (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

  1. go to Settings (gear icon)
  2. click Endpoints
  3. click Add Custom Endpoint
  4. 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)
  5. 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:

  1. go to Settings → Endpoints → NanoGPT
  2. in the Models field, add model IDs:
    • gpt-4o
    • claude-3-5-sonnet
    • gemini-1.5-pro
    • mistral-large
    • deepseek-v3
    • gpt-4o-mini
Use CaseModelWhy
General chatGPT-4oBest all-around
WritingClaude 3.5 SonnetBetter prose
CodingGPT-4oMost consistent code
Quick answersGPT-4o-miniFast and cheap
Long documentsGemini 1.5 ProHuge context window
Budget useDeepSeek V310x 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:

  1. click the Preset dropdown
  2. click Create Preset
  3. configure:
    • name (e.g., "Coding Helper")
    • model (e.g., GPT-4o)
    • system prompt
    • temperature (0.7 for balanced, 0.3 for focused)
    • max tokens
  4. 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:

  1. in .env, set:
    ALLOW_REGISTRATION=true
    
  2. others can create accounts at http://your-server:3080
  3. each user gets their own conversation history
  4. all users share the same NanoGPT API key

Troubleshooting

Common Issues

ProblemCauseFix
"Invalid API key"Wrong key or base URLCheck settings in Endpoints
No models showingEndpoint not configuredAdd models manually
Slow responsesServer resourcesIncrease Docker memory limit
Connection refusedDocker not runningRun docker compose up -d
"Rate limited"Too many requestsWait or upgrade NanoGPT balance
Blank responsesModel errorTry 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

FeatureLibreChatOpen WebUINanoGPT Web
Self-hostedYesYesNo
Multi-modelYesYesYes
PluginsYesLimitedNo
Multi-userYesYesNo
Mobile friendlyYesYesYes
Setup difficultyMediumMediumNone
Conversation searchYesYesBasic
PresetsYesYesNo

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.

👉 Get started with NanoGPT


Last updated: July 2026


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.