tutorial

Monitoring Lobe Chat with Vigilmon

Lobe Chat is a polished self-hosted AI chat interface with multi-LLM support, plugins, and voice — but it has no built-in uptime alerting. Here's how to monitor the Next.js server, database, LLM providers, auth, and SSL certificates with Vigilmon.

Lobe Chat is a feature-rich self-hosted alternative to ChatGPT — supporting 50+ LLM providers, plugins, speech synthesis, image generation, and a modern web UI built on Next.js. In server deployment mode with PostgreSQL, it becomes a multi-user platform where conversations, files, and API key configs are stored centrally. When any layer goes down — the Next.js app, the database, the LLM provider APIs, or the auth service — every user loses access to their AI assistant. Vigilmon gives you uptime monitoring, database health checks, provider reachability alerts, and SSL certificate monitoring so you catch Lobe Chat failures before your users do.

What You'll Set Up

  • HTTP uptime monitor for the Next.js application (port 3210)
  • PostgreSQL database connectivity check
  • LLM provider API reachability monitors (OpenAI, Anthropic, Ollama)
  • Plugin endpoint health monitor
  • File upload service health check (S3 / local storage)
  • Authentication service health monitor
  • Speech synthesis (TTS) service check
  • Web search plugin health monitor
  • SSL certificate expiry alerts

Prerequisites

  • Lobe Chat running in server mode (Docker or Node.js) on port 3210
  • PostgreSQL database configured and connected
  • A free Vigilmon account

Step 1: Monitor the Next.js Application Server

The Lobe Chat Next.js app is the primary entry point for all users. It serves the chat UI, handles API routes, and proxies requests to LLM providers. If it goes down, no one can access the application.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the Lobe Chat URL: http://your-server:3210/ (or your reverse-proxied HTTPS domain).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Enable Keyword check and look for Lobe Chat in the response body.
  7. Click Save.

Lobe Chat also exposes a dedicated health endpoint:

http://your-server:3210/api/health

This endpoint checks the application's internal status without loading the full UI. Use it as an alternative or additional monitor for a more reliable health signal:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter http://your-server:3210/api/health.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 1 minute.

Step 2: Monitor PostgreSQL Database Connectivity

In server deployment mode, Lobe Chat uses PostgreSQL to store all conversations, messages, files, plugin configurations, and API key metadata. Database connectivity loss means users lose access to their conversation history and the app may fail to render their chat sessions.

  1. Click Add MonitorTCP Port.
  2. Enter your PostgreSQL host (e.g., postgres.yourdomain.com).
  3. Set Port to 5432.
  4. Set Check interval to 1 minute.
  5. Click Save.

For a deeper application-level database health check, Lobe Chat's API health endpoint typically includes database connectivity status. If it doesn't, add a lightweight companion endpoint to your deployment:

// pages/api/db-health.js (Next.js API route)
import { neon } from '@neondatabase/serverless';
// or use your preferred PostgreSQL client

export default async function handler(req, res) {
  try {
    const sql = neon(process.env.DATABASE_URL);
    await sql`SELECT 1`;
    res.status(200).json({ status: 'ok' });
  } catch (err) {
    res.status(503).json({ status: 'error', detail: err.message });
  }
}

Then monitor http://your-server:3210/api/db-health with an expected 200 response.


Step 3: Monitor LLM Provider API Reachability

Lobe Chat can connect to 50+ LLM providers. When a provider API is unreachable, users on that provider get errors on every message — but the app itself stays up, making outages easy to miss.

Add monitors for each provider your users rely on:

OpenAI:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://api.openai.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.
  5. Click Save.

Anthropic:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://api.anthropic.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

Google Gemini:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://generativelanguage.googleapis.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

Self-hosted Ollama:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter http://your-ollama-host:11434/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.

For Ollama, also verify specific models are loaded and responding:

#!/usr/bin/env python3
import requests

def check_ollama_model():
    try:
        resp = requests.post(
            'http://your-ollama-host:11434/api/generate',
            json={'model': 'llama3', 'prompt': 'ping', 'stream': False},
            timeout=15
        )
        if resp.status_code == 200:
            requests.get('https://vigilmon.online/heartbeat/ollama123', timeout=5)
    except Exception:
        pass

check_ollama_model()

Step 4: Monitor Plugin Endpoint Health

Lobe Chat's plugin marketplace lets users add tool-calling capabilities — web search, code execution, calculators, image generators, and custom APIs. Plugin endpoints are external services that the Lobe Chat server calls on behalf of users. If a plugin's API is down, that tool silently fails mid-conversation.

For each critical plugin your team uses, add an HTTP monitor:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the plugin's manifest or health endpoint URL.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

For example, if you run a custom plugin server:

http://your-plugin-server:3400/api/plugin-name/manifest.json

Lobe Chat fetches plugin manifests at startup — if the manifest endpoint is down, the plugin won't load. Monitoring the manifest URL is a lightweight proxy for overall plugin health.


Step 5: Monitor File Upload Service Health

Lobe Chat supports multi-modal inputs — users can upload images and documents for analysis by vision-capable models. Files are stored in S3-compatible object storage or local disk. If the upload service fails, file-based conversations silently break.

For S3-compatible storage (AWS S3, MinIO, R2):

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the storage bucket endpoint (e.g., https://s3.amazonaws.com/ or your MinIO URL).
  3. Set Expected HTTP status to 200 or 403 (a 403 on the bucket root means S3 is reachable but access is correctly restricted).
  4. Set Check interval to 5 minutes.

For local storage, add a heartbeat from a write-check script:

#!/usr/bin/env python3
import os
import requests

UPLOAD_DIR = '/app/uploads'
HEARTBEAT_URL = 'https://vigilmon.online/heartbeat/uploads123'

test_file = os.path.join(UPLOAD_DIR, '.healthcheck')
try:
    with open(test_file, 'w') as f:
        f.write('ok')
    os.remove(test_file)
    requests.get(HEARTBEAT_URL, timeout=5)
except OSError:
    pass  # Write failed — disk full or permission issue

Schedule every 5 minutes and set the heartbeat interval to 10 minutes.

For the Lobe Chat file upload API route itself:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter http://your-server:3210/api/files/upload with a HEAD or OPTIONS request.
  3. Set Expected HTTP status to 200 or 405 (Method Not Allowed is acceptable for OPTIONS — it means the route exists and is responding).

Step 6: Monitor Authentication Service Health

Lobe Chat in server mode supports NextAuth with multiple identity providers: Clerk, Auth0, GitHub OAuth, and others. If the auth service is down or misconfigured, users can't log in and existing sessions may not validate.

For the NextAuth session endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter http://your-server:3210/api/auth/providers.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

The /api/auth/providers endpoint returns the list of configured authentication providers. A 200 response confirms NextAuth is initialized and the auth routes are reachable.

For Clerk (if using Clerk for authentication):

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://api.clerk.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

For Auth0:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://YOUR_TENANT.auth0.com/ (your Auth0 domain).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

Step 7: Monitor Speech Synthesis (TTS) Service

Lobe Chat's voice chat feature uses text-to-speech endpoints to convert AI responses to audio. If the TTS service is down, voice conversations silently degrade to text-only without clear user feedback.

For OpenAI TTS (used when configured as the TTS provider):

Monitor the OpenAI API endpoint (already covered in Step 3). The same API outage affects both chat completions and TTS.

For a self-hosted TTS service (e.g., Coqui TTS, edge-tts):

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter your TTS server health endpoint (e.g., http://your-tts-server:5002/api/tts).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.

For Microsoft Edge TTS (cloud):

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=6A5AA1D4EAFF4E9FB37E23D68491D6F4.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 10 minutes.

Step 8: Monitor Web Search Plugin Health

If Lobe Chat is configured with a web search plugin (Bing Search, Brave Search, SerpAPI, or a custom search endpoint), search-grounded responses depend on that external service's availability. A down search API means all search-augmented queries silently return un-grounded responses.

For Bing Search API:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://api.bing.microsoft.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 10 minutes.

For Brave Search:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://api.search.brave.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 10 minutes.

For SerpAPI:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://serpapi.com/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 10 minutes.

Step 9: SSL Certificate Expiry Alerts

Lobe Chat is typically served over HTTPS via a reverse proxy (nginx, Caddy, Traefik) or a managed TLS provider. Certificate expiry causes browser warnings that immediately break user trust in your self-hosted instance.

  1. Open the HTTP monitor for your Lobe Chat HTTPS domain.
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

For teams using Caddy or Traefik with automatic certificate renewal, also add a renewal success heartbeat:

# In your certificate renewal hook
curl -s https://vigilmon.online/heartbeat/ssl123

If you serve Lobe Chat on multiple subdomains (e.g., chat.yourdomain.com and files.yourdomain.com), add a separate SSL monitor for each domain.


Step 10: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook for your team.
  2. Set Consecutive failures before alert to 2 on the Next.js application monitor — rolling deployments or container restarts cause brief single-probe failures.
  3. Set Consecutive failures to 1 on the PostgreSQL and auth service monitors — database or auth failures immediately impact all users.
  4. For LLM provider monitors, set Consecutive failures to 3 — brief API hiccups are common and don't warrant waking the team.
  5. Use Maintenance windows during Lobe Chat updates:
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "abc123", "duration_minutes": 10}'

docker compose pull && docker compose up -d lobe-chat

Summary

| Monitor | Target | What It Catches | |---|---|---| | Next.js app | HTTP :3210/ | Server crash, deploy failure | | Health endpoint | HTTP :3210/api/health | App internal error | | PostgreSQL | TCP :5432 | Database connectivity loss | | OpenAI API | https://api.openai.com/ | Provider outage | | Anthropic API | https://api.anthropic.com/ | Provider outage | | Ollama | HTTP :11434/ | Local model server down | | Plugin endpoint | Plugin manifest URL | Tool-calling plugin unavailable | | File uploads | S3 endpoint or write heartbeat | Storage failure, disk full | | Auth service | GET /api/auth/providers | NextAuth broken, login failure | | TTS service | TTS health endpoint | Voice chat degraded | | Web search | Search API endpoint | Search-grounded responses broken | | SSL certificate | HTTPS domain | TLS renewal failure |

Lobe Chat's rich feature set means more services to monitor — LLM providers, storage, authentication, plugins, and TTS all contribute to the user experience. With Vigilmon watching each layer, you'll know about outages before your users report them and before a silently broken provider wastes a day of conversations.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →