Ollama Install
To install Ollama you download one installer or run one script, depending on your operating system. The installer adds the ollama command to your PATH and starts a background server that listens on http://localhost:11434.
Install Ollama on Windows and macOS
Go to ollama.com/download, download the installer for your system and run it. On Windows it installs as a normal app and starts in the system tray. On macOS drag the app to Applications and open it once. Both start the server automatically at login.
Install Ollama on Linux
On Linux the official install script detects your distribution and GPU drivers and sets Ollama up as a systemd service.
curl -fsSL https://ollama.com/install.sh | sh
# check the service
systemctl status ollama● ollama.service - Ollama Service
Loaded: loaded (/etc/systemd/system/ollama.service; enabled)
Active: active (running)Verify the Installation
Check the version and make sure the server answers HTTP requests:
ollama --version
curl http://localhost:11434ollama version is 0.x.x Ollama is running
Your version number will differ; Ollama releases often. If the curl call fails, the server is not running. Start it manually with ollama serve in a separate terminal.
Run Ollama in Docker
Prefer containers? The official image works on any machine with Docker. Add --gpus=all on Linux hosts with the NVIDIA Container Toolkit installed.
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker exec -it ollama ollama run llama3.2>>> Send a message (/? for help)
Useful Environment Variables
- OLLAMA_HOST - address the server binds to, e.g. 0.0.0.0:11434 to allow other machines.
- OLLAMA_MODELS - folder where models are stored (useful when your system drive is small).
- OLLAMA_KEEP_ALIVE - how long a model stays loaded in memory after a request (default 5 minutes).
- OLLAMA_ORIGINS - extra allowed origins for browser (CORS) requests.
Frequently asked questions
Where does Ollama store models?
By default in ~/.ollama/models on macOS and Linux and in C:\Users\<you>\.ollama\models on Windows (the Linux service uses /usr/share/ollama). Set OLLAMA_MODELS to change it.
How do I update Ollama?
On Windows and macOS the app updates itself or you re-run the installer. On Linux, run the install script again.
Which port does Ollama use?
Port 11434 on localhost by default. Change it with the OLLAMA_HOST environment variable.