# OpenWebUI Configuration Guide This guide explains how to configure OpenWebUI to use your AI service as its backend. ## Overview Your AI service now implements the necessary API endpoints to be compatible with OpenWebUI. This allows OpenWebUI to use your AI service as its backend instead of connecting directly to Ollama. ## Configuration Steps ### 1. Update OpenWebUI Environment Variables You need to modify the OpenWebUI environment variables to point to your AI service. This can be done by editing the `.env` file in the OpenWebUI installation directory or by setting environment variables when running the OpenWebUI container. Add or modify the following environment variables: ``` OLLAMA_API_BASE_URL=http://your-server-ip:5251/ollama OPENAI_API_BASE_URL=http://your-server-ip:5251/api ``` Replace `your-server-ip` with the IP address or hostname of the server where your AI service is running. ### 2. Restart OpenWebUI After updating the environment variables, restart the OpenWebUI service to apply the changes. If you're running OpenWebUI using Docker: ```bash docker restart openwebui ``` If you're running OpenWebUI directly: ```bash # Stop the current process pkill -f "openwebui" # Start OpenWebUI again cd /path/to/openwebui npm start ``` ## Testing the Integration To test if the integration is working correctly: 1. Open OpenWebUI in your browser (http://104.225.217.215:8080) 2. Try to create a new chat 3. Select one of the models (gemma3, llama3.3, llama3.1, mistral, or deepseek) 4. Send a message and check if you get a response If everything is configured correctly, OpenWebUI will send requests to your AI service, which will then forward them to the Ollama API. ## Troubleshooting If you encounter issues with the integration: 1. Check the logs of your AI service: ```bash tail -f logs/ai_service.log ``` 2. Check the logs of OpenWebUI: ```bash docker logs openwebui ``` 3. Verify that your AI service is running and accessible: ```bash curl http://your-server-ip:5251/health ``` 4. Verify that the OpenWebUI environment variables are set correctly: ```bash docker exec openwebui env | grep URL ``` ## Advanced Configuration For advanced configuration options, refer to the OpenWebUI documentation: https://docs.openwebui.com/getting-started/env-configuration