Installation Guide
This guide provides detailed instructions for installing Ollama on various Linux distributions, NixOS, and using Docker containers.
System Requirements
Before installing Ollama, ensure your system meets these minimum requirements:
CPU: 64-bit Intel/AMD (x86_64) or ARM64 processor
RAM: 8GB minimum (16GB+ recommended for larger models)
Storage: 10GB+ free space (varies by model size)
Operating System: Linux (kernel 4.15+), macOS 12.0+, or Windows 10/11
GPU (optional but recommended):
NVIDIA GPU with CUDA 11.4+ support
AMD GPU with ROCm 5.4.3+ support
Intel Arc GPU with OneAPI support
Linux Installation (Direct Method)
Using the Install Script (Recommended)
For most Linux distributions, the simplest installation method is using the official install script:
This script automatically detects your Linux distribution and installs the appropriate package.
Manual Installation (Debian/Ubuntu)
For Debian-based distributions (Ubuntu, Debian, Linux Mint, etc.):
Manual Installation (Red Hat/Fedora)
For Red Hat-based distributions (RHEL, Fedora, CentOS, etc.):
Manual Installation (Binary Installation)
If packages are not available for your distribution:
NixOS Installation
Ollama is available in the Nixpkgs collection, making it easy to install on NixOS.
Using Nix Package Manager
NixOS Configuration (Configuration.nix)
For a system-wide installation, add Ollama to your configuration.nix
:
After updating your configuration, apply the changes:
Using Home Manager
If you're using Home Manager:
Docker Installation
Running Ollama in Docker provides a consistent environment across different systems.
Basic Docker Setup
Pull and run the official Ollama Docker image:
Docker Compose Setup
Create a docker-compose.yml
file:
Launch with Docker Compose:
Docker with GPU Support (NVIDIA)
To enable NVIDIA GPU support:
Post-Installation Setup
After installing Ollama, perform these steps to complete the setup:
Start the Ollama service:
Test the installation by running a model:
Verify API access:
Troubleshooting
Common Issues
Permission Denied Errors:
Network Connectivity Issues:
GPU Not Detected:
Next Steps
Now that you have Ollama installed, proceed to:
Last updated