Hosting & Deployment Self-Hosted

OpenClaw on TrueNAS: Run AI Agents From Your Home NAS Server

Your TrueNAS box is already running 24/7 — add OpenClaw and get always-on AI agents without standing up separate server hardware. Here's the exact setup that works alongside Plex, Nextcloud, and your media stack.

TC
T. Chen
AI Systems Engineer
Mar 15, 2025 13 min read 7.1k views
Updated Mar 15, 2025
Key Takeaways
  • TrueNAS SCALE (not CORE) is required — it runs Linux and supports Docker containers natively
  • Create a dedicated ZFS dataset for OpenClaw data at /mnt/tank/appdata/openclaw before deploying
  • Map that dataset as the /data volume mount — never store app data inside your media pool
  • OpenClaw uses ~200–400 MB RAM at idle — it won't compete with your media stack under normal load
  • Enable Auto-start in the Apps UI and set up recursive dataset snapshots for zero-effort backups

Most home lab setups already have a NAS running 24 hours a day. That machine is wasting its idle capacity every time your agents aren't on it. TrueNAS SCALE turns your storage box into a full application platform — and OpenClaw slots right in alongside whatever you're already running.

Why TrueNAS SCALE, Not CORE

TrueNAS CORE runs FreeBSD. TrueNAS SCALE runs Linux. That distinction is the whole ballgame for OpenClaw deployment. The official OpenClaw Docker image targets Linux, and Docker on FreeBSD requires compatibility shims that create more problems than they solve.

SCALE ships with full Docker support through its Apps system, backed by Kubernetes under the hood. You get a GUI-based container management interface, persistent storage via ZFS datasets, and auto-start on boot — all without touching a command line if you prefer not to.

⚠️
TrueNAS CORE Won't Work Here

If you're running TrueNAS CORE (the FreeBSD version), the steps in this guide don't apply. You'd need to either migrate to SCALE or set up a Linux VM inside a jail — significantly more work. SCALE is the recommended path for anyone starting fresh.

Hardware requirements are modest. OpenClaw's gateway process and a couple of agents run comfortably on any NAS with 8 GB of RAM total — leaving 4 GB for the OS and your other apps. A quad-core processor and a dataset on an SSD (or SSD cache) gives you snappy response times. Spinning disks work but you'll notice slower startup.

Creating the ZFS Dataset First

Before you touch the Apps interface, create a dedicated dataset for OpenClaw. This is the step most people skip, and it's the one that bites them when they try to restore from backup.

In the TrueNAS web UI, go to Storage → Datasets → Add Dataset. Create it at a path like /mnt/tank/appdata/openclaw. Set the dataset type to Generic, enable compression (lz4 is fine), and leave encryption off unless you've already set up encrypted pools.

Why a dedicated dataset? Three reasons. First, snapshots are per-dataset — you can snapshot just the OpenClaw data without snapshotting your entire media collection. Second, you can set dataset-level quotas to prevent a runaway log file from filling your pool. Third, when you eventually upgrade or migrate, you replicate one dataset, not your whole tank.

💡
Use a Separate Pool for App Data

Ideally, your NAS has an SSD pool or at least an SSD special vdev for metadata. Put appdata on SSDs and media on spinning drives. OpenClaw's database writes benefit significantly from faster storage, and you won't be competing with large sequential reads from Plex streams.

Deploying OpenClaw via Docker on TrueNAS SCALE

TrueNAS SCALE has two paths: the Apps UI (which uses Helm charts under the hood) and direct Docker via the shell. For OpenClaw, the shell approach gives you more control and matches the standard deployment docs exactly.

SSH into your TrueNAS box and pull the image:

docker pull openclaw/openclaw:latest

Then launch the container with proper volume mounts and port configuration:

docker run -d \
  --name openclaw \
  --restart unless-stopped \
  -p 8080:8080 \
  -v /mnt/tank/appdata/openclaw:/data \
  -e GATEWAY_TOKEN=your-secure-token-here \
  -e NODE_ENV=production \
  openclaw/openclaw:latest

The --restart unless-stopped flag is critical. It tells Docker to restart the container on failure and after reboots, but not if you manually stop it — which is exactly the behavior you want for a long-running service.

We'll get to the network exposure setup in a moment — but first, understand why the port binding matters here.

Port 8080 binds to all interfaces by default. On a home network that's typically fine, but if your NAS is directly exposed to the internet, bind to a specific local interface instead: -p 192.168.1.100:8080:8080 where 192.168.1.100 is your NAS's LAN IP.

Storage Configuration and Volume Mounts

The single most important volume mount is /data inside the container. This is where OpenClaw stores everything: gateway config, agent definitions, shared memory, conversation history, and logs.

If you lose this volume, you lose your entire OpenClaw setup. The container image is disposable — it gets pulled fresh on updates. The /data directory is irreplaceable without a backup.

Container Path Host Path Contents
/data/mnt/tank/appdata/openclawAll config, state, logs, history
/data/configauto-created under /datagateway.yaml, agent configs
/data/logsauto-created under /dataGateway and agent log files
/data/dbauto-created under /dataSQLite database (conversation history)

After the first run, edit /mnt/tank/appdata/openclaw/config/gateway.yaml directly from your NAS shell or via TrueNAS's built-in file manager. Changes take effect after a container restart: docker restart openclaw.

Auto-Start and Snapshot-Based Backups

The --restart unless-stopped flag handles auto-start for Docker-managed containers. TrueNAS starts Docker after the ZFS pools mount, so your dataset will always be available when the container comes up.

For backups, set up a recurring snapshot task in TrueNAS UI under Data Protection → Periodic Snapshot Tasks. Point it at your appdata/openclaw dataset. A daily snapshot retained for 30 days costs almost nothing on space (ZFS snapshots are block-level, so they only store changes) and lets you roll back to any previous day's state.

Here's what a clean backup workflow looks like. Stop the container before snapshotting to avoid snapshot inconsistency:

# Run before snapshot (add to a cron job or TrueNAS scheduled task)
docker stop openclaw
zfs snapshot tank/appdata/openclaw@$(date +%Y-%m-%d)
docker start openclaw

Sound familiar? This is the same pattern VMware admins use for quiesced VM snapshots. Consistent state before the snapshot, restart after.

For offsite backup, add a Replication Task in TrueNAS that sends the openclaw dataset snapshots to a remote TrueNAS or rsync target. Your agent configurations and conversation history are now backed up automatically without any separate backup software.

Common Mistakes on TrueNAS Deployments

  • Storing data inside the container — if you don't mount /data to a host path, all your config and history lives inside the container layer. It vanishes when you pull a new image. Always mount /data.
  • Using TrueNAS CORE instead of SCALE — CORE's jails cannot run the Linux OpenClaw image. No amount of compatibility layers fixes this cleanly. Migrate to SCALE.
  • Binding port 8080 to all interfaces on an exposed NAS — if your NAS has a public IP, binding to 0.0.0.0:8080 exposes OpenClaw directly. Bind to your LAN interface and use Cloudflare Tunnel or a VPN for remote access.
  • Skipping the dedicated dataset — putting OpenClaw data inside a media dataset makes selective snapshots and quotas impossible. Always use a separate dataset.
  • Not setting a log rotation policy — OpenClaw logs accumulate. Without rotation, a busy deployment can fill a dataset over weeks. Configure logrotate or set a dataset quota as a safety net.

Frequently Asked Questions

Can TrueNAS SCALE run OpenClaw without a separate server?

Yes. TrueNAS SCALE runs Linux and supports Docker containers via its Apps system. OpenClaw runs as a container app alongside Plex, Nextcloud, or any other app on the same hardware, provided you have at least 4 GB of RAM available for it.

Does TrueNAS CORE support OpenClaw?

TrueNAS CORE uses FreeBSD jails, not Linux containers, so the standard OpenClaw Docker image won't run directly. TrueNAS SCALE is the correct platform — it uses Linux and supports Docker and Kubernetes natively through its Apps interface.

What storage path should I use for OpenClaw data on TrueNAS?

Create a dedicated dataset at /mnt/tank/appdata/openclaw and map it as the container's /data volume. A dataset gives you snapshot capability, compression, and independent management — don't store app data inside the media dataset.

Will OpenClaw slow down my NAS or affect file transfer speeds?

Under normal load, OpenClaw uses minimal CPU and around 200–400 MB of RAM. LLM API calls are network-bound, not compute-bound, so your NAS file transfer performance is unaffected during typical agent operation.

How do I make OpenClaw start automatically after a TrueNAS reboot?

Add --restart=unless-stopped to your docker run command. TrueNAS starts Docker after storage mounts, so the OpenClaw dataset will be available on boot before the container tries to start.

Can I use a TrueNAS dataset snapshot to back up OpenClaw config?

Yes, and this is the recommended backup method. Stop the OpenClaw container, snapshot the openclaw dataset, then restart the container. The snapshot captures all config files, agent definitions, and conversation history.

TC
T. Chen
AI Systems Engineer

T. Chen designs and deploys AI agent infrastructure for production and home lab environments. Has run OpenClaw on TrueNAS SCALE alongside full Plex and Nextcloud stacks, testing failure recovery, snapshot restoration, and resource contention across multiple NAS hardware configurations.

Self-Hosted AI Agent Guides

Weekly deployment tips for home lab and self-hosted OpenClaw setups, free.