How to Build an AI-Managed Media Center with OpenClaw and Kodi on Raspberry Pi
Kodi turns a Raspberry Pi into a capable 4K media center, but managing your library still means clicking through menus or memorizing remote shortcuts. This guide covers installing Kodi and the OpenClaw gateway on the same Raspberry Pi 5, connecting the agent to Kodi's JSON-RPC API, and using natural language commands over Telegram or Discord to search your library, queue playback, and pull subtitles.
What an AI-Managed Media Center Actually Does
A standard Kodi setup on a Raspberry Pi gives you a living room media player that handles local files, network shares, and streaming add-ons. The interface works fine with a remote, but it falls apart when you want to do anything from another room or automate repetitive library tasks. Renaming files, fetching subtitles for a foreign film, or finding that documentary you half-remember from last month all require you to sit in front of the TV and navigate menus.
OpenClaw changes this by adding a conversational layer on top of Kodi. The OpenClaw gateway runs on the same Pi as Kodi, connects to a cloud LLM (Claude, GPT-4, Gemini, or another supported provider), and exposes its capabilities through messaging platforms like Telegram, Discord, WhatsApp, or Signal. You send a message like "play the last episode of Silo" or "what unwatched movies do I have?" and the agent translates that into Kodi API calls.
The Pi is just the gateway. It doesn't run the language model locally. Instead it forwards your request to whichever cloud provider you've configured, receives the structured response, and executes the corresponding Kodi command. This keeps hardware requirements reasonable: a Raspberry Pi 5 with 8GB of RAM handles both Kodi playback and the OpenClaw gateway without breaking a sweat, and the total power draw stays under 10W at idle.
There is no pre-built "Kodi skill" in the OpenClaw skills registry as of May 2026. What makes this work is Kodi's JSON-RPC API, a well-documented interface that exposes every Kodi operation (playback control, library queries, subtitle management, playlist editing) over HTTP. OpenClaw's skill and plugin system lets you wrap that API so the agent can call it through natural language. The rest of this guide walks through the full setup.
How to Choose the Right Pi and Operating System
The Raspberry Pi 5 with 8GB of RAM is the clear choice for this build. Its quad-core Cortex-A76 CPU handles 4K HEVC hardware decoding, and the VideoCore VII GPU pushes 4K60 output over HDMI 2.0 without breaking a sweat. The 8GB variant matters here because you are running two services simultaneously: Kodi for media playback and the OpenClaw Node.js gateway for agent logic.
A Pi 4 with 4GB works for Kodi alone, but adding the OpenClaw gateway and its Node.js runtime alongside a playing video gets tight on memory. The Pi 5's faster CPU also speeds up library scanning and metadata retrieval, which matters when your collection grows past a few hundred files.
Recommended parts list:
- Raspberry Pi 5, 8GB RAM
- NVMe SSD (via HAT or adapter) or high-endurance microSD card (32GB minimum)
- Official 27W USB-C power supply (required for stable 4K60 output)
- HDMI 2.0 cable (mandatory for 4K)
- Case with passive or active cooling
The operating system choice matters more than usual. LibreELEC is the go-to for dedicated Kodi boxes because it boots in seconds and strips everything else away. But that minimalism works against you here: LibreELEC is a locked-down, read-only OS that only runs Kodi. You cannot install Node.js or the OpenClaw gateway on it.
You have two practical options:
Raspberry Pi OS Lite (64-bit) is the most flexible path. It gives you a full Debian environment where you install Kodi as a standalone application and OpenClaw as a systemd service. You lose the instant-boot experience of LibreELEC, but you gain the ability to run any Linux software alongside Kodi.
OSMC is a Debian-based media center OS that runs Kodi as its primary interface but still gives you SSH access and apt package management. It is a middle ground: you get a media-focused boot experience with the flexibility to install Node.js and the OpenClaw gateway. OSMC's package repos are smaller than Raspberry Pi OS, so you may need to pull Node.js from the NodeSource repository directly.
For this guide, we will use Raspberry Pi OS Lite because it has the widest compatibility and the most straightforward setup path for both components.
Install Kodi on Raspberry Pi OS
Start by flashing Raspberry Pi OS Lite (64-bit) to your NVMe SSD or microSD card using the Raspberry Pi Imager. During the imaging step, enable SSH and configure your Wi-Fi credentials so you can access the Pi headlessly after first boot. Connect the Pi to your TV via HDMI, plug in the storage, and power it on.
Once the Pi boots, SSH in and update the system:
sudo apt update && sudo apt upgrade -y
Install Kodi from the official Raspberry Pi OS repositories:
sudo apt install -y kodi
Kodi on Raspberry Pi OS runs as a standalone application rather than a full operating system. To start it automatically when the Pi boots, you can configure it as a systemd service or add it to your user's autostart. The Kodi wiki documents both approaches.
After launching Kodi for the first time, walk through the setup wizard. Point it at your media sources (local drives, NFS shares, SMB shares, or USB drives) and let it scan your library. Kodi pulls metadata, artwork, and ratings from online databases automatically during the scan.
Enable the JSON-RPC API so OpenClaw can communicate with Kodi:
- Open Settings in Kodi
- Navigate to Services, then Control
- Enable "Allow remote control via HTTP"
- Set a port (the default is 8080), a username, and a password
- Enable "Allow remote control from applications on other systems" if you plan to send commands from a different device on your network
The JSON-RPC interface supports both HTTP and raw TCP connections. For this setup, HTTP is simpler and sufficient. Once enabled, you can test it by opening a browser on any device on your network and navigating to http://<pi-ip>:8080/jsonrpc. You should see a JSON response confirming the API is active.
4K and HDR notes: The Pi 5 supports 4K60 output by default with no extra configuration. It hardware-decodes HEVC (H.265), which covers the majority of 4K content. Static HDR formats (HDR10 and HLG) are supported, but dynamic formats like Dolby Vision and HDR10+ are not available on Linux. AV1 and VP9 content plays through software decoding, which works reliably at 1080p but may drop frames at 4K60. If your library is mostly HEVC remuxes, you will not hit any playback limitations.
Keep your media center configs safe across rebuilds
Free 50GB workspace for your Kodi settings, library metadata, and OpenClaw skill definitions. No credit card, no expiration. MCP-ready for your agent's reads and writes.
Set Up the OpenClaw Gateway
With Kodi running and its JSON-RPC API enabled, the next step is installing the OpenClaw gateway on the same Pi. OpenClaw requires Node.js 24 or newer and about 500MB of free disk space. The gateway itself is lightweight: it sits in the background, connects to your messaging channels, and forwards requests to a cloud LLM.
Install Node.js from the NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
If your Pi has 2GB of RAM or less, create a swap file to prevent out-of-memory issues during installation. With an 8GB Pi 5, this step is optional but does not hurt:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Run the OpenClaw installer:
curl -fsSL https://openclaw.ai/install.sh | bash
After installation completes, run the onboarding wizard. This is where you configure your LLM provider, connect your messaging channels, and set up the gateway as a background service:
openclaw onboard --install-daemon
The wizard walks you through connecting Telegram, Discord, WhatsApp, or Signal as your control channel. Pick whichever messaging app you already use. Telegram is the most common choice because creating a bot is straightforward through BotFather, and it works on every platform.
Once onboarding finishes, the gateway runs as a systemd user service. You can check its status anytime:
systemctl --user status openclaw-gateway.service
At this point you have two services running on the same Pi: Kodi handling media playback on the HDMI output, and OpenClaw listening for messages on your chosen chat platform. The Pi 5's 8GB of RAM leaves plenty of headroom for both. In practice, Kodi uses 200-400MB during playback depending on the codec, and the OpenClaw gateway sits around 100-150MB.
How to Connect OpenClaw to Kodi Through JSON-RPC
Kodi's JSON-RPC API is the bridge between OpenClaw's natural language processing and your media center's actual functionality. The API exposes methods for almost everything: searching your library, starting playback, managing playlists, toggling subtitles, adjusting volume, and scanning for new media.
OpenClaw's extension system supports three types of integrations: skills (natural language API contracts), plugins (TypeScript/JavaScript gateway extensions), and webhooks. For Kodi, a skill is the right fit. A skill file tells the agent what the external API can do, what parameters each operation needs, and how to format requests. The agent reads this contract and figures out which API call matches the user's intent.
The key insight is that you do not need to handle every possible Kodi operation. Start with the operations you actually use:
Library queries let the agent search your collection. Kodi's VideoLibrary.GetMovies, VideoLibrary.GetTVShows, and VideoLibrary.GetEpisodes methods return filtered, sorted results. The agent can translate "show me all unwatched sci-fi movies" into a filtered API call and return a readable list over Telegram.
Playback control covers play, pause, stop, seek, and volume. The Player.Open, Player.PlayPause, and Player.Stop methods handle the basics. "Pause the movie" or "skip forward 5 minutes" map directly to these calls.
Subtitle management is where the AI layer adds real value. Kodi can download subtitles through add-ons like OpenSubtitles, but selecting the right language and syncing them requires menu navigation. Through the agent, you can say "get English subtitles for this" and have the agent trigger the subtitle search, select the best match, and activate it.
Library maintenance covers scanning for new media and cleaning removed entries. VideoLibrary.Scan and VideoLibrary.Clean run these operations. You can trigger them from your phone instead of walking to the TV.
A practical approach is to start with a small skill that covers the five or six operations you use most, then expand it as you find new needs. The OpenClaw skill format is documented on the official OpenClaw docs site, and community examples for HTTP API wrappers are plentiful in the skills registry, even though a dedicated Kodi skill does not exist yet.
Handling authentication: Kodi's HTTP API uses basic authentication. Your skill configuration needs the Pi's local IP address, the port you set earlier, and the username and password. Since both services run on the same Pi, you can use 127.0.0.1 as the host, which keeps the credentials off the network entirely.
Store Media Configs and Metadata in Fastio
Running a media center generates configuration and metadata that you do not want to lose if your SD card fails or you rebuild the Pi. Kodi's library database, custom keymaps, add-on settings, and your OpenClaw skill definitions all represent hours of setup work.
Local backups to a USB drive work, but they are manual and easy to forget. Cloud storage services like Google Drive or Dropbox can sync folders, but they lack the structure to organize agent-generated output alongside human-curated configurations.
Fastio workspaces give you a shared space where both the OpenClaw agent and you can read and write files. The agent can upload Kodi configuration snapshots, library export data, and skill definitions to a workspace using the Fastio MCP server. You access the same files through the web UI or mobile app to review, download, or share them.
A practical setup uses two workspaces:
Media center configs holds your Kodi settings, custom keymaps, and OpenClaw skill files. When you update a configuration, the agent can push the new version to Fastio with a version note. If you need to rebuild the Pi, you pull the latest configs from the workspace and restore them in minutes.
Library metadata stores exports of your Kodi library database, watch history, and custom playlists. This is useful if you run Kodi on multiple devices and want a central reference for what you have watched, or if you want the agent to answer questions about your library without querying Kodi directly.
Fastio's Intelligence Mode auto-indexes uploaded files for semantic search. Once your library metadata is in a workspace with Intelligence enabled, you can ask questions like "which movies from the 1990s have I not watched yet?" through the Fastio chat interface, even when your Pi is powered off. The agent does not need Kodi running to answer questions about your collection if the metadata is already indexed.
The Business Trial includes 50GB of storage, 5 workspaces, and included credits with no credit card required. Configuration files and metadata exports are small, so you will barely touch the storage limit even with years of backups.
Frequently Asked Questions
Can you run Kodi and OpenClaw on the same Raspberry Pi?
Yes. A Raspberry Pi 5 with 8GB of RAM handles both comfortably. Kodi uses 200-400MB during playback, and the OpenClaw gateway uses about 100-150MB. The catch is that you cannot use LibreELEC, which is a minimal OS that only runs Kodi. Instead, use Raspberry Pi OS Lite or OSMC, both of which let you install Node.js and the OpenClaw gateway alongside Kodi.
How do you control Kodi with an AI assistant?
Kodi exposes a JSON-RPC API over HTTP that supports library queries, playback control, subtitle management, and library maintenance. OpenClaw connects to this API through a custom skill that translates natural language messages (sent over Telegram, Discord, or WhatsApp) into the appropriate JSON-RPC calls. You send a message like "play the next episode of Silo" and the agent maps that to the correct Kodi API method.
What is the best Raspberry Pi for a media center?
The Raspberry Pi 5 with 8GB of RAM is the best current option. It hardware-decodes HEVC at 4K60, outputs 4K over HDMI 2.0, and supports HDR10 and HLG. The 8GB variant gives you headroom to run background services like OpenClaw, Home Assistant, or a download manager alongside Kodi without memory pressure.
Why not use LibreELEC for this setup?
LibreELEC is purpose-built to run Kodi and nothing else. Its filesystem is read-only, and it does not include a package manager or the ability to install Node.js. If you only want a media player, LibreELEC is the fast and most stable choice. But if you want to run OpenClaw or other services alongside Kodi, you need a full Linux distribution like Raspberry Pi OS or OSMC.
Does OpenClaw have a built-in Kodi skill?
Not as of May 2026. The OpenClaw skills registry includes thousands of community skills, but a dedicated Kodi integration is not among them. The integration works by writing a custom skill that wraps Kodi's JSON-RPC API. This is straightforward because the API is well-documented and covers nearly every Kodi operation. Community examples for HTTP API wrapper skills are available in the OpenClaw documentation.
What video formats does the Raspberry Pi 5 support?
The Pi 5 hardware-decodes HEVC (H.265) up to 4K60 and H.264 up to 1080p. AV1 and VP9 are software-decoded, which works smoothly at 1080p but may drop frames at 4K60. For HDR, the Pi 5 supports static formats (HDR10 and HLG) but not dynamic formats like Dolby Vision or HDR10+. Most 4K Blu-ray remuxes encoded in HEVC play without issues.
Related Resources
Keep your media center configs safe across rebuilds
Free 50GB workspace for your Kodi settings, library metadata, and OpenClaw skill definitions. No credit card, no expiration. MCP-ready for your agent's reads and writes.