NanoGPT + LibreChat Setup Guide 2026

librechat is the best open-source chatgpt alternative i've used. NanoGPT gives it access to 400+ models. together, they're basically the ultimate self-hosted AI setup - and it costs me about $8/month total.

tl;dr: LibreChat plus NanoGPT is the ultimate self-hosted AI setup for $8/month. it runs on a Raspberry Pi 5, supports 400+ models, has conversation search, presets, and multi-user sharing. setup takes 15 minutes with Docker.

Key Takeaways:

  • LibreChat + NanoGPT costs about $8/month total, running on hardware as small as a Raspberry Pi 5
  • setup takes 15 minutes: clone, configure .env with NanoGPT key, docker compose up, done
  • LibreChat has more plugins and customization than Open WebUI, with better conversation organization via folders and tags

i run this on a raspberry pi 5 at home. if that tells you anything about how lightweight it is.

what is librechat

librechat is an open-source AI chat interface you host yourself. think of it as a self-hosted chatgpt that supports multiple AI providers. it's free, runs on your own server, and your data stays on your machine.

why use it with NanoGPT specifically:

benefitexplanation
self-hostedyour data stays on your server
multi-modelNanoGPT provides 400+ models
free UIno subscription for the interface
customizablethemes, plugins, behavior tweaks
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. it's worth the 15-minute setup.

what 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
  4. 15 minutes (30 if Docker is new to you)

system requirements

short answer: minimum 2GB RAM, 5GB storage, 1 core CPU. runs fine on Raspberry Pi 4/5 with 4GB RAM.

componentminimumrecommended
RAM2 GB4 GB
storage5 GB10 GB
CPU1 core2 cores
OSlinux, mac, windowslinux (ubuntu 22.04+)

runs fine on a raspberry pi 4/5 with 4GB RAM. the heavy lifting happens on NanoGPT's servers - librechat is just the UI.

installation

step 1: clone librechat

short answer: git clone the LibreChat repo and cd into the directory.

git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat

step 2: configure environment

short answer: copy .env.example to .env and add your NanoGPT API key and base URL.

cp .env.example .env

edit .env and add your NanoGPT configuration:

NANOGPT_API_KEY=your-nanogpt-api-key-here
NANOGPT_BASE_URL=https://api.nano-gpt.com/v1

step 3: start with Docker

short answer: docker compose up -d starts LibreChat and MongoDB. first run takes a few minutes.

docker compose up -d

this starts librechat and its MongoDB database. first run takes a few minutes to download images. grab a coffee.

step 4: access librechat

short answer: open http://localhost:3080. create your admin account on first visit.

open your browser, go to:

http://localhost:3080

create your admin account on first visit.

step 5: add NanoGPT as endpoint

short answer: in Settings, Endpoints, Add Custom Endpoint with NanoGPT base URL, API key, and model list.

  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)
  1. click Save

step 6: test it

short answer: select a model from the dropdown, send a test message. if you get a response, you're done.

select a model from the dropdown and send a test message. if you get a response, you're done. if not, check the troubleshooting section below.

model configuration

if models don't appear automatically, add them manually:

  1. go to SettingsEndpointsNanoGPT
  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

short answer: gpt-4o for general chat, Claude 3.5 for writing, DeepSeek for budget. create presets with different temperatures for each task.

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

advanced stuff

custom system prompts

short answer: set default system prompts in Settings. keep them focused for better results.

go to SettingsSystem Prompt and set defaults:

You are a helpful assistant. Be concise and direct.

presets for different tasks

short answer: create presets with different models and temperatures: coding at 0.3, creative writing at 0.9, quick answers at 0.5.

  1. click the Preset dropdown
  2. click Create Preset
  3. configure name, model, system prompt, temperature, max tokens
  4. save

i have presets for "coding helper" (gpt-4o, temp 0.3), "creative writing" (claude sonnet, temp 0.9), and "quick answers" (gpt-4o-mini, temp 0.5).

organizing conversations

short answer: use folders to group by project, full-text search across all conversations, export as JSON or markdown, pin important chats.

librechat supports folders and tags:

  • folders - group by project or topic
  • search - full-text search across all conversations
  • export - download as JSON or markdown
  • pin - keep important chats at the top

i separate work and personal conversations with folders. simple but effective.

multi-user setup

short answer: set ALLOW_REGISTRATION=true in .env. others create accounts at your server URL. shared NanoGPT API key and balance.

for sharing with family or a small team:

ALLOW_REGISTRATION=true

others create accounts at http://your-server:3080. each user gets their own conversation history. all users share the same NanoGPT API key and balance.

troubleshooting

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 top up NanoGPT balance
blank responsesmodel errortry a different model

Docker commands you'll need

short answer: docker compose ps to check status, docker compose logs for debugging, docker compose down && up -d to restart.

# 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

testing your API key directly

short answer: curl the NanoGPT models endpoint. if it returns model data, your key works and the issue is in LibreChat config.

curl https://api.nano-gpt.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY_HERE"

if this returns a list of models, your key works. the issue is in librechat configuration.

performance tuning

short answer: allocate 2GB+ RAM to Docker, use SSD storage, reduce context size, close unused conversations for faster responses.

if librechat feels slow:

  • allocate at least 2GB RAM to Docker
  • use SSD storage (MongoDB loves SSDs)
  • reduce context size in model settings
  • close unused conversations
  • 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. open webui is easier to set up, librechat has more plugins and customization.

updating librechat

cd LibreChat
git pull
docker compose build
docker compose up -d

check for updates weekly or so. the project is actively maintained.

data privacy

everything runs on your machine. the only external connection is to NanoGPT's API when you send a message. librechat doesn't phone home or collect analytics. your conversations are stored in MongoDB on your server.

if you want maximum privacy, run it on a local machine (not a VPS). if you need remote access, use a VPN or reverse proxy with HTTPS - don't expose port 3080 to the public internet.

my setup

raspberry pi 5 at home. connected to NanoGPT via 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. setup took 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.

Ready to swap crypto privately?

No KYC. No account. Instant swaps.

Swap Now