Configuring Ollama
IP - bound to 0.0.0.0 so that it serves external requests.
Windows -
Set up an environment variable, OLLAMA_HOST, value 0.0.0.0 or 0.0.0.0:(port) - if you'd like to use different port number. Then restart ollama
Linux -
sudo vi /etc/systemd/system/ollama.service
In [Service] section, add:
Environment="OLLAMA_HOST=0.0.0.0"
$ sudo systemctl daemon-reload
$ sudo systemctl restart ollama
Keep model in memory longer
Environment variable, OLLAMA_KEEP_ALIVE to 10 (10 minutes, default is 5 minutes)
Model file location
Windows - %HOMEPATH%\.ollama\models
Linux - /usr/share/ollama/.ollama/models
Logs
Windows - %LOCALAPPDATA%\Ollama
Linux -
sudo journalctl -u ollama.service > ollama_logs.txt
journalctl -e -u ollama
Configuring Ollama
Reviewed by KimWorks
on
July 19, 2024
Rating: 5