New front-end Launch Chat API Manage Sources Enable re-embedding of all contents Sources can be added without a notebook now Improved settings Enable model selector on all chats Background processing for better experience Dark mode Improved Notes Improved Docs: - Remove all Streamlit references from documentation - Update deployment guides with React frontend setup - Fix Docker environment variables format (SURREAL_URL, SURREAL_PASSWORD) - Update docker image tag from :latest to :v1-latest - Change navigation references (Settings → Models to just Models) - Update development setup to include frontend npm commands - Add MIGRATION.md guide for users upgrading from Streamlit - Update quick-start guide with correct environment variables - Add port 5055 documentation for API access - Update project structure to reflect frontend/ directory - Remove outdated source-chat documentation files
3.2 KiB
Configuration Guide
API Connection Configuration
Starting from version 1.0.0-alpha, Open Notebook uses a simplified API connection system that automatically configures itself based on your deployment environment.
How It Works
The frontend now automatically discovers the API location at runtime, eliminating the need for complex network configurations. This works for both Docker deployment modes:
- Multi-container (docker-compose with separate SurrealDB)
- Single-container (all services in one container)
Default Configuration
By default, the API is accessible at http://localhost:5055. This works for most local Docker deployments where:
- You access the frontend at
http://localhost:8502 - Your browser can directly reach
http://localhost:5055
No configuration needed for standard localhost deployments!
Custom Configuration
If you need to change the API URL (e.g., running on a different host, port, or domain), you can configure it using the API_URL environment variable.
Option 1: Using docker-compose (Recommended)
Edit your docker.env file:
API_URL=http://your-server-ip:5055
Or add it to your docker-compose.yml:
services:
open_notebook:
image: lfnovo/open_notebook:latest
ports:
- "8502:8502"
- "5055:5055" # API port must be exposed
environment:
- API_URL=http://your-server-ip:5055
Option 2: Using docker run
docker run -e API_URL=http://your-server-ip:5055 \
-p 8502:8502 \
-p 5055:5055 \
lfnovo/open_notebook:latest
Important Notes
-
Port 5055 must be exposed: The browser needs direct access to the API, so port 5055 must be mapped in your Docker configuration.
-
Use the externally accessible URL: The
API_URLshould be the URL that a browser can reach, not internal Docker networking addresses. -
Protocol matters: Use
http://for local deployments,https://if you've set up SSL.
Examples
Running on a different host
API_URL=http://192.168.1.100:5055
Running on a custom domain with SSL
API_URL=https://notebook.example.com/api
Running on a custom port
API_URL=http://localhost:3055
(Remember to update the port mapping in docker-compose accordingly)
Troubleshooting
"Unable to connect to server" error on login:
- Verify port 5055 is exposed in your Docker configuration
- Check that
API_URLmatches the URL your browser can access - Try accessing
http://localhost:5055/healthdirectly in your browser - If that fails, the API isn't running or port isn't exposed
API works but frontend doesn't connect:
- Check browser console for CORS errors
- Verify
API_URLis set correctly - Make sure you're using the same protocol (http/https) throughout
Migration from Previous Versions
If you were previously exposing port 5055 manually or had custom configurations, you may need to:
- Update your
docker.envor environment variables to includeAPI_URL - Ensure port 5055 is exposed in your docker-compose.yml (it's now required)
- Remove any custom Next.js configuration or environment variables you may have added
The default configuration will work for most users without any changes.