Distributing Modelfiles for every update can be cumbersome. By uploading custom models to the Ollama Model Registry, your team can pull the latest version directly—just like using Docker Hub for container images. In this tutorial, we’ll cover how to:Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
- Set up your Ollama account and trust relationship
- Tag and copy your local model
- Push the tagged model to the registry
- Pull and verify your custom model
1. Set Up Your Ollama Account and Trust Relationship
- Create an Ollama account at https://ollama.com/ and sign in.
- Go to Settings → Ollama Key.
- Locate your public SSH key on your local machine:
| OS | Public Key Path |
|---|---|
| macOS | ~/.ollama/id_ed25519.pub |
| Linux | ~/.ollama/id_ed25519.pub |
| Windows | C:\Users\<username>\.ollama\id_ed25519.pub |
- Display and copy your public key:
- Paste the key into your Ollama Ollama Key field and save.
Once added, Ollama will recognize and authenticate your machine for publishing.
2. Tag and Copy Your Local Model
First, list your existing local models:your_username with your actual Ollama account name. Verify the new entry:
3. Push Your Model to the Registry
Push the tagged model to make it available on Ollama:
4. Pull and Verify the Custom Model
Anyone with access can now pull and run your personalized model:Quick Reference: Ollama CLI Commands
| Command | Description | Example |
|---|---|---|
ollama ls | List all local models | ollama ls |
ollama copy <src> <dest> | Tag and copy a model for the registry | ollama copy harris your_username/harris:latest |
ollama push <repo>:<tag> | Push tagged model to the registry | ollama push your_username/harris:latest |
ollama pull <repo>:<tag> | Pull a model from the registry | ollama pull your_username/harris:latest |