AI on Synology NAS: Docker + Ollama Self-Hosted Setup (2026)
Want to go deeper than this article?
Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.
Ollama’s running. Here’s what to build with it. Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Published on April 28, 2026 - Updated November 2, 2026 - 19 min read
Quick Start: Ollama in Container Manager in 5 Minutes
Synology DSM 7.2 ships with Container Manager (the rebranded Docker package). On a Plus-series NAS with 8GB+ RAM, you can run a 3B-parameter model on CPU at usable speeds and serve it over your LAN. Steps:
- Install Container Manager from Package Center
- Create a folder
/volume1/docker/ollamavia File Station - SSH in and run a single docker run command (below)
- Pull a model:
docker exec ollama ollama pull phi3:mini - Test from any LAN device:
curl http://nas.local:11434/api/generate
That gets you a private, always-on AI endpoint that any device on your network can use without sending a byte to the cloud.
What this guide covers:
- Compatible Synology models and CPU requirements (x86_64 only)
- DSM 7.2 Container Manager configuration with persistent volumes
- Memory sizing - which models fit on 4GB, 8GB, 16GB, and 32GB upgrades
- Open WebUI deployment on the same NAS
- DSM reverse proxy with HTTPS and Let's Encrypt
- Speed ceilings for DS220+, DS923+, DS1522+, and DS1821+, worked out from the CPU makers' memory specs
A Synology Plus-series NAS is one of the most underrated pieces of hardware for hosting a small private AI. It is already running 24/7, already has gigabit networking, already has redundant storage, and the better models (DS923+, DS1522+, DS1821+) ship with x86_64 CPUs and DDR4 ECC slots that scale to 32GB. You pay only for the extra power the CPU draws while it generates, and every machine on your LAN gets a private chat endpoint at http://nas.local:11434.
For the broader self-hosting decision tree, pair this with the air-gapped AI deployment guide and Open WebUI setup guide. For hardware sizing, the AI hardware requirements guide compares NAS, mini-PC, and full desktop builds.
Reading articles is good. Building is better.
Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.
Table of Contents
- Why Run AI on Your NAS
- Compatibility - Which Synology Models Work
- RAM Sizing for AI Workloads
- Container Manager Setup
- Deploying Ollama
- Adding Open WebUI
- DSM Reverse Proxy and HTTPS
- Benchmarks Across Models
- Storage and Snapshot Strategy
- Pitfalls and Fixes
Why Run AI on Your NAS
Three reasons people pick a NAS over a mini-PC or repurposed desktop:
Already running. A Synology Plus-series NAS is on 24/7 anyway. AMD rates the DS923+'s Ryzen R1600 at a configurable 12-25W (R1000 product brief), so even pinned at 25W around the clock the extra draw is 18 kWh a month, about $3.27 at the US average of 18.16 cents per kWh (EIA, August 2026). Versus standing up a separate mini-PC, you save its hardware cost and its idle draw.
Storage adjacency. If you are running Photos, Drive, or Note Station on the same NAS, your AI can read that data from local disk, not over a network share. RAG pipelines that index your notes for semantic search avoid copying everything across the network when the model and the data live on the same machine.
True private network endpoint. The Synology NAS sits behind your router, not exposed to the internet. Combined with DSM's Let's Encrypt integration and reverse proxy, you get HTTPS internally without anything ever touching a public cloud.
The catch: NAS CPUs are slow by AI-rig standards. The Ryzen R1600 in the DS923+ / DS1522+ has 2 cores and 4 threads, and its dual-channel DDR4-2400 memory peaks at 38.4 GB/s, a fraction of a desktop GPU. You will run quantized 3B-8B models, not 70B behemoths. For most home and small-team use cases, that is enough.
Compatibility - Which Synology Models Work
DSM Container Manager runs Docker images, and Ollama publishes amd64 and arm64 images. In practice, Synology's ARM-based units (Realtek RTD1296, RTD1619B) are not worth trying: their RAM is small and not expandable, their Cortex-A cores are slow, and Container Manager is not offered on every model (check Package Center for yours). Stick to Plus-series units with Intel or AMD x86 CPUs.
| Model | CPU | Default RAM | Max RAM | AI-Capable? |
|---|---|---|---|---|
| DS220+ | Intel J4025 | 2GB | 6GB | Yes (small models only) |
| DS224+ | Intel J4125 | 2GB | 6GB | Yes (small models only) |
| DS423+ | Intel J4125 | 2GB | 6GB | Yes |
| DS920+ | Intel J4125 | 4GB | 8GB | Yes |
| DS923+ | AMD R1600 | 4GB | 32GB | Yes (best mainstream) |
| DS1522+ | AMD R1600 | 8GB | 32GB | Yes (excellent) |
| DS1621+ | AMD V1500B | 4GB | 32GB | Yes |
| DS1821+ | AMD V1500B | 4GB | 32GB | Yes (top tier) |
| DS3622xs+ | Intel D-1531 | 16GB | 48GB | Yes (enterprise) |
| Any J-series ARM | Realtek/Marvell | varies | varies | No |
The DS923+ with a 16GB RAM upgrade is the sweet spot. You get a Ryzen with AVX2/FMA support, 16GB of memory, and four drive bays. It ships with one module in one of its two slots; adding a matching second module also turns on the second memory channel, which doubles the bandwidth that bounds generation speed.
Run this on your own machine and stop paying every month
Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.
RAM Sizing for AI Workloads
DSM itself uses around 1.5GB for the OS, indexing services, and built-in apps. Plan your model around what is left.
| Total NAS RAM | Reserved for DSM | Available for AI | Realistic Models |
|---|---|---|---|
| 4 GB | 1.5 GB | 2.5 GB | Phi-3 Mini Q4 (tight), Gemma 2B Q4 |
| 8 GB | 1.5 GB | 6.5 GB | Phi-3 Mini, Llama 3.2 3B, Mistral 7B Q4 (tight) |
| 16 GB | 2.0 GB | 14 GB | Mistral 7B, Llama 3.1 8B, Gemma 2 9B |
| 32 GB | 2.5 GB | 29 GB | Qwen 2.5 14B, Phi-4 14B, Mixtral 8x7B Q3 |
Synology officially supports specific RAM SKUs only and may complain if you install third-party RAM. The hardware accepts standard DDR4 SODIMMs (DS923+, DS1522+) or DDR4 ECC UDIMMs (DS1821+, DS3622xs+). DSM displays a warning for unsupported RAM but boots and runs normally; third-party modules of the right type are widely used.
Disclosure: unofficial RAM voids Synology hardware warranty support specifically for memory issues. If you need warranty coverage on RAM, buy the Synology-branded modules.
Container Manager Setup
DSM 7.2 ships Container Manager. If yours says "Docker" instead, upgrade DSM first.
- Open Package Center, search Container Manager, install.
- Open Container Manager > Settings > General. Enable "Auto-start container after reboot."
- Open File Station and create
/volume1/docker/ollamaand/volume1/docker/open-webui. - Note your NAS IP from Control Panel > Network. We will use
192.0.2.10as a placeholder below - replace with yours.
Enable SSH (Control Panel > Terminal & SNMP > Enable SSH). Connect from your workstation:
ssh admin@192.0.2.10 -p 22
You will land in your home directory. Sudo to root for docker commands:
sudo -i
Deploying Ollama
Run Ollama as a long-lived container with a persistent volume so models survive restarts:
docker run -d \
--name ollama \
--restart always \
-p 11434:11434 \
-v /volume1/docker/ollama:/root/.ollama \
-e OLLAMA_HOST=0.0.0.0 \
-e OLLAMA_KEEP_ALIVE=30m \
-e OLLAMA_NUM_PARALLEL=2 \
--memory="12g" \
--memory-swap="12g" \
ollama/ollama:latest
Notes on the flags:
OLLAMA_HOST=0.0.0.0makes the API listen on all interfaces so other LAN devices can reach itOLLAMA_KEEP_ALIVE=30mkeeps loaded models in RAM for half an hour after the last request, eliminating cold-start latency for back-to-back chats--memorycap prevents Ollama from spilling into DSM territory and triggering memory pressure on your NAS services- The
-vmount means models are stored on the NAS volume, not inside the container - reinstalling the container does not re-download
Pull a model:
docker exec -it ollama ollama pull phi3:mini
docker exec -it ollama ollama pull llama3.2:3b
Test it from your workstation, not the NAS:
curl http://192.0.2.10:11434/api/generate -d '{
"model": "phi3:mini",
"prompt": "Write a haiku about a NAS",
"stream": false
}'
You should see a JSON response with token output and timing information. Token generation reported under eval_count / eval_duration (in nanoseconds) gives you tokens/second.
Adding Open WebUI
Ollama's API is fine for tools like Continue.dev or Obsidian plugins. For a chat interface accessible from any device on your LAN, deploy Open WebUI alongside it:
docker run -d \
--name open-webui \
--restart always \
-p 3000:8080 \
-v /volume1/docker/open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://192.0.2.10:11434 \
-e WEBUI_AUTH=true \
--add-host=host.docker.internal:host-gateway \
ghcr.io/open-webui/open-webui:main
Visit http://192.0.2.10:3000 from any browser on your LAN. Create an admin account on first visit. Open WebUI auto-discovers the Ollama endpoint and lists your installed models.
For a deeper Open WebUI configuration walkthrough including RAG over your documents, image analysis, and multi-user permissions, see the dedicated guide.
DSM Reverse Proxy and HTTPS
Open WebUI on plain HTTP is fine for a private LAN, but if you want to use Synology's Let's Encrypt cert and a clean URL like https://ai.yourdomain.com, use the built-in reverse proxy.
- DSM Control Panel > Login Portal > Advanced > Reverse Proxy
- Click Create
- Source:
- Protocol: HTTPS
- Hostname: ai.yourdomain.com (or ai.local for LAN-only)
- Port: 443
- Destination:
- Protocol: HTTP
- Hostname: localhost
- Port: 3000
- Custom Header tab > Create > WebSocket. This is required for Open WebUI's streaming responses.
- Click OK.
Enable HSTS in DSM Network > DSM Settings if you control DNS. Generate a Let's Encrypt cert via Control Panel > Security > Certificate > Add > Get a certificate from Let's Encrypt.
For LAN-only deployments where you do not have a domain, edit your router's DNS to point ai.local at the NAS IP, then use a self-signed certificate.
Benchmarks Across Models
We do not own a Synology NAS and have not run these models on one, so this section gives speed ceilings, not measurements. During generation, every token reads the whole model from memory once, so memory bandwidth divided by model file size is the most tokens per second the hardware can deliver. Real CPU inference on 2-4 core embedded chips lands below that, often well below, because the cores run out of compute first.
The bandwidth. All four CPUs in this table support dual-channel DDR4 at up to 2400 MT/s: the Intel Celeron J4025 and J4125 per Intel's spec pages, and the AMD Ryzen Embedded R1600 and V1500B per AMD's R1000 and V1000 product briefs. That is 2400 MT/s x 8 bytes x 2 channels = 38.4 GB/s with both slots filled. With a single module you get one channel, 19.2 GB/s, and half of every ceiling below.
The model sizes are the download sizes Ollama's library lists for each default 4-bit tag.
| NAS | RAM | Model | Tok/s | First Token | Verdict |
|---|---|---|---|---|---|
| DS220+ | 6 GB | Phi-3 Mini Q4 (phi3:mini, 2.18 GB) | ~17.6 tok/s ceiling | Not measured | Fits; 2-core J4025 will sit well under the ceiling |
| DS220+ | 6 GB | Llama 3.2 3B Q4 (llama3.2:3b, 2.02 GB) | ~19.0 tok/s ceiling | Not measured | Fits; keep prompts short |
| DS923+ | 16 GB | Phi-3 Mini Q4 (2.18 GB) | ~17.6 tok/s ceiling | Not measured | Smallest useful model, fastest option |
| DS923+ | 16 GB | Llama 3.2 3B Q4 (2.02 GB) | ~19.0 tok/s ceiling | Not measured | Daily-driver size for this CPU |
| DS923+ | 16 GB | Mistral 7B Q4 (mistral:7b, 4.37 GB) | ~8.8 tok/s ceiling | Not measured | Better answers, slower |
| DS923+ | 32 GB | Llama 3.1 8B Q4 (llama3.1:8b, 4.92 GB) | ~7.8 tok/s ceiling | Not measured | Best quality that is still practical |
| DS1522+ | 32 GB | Mistral 7B Q4 (4.37 GB) | ~8.8 tok/s ceiling | Not measured | Same CPU and memory as DS923+ |
| DS1821+ | 32 GB | Qwen 2.5 14B Q4 (qwen2.5:14b, 8.99 GB) | ~4.3 tok/s ceiling | Not measured | Fits in 32 GB; slow |
| DS1821+ | 32 GB | Mixtral 8x7B Q3 (22.55 GB) | No ceiling given (mixture-of-experts) | Not measured | At the edge of what fits |
A few takeaways:
- The DS923+ with 16GB RAM and a 3B-4B model is the value sweet spot. Those models have the highest ceilings on the page, and they leave room for DSM and other packages.
- Going from 16GB to 32GB does not raise the ceiling for small models - they already fit, and the ceiling depends on bandwidth, not capacity. It opens the door to 8B and 14B models, whose ceilings are lower because the files are bigger.
- The DS1821+ has more cores (4/8 on the V1500B) but the same 38.4 GB/s. Extra cores help the CPU get closer to the ceiling and serve concurrent requests; they do not raise the ceiling.
- Mixtral is a mixture-of-experts model, so a file-size ceiling does not describe it; we give no tok/s number for it.
To see your own number, run a prompt and read the timing fields Ollama returns: eval_count divided by eval_duration (in nanoseconds, so multiply by 1e9) is tokens per second. For a sense of scale, on our own Apple M3 Pro with 150 GB/s of memory bandwidth, mistral:7b ran at a median 29.0 tok/s (Ollama 0.40.13, 2 November 2026). A NAS has about a quarter of that bandwidth.
Storage and Snapshot Strategy
Models are large but compressible-once-on-disk. A few practical rules:
Put models on SSD volume if possible. Even on Plus-series NAS units with rotational drives, you can add NVMe and create a separate volume for Docker and AI models (check Synology's compatibility list; on some models NVMe storage pools need Synology-branded drives). A 4-5GB model loads noticeably faster from SSD than from a spinning array. After load, inference speed is identical because everything lives in RAM.
Disable Btrfs snapshots on the model directory. Models do not change after download. Snapshotting them wastes space and adds I/O for no benefit. In DSM > Snapshot Replication, exclude /volume1/docker/ollama/models.
Backup the Open WebUI volume, not the Ollama volume. Models are re-downloadable; chat history and RAG indexes are not. Use Hyper Backup to back up only /volume1/docker/open-webui.
Plan disk space for model collection. A typical home AI setup ends up with Phi-3 (2GB), Llama 3.2 3B (2GB), Mistral 7B (4GB), an embedding model (300MB), and maybe Stable Diffusion (4GB). Budget 15-20 GB minimum.
Pitfalls and Fixes
Container Manager says "image cannot be pulled." DNS issue. DSM > Control Panel > Network > General > set DNS to 1.1.1.1 and 8.8.8.8.
docker: command not found. You are not running as root or sudo. Run sudo -i first. Synology DSM does not put docker on the default user PATH.
Ollama crashes after pulling a 7B model. Out of memory. Check free -h. If "available" drops below 1GB during model load, lower the Ollama --memory cap or pick a smaller model.
LAN devices cannot reach port 11434. Synology firewall. Control Panel > Security > Firewall > Edit Rules > Allow > Custom Ports > TCP > 11434. Apply to your LAN profile only, never to the WAN profile.
Token generation is much slower than expected. Check whether DSM Photos or Surveillance Station is actively re-indexing in the background. Both consume a lot of CPU and steal cycles from inference. Pause indexing during heavy AI use.
Open WebUI shows "no models found". OLLAMA_BASE_URL pointing to localhost from inside the Open WebUI container resolves to the container itself, not the Ollama container. Use the NAS IP or http://host.docker.internal:11434 with --add-host=host.docker.internal:host-gateway.
HTTPS reverse proxy strips streaming responses. You forgot the WebSocket custom header. Edit the reverse proxy rule, add Custom Header > WebSocket.
RAM upgrade not detected. Synology firmware whitelists. Do a full power cycle (not just reboot - shutdown, unplug, wait 30 seconds, plug back in). DSM redetects memory at cold boot.
Frequently Asked Questions
Q: Will running AI shorten the lifespan of my NAS drives?
A: No. AI inference reads model files into RAM once and runs entirely in memory afterward. Your drives sit idle during the actual inference. The only sustained drive activity is during model downloads, which is no different from a Plex library scan.
Q: Can I use a Synology DiskStation as a GPU passthrough box?
A: No. None of the consumer Synology models support GPU passthrough or PCIe expansion. For GPU-accelerated inference you need a custom build or mini-PC. See the AI hardware requirements guide for alternatives.
Q: How does this compare to running Ollama on a Raspberry Pi 5?
A: We have measured neither. On paper the DS923+ has more memory (up to 32GB vs 8GB or 16GB) and 38.4 GB/s of memory bandwidth with both slots filled, so it can hold larger models. The Pi wins on power draw and price.
Q: Can multiple users hit the same Ollama endpoint at once?
A: Yes, with caveats. Ollama queues requests by default. Set OLLAMA_NUM_PARALLEL=2 or higher to allow concurrent inference, but expect throughput per user to drop proportionally - the NAS CPU is the bottleneck.
Q: Will this work over Synology Drive or SMB?
A: The Ollama API speaks HTTP, not SMB. You access it from clients via HTTP (curl, Open WebUI, Continue.dev, etc.). Drive and SMB are for file sharing, which is unrelated.
Q: Is the data really private if I use Synology QuickConnect?
A: QuickConnect routes your traffic through Synology relay servers when direct connections fail. For genuinely private AI, disable QuickConnect on the AI subdomain or use the LAN-only reverse proxy setup. The Ollama models themselves never call home.
Q: Can I run Stable Diffusion on a Synology NAS?
A: Technically yes for small Stable Diffusion models on CPU, but image generation on a 2-core embedded CPU is very slow and we have not timed it. SDXL and newer models need a real GPU. The NAS is best for text models.
Q: What about Plex Hardware Transcoding sharing the same Intel iGPU?
A: Plex transcoding uses Intel Quick Sync, which is a fixed-function video block, not the general-purpose GPU. It does not interfere with CPU-based AI inference, even when both run simultaneously.
Conclusion
A Synology Plus-series NAS already lives in your home, already runs 24/7, and already has a stable network presence. Adding Ollama via Container Manager turns it into a private LAN AI endpoint for the cost of a RAM upgrade and a short setup. You get a capable small model, fully offline, with HTTPS, with redundant storage, and with whatever else you already host on the same hardware. Expect single-digit to mid-teens tokens per second at best: the ceilings above are the upper limit.
The right pick for most home users is a DS923+ with 16GB or 32GB of third-party RAM running Phi-3 Mini for fast responses and Mistral 7B for harder questions. Layer Open WebUI on top for a clean interface, point a DSM reverse proxy at it for HTTPS, and you have a self-hosted Anthropic-or-OpenAI replacement for routine work that never leaves your network.
For the next step, check out which Ollama models fit your memory budget and the Open WebUI configuration deep dive.
Want more self-hosted and home-lab AI guides? Join the LocalAIMaster newsletter for weekly hardware and deployment walkthroughs.
Ollama’s running. Here’s what to build with it.
Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.
Stop piecing Ollama together from blog posts
Ollama Mastery is 15 chapters end to end — install, model choice, Modelfiles, GPU offload, the API, and the 20 errors that actually happen. Plus 24 more courses.
Liked this? 25 full AI courses are waiting.
From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.
Build Real AI on Your Machine
RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.
Want the structured version?
Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.
Keep going
- PILLARblog/best-ollama-models
- Free Ollama Models (Nov 2026): 10 Best, No API Key
- AI on Steam Deck: Run Local LLMs with Ollama on SteamOS
- Run Hermes Agent Locally with Ollama (2026 Setup Guide)
- Ollama Not Working? Match the Error to the Real Fix
- Ollama 500 Internal Server Error: Find the Cause
- Best Ollama Models for AI Agents 2026: Ranked by Tool Use
- AMD ROCm Local LLM Setup: Ollama, llama.cpp and vLLM
- Ollama Timed Out Waiting for Server to Start: Fixes
- Ollama Modelfile Guide: Syntax, Parameters, Real Examples
Comments (0)
No comments yet. Be the first to share your thoughts!
