<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f" -->

---
title: How to run local LLMs in a container with Ollama and Podman
description: This tutorial walks through running Ollama inside a Podman container to host LLMs locally. It covers installing Podman, creating a persistent volume named...
canonical: https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to run local LLMs in a container with Ollama and Podman | daily.dev
og:description: This tutorial walks through running Ollama inside a Podman container to host LLMs locally. It covers installing Podman, creating a persistent volume named...
og:url: https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f
og:image: https://api.daily.dev/og/posts/Mw9PmWb6F.png
og:image:alt: How to run local LLMs in a container with Ollama and Podman
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to run local LLMs in a container with Ollama and Podman

**[All Things Open](https://daily.dev/sources/allthingsopen)** · 4 min read · 0 upvotes · 0 comments

## Summary

This tutorial walks through running Ollama inside a Podman container to host LLMs locally. It covers installing Podman, creating a persistent volume named 'ollama_storage' to store model weights, and launching the Ollama container with `podman run`, mapping port 11434. A separate command adds `--device nvidia.com/gpu=all` for NVIDIA GPU support. The author then pulls and runs Llama 3 with `podman exec -it ollama ollama run llama3` and tests it with a prompt about Linux Mint. When the default port didn't work on the author's machine, they switched to port 4134 and it ran without issues.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://allthingsopen.org/articles/run-local-llms-container-ollama-podman>

## Questions this post answers

### How do I run Ollama inside a Podman container on Linux?

Create a persistent volume with `podman volume create ollama_storage`, then run `podman run -d --name ollama -v ollama_storage:/root/.ollama -p 11434:11434 docker.io/ollama/ollama:latest`. The volume stores model weights so they persist when the container stops. Pull and run a model with `podman exec -it ollama ollama run llama3`.

_daily.dev surfaces setup guides like this for developers containerizing their local LLM workflow._

### How do I enable NVIDIA GPU support for Ollama running in Podman?

Add `--security-opt=label=disable` and `--device nvidia.com/gpu=all` to the `podman run` command alongside the volume mount and port mapping. The full command becomes `podman run -d --name ollama --security-opt=label=disable --device nvidia.com/gpu=all -v ollama_storage:/root/.ollama -p 11434:11434 docker.io/ollama/ollama:latest`, replacing the CPU-only version.

_Developers choosing between CPU and GPU setups for local LLMs can compare approaches on daily.dev._

## Similar posts on daily.dev

- [I ditched Ollama for Docker, and my local LLM setup finally stopped being a hassle](https://daily.dev/posts/i-ditched-ollama-for-docker-and-my-local-llm-setup-finally-stopped-being-a-hassle-8b7ururzn) · XDA Developers · 1 upvotes · 0 comments
- [Everything you need to know about running LLMs locally](https://daily.dev/posts/everything-you-need-to-know-about-running-llms-locally-7u3awxooq) · All Things Open · 0 upvotes · 0 comments
- [How to Run and Customize LLMs Locally with Ollama](https://daily.dev/posts/how-to-run-and-customize-llms-locally-with-ollama-cixkmhbqh) · freeCodeCamp · 2 upvotes · 0 comments
- [How to Run LLMs Locally: A Practical Guide for Developers](https://daily.dev/posts/how-to-run-llms-locally-a-practical-guide-for-developers-tijurupob) · BigData Boutique blog · 2 upvotes · 0 comments

---

Tags: [#containers](https://daily.dev/tags/containers), [#local-ai](https://daily.dev/tags/local-ai), [#ollama](https://daily.dev/tags/ollama)

[View this post on daily.dev](https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to run local LLMs in a container with Ollama and Podman","url":"https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f"},"datePublished":"2026-10-28T06:56:48.097Z","dateModified":"2026-10-28T06:57:20.335Z","description":"This tutorial walks through running Ollama inside a Podman container to host LLMs locally. It covers installing Podman, creating a persistent volume named...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/881495460a0e7b7f09008947cef9a8e2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/881495460a0e7b7f09008947cef9a8e2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"All Things Open","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"All Things Open","logo":"https://media.daily.dev/image/upload/s--dgFP6zAp--/f_auto/v1720885901/logos/allthingsopen","url":"https://daily.dev/sources/allthingsopen"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"containers,local-ai,ollama","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"All Things Open","item":"https://daily.dev/sources/allthingsopen"},{"@type":"ListItem","position":3,"name":"How to run local LLMs in a container with Ollama and Podman"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-run-local-llms-in-a-container-with-ollama-and-podman-mw9pmwb6f#faq","mainEntity":[{"@type":"Question","name":"How do I run Ollama inside a Podman container on Linux?","acceptedAnswer":{"@type":"Answer","text":"Create a persistent volume with `podman volume create ollama_storage`, then run `podman run -d --name ollama -v ollama_storage:/root/.ollama -p 11434:11434 docker.io/ollama/ollama:latest`. The volume stores model weights so they persist when the container stops. Pull and run a model with `podman exec -it ollama ollama run llama3`. daily.dev surfaces setup guides like this for developers containerizing their local LLM workflow."}},{"@type":"Question","name":"How do I enable NVIDIA GPU support for Ollama running in Podman?","acceptedAnswer":{"@type":"Answer","text":"Add `--security-opt=label=disable` and `--device nvidia.com/gpu=all` to the `podman run` command alongside the volume mount and port mapping. The full command becomes `podman run -d --name ollama --security-opt=label=disable --device nvidia.com/gpu=all -v ollama_storage:/root/.ollama -p 11434:11434 docker.io/ollama/ollama:latest`, replacing the CPU-only version. Developers choosing between CPU and GPU setups for local LLMs can compare approaches on daily.dev."}}]}
```

