Open-Source · Free · Docker-Ready

The Easiest Way to Run a Mirakurun TV Tuner Server on Linux

Mirakurun is a free, lightweight Japanese digital TV tuner API server that lets you stream DVB and chardev tuner signals across your network — with a clean REST API, Docker support, and a built-in admin UI, all in one package.

100% Free & Open Source Docker Supported REST API Included

A TV Tuner API Server Built for the Japanese Home Server Scene

Whether you're building a Chinachu DVR, a custom media server, or just want to stream live Japanese broadcast TV over your local network, Mirakurun is the middleware that makes it possible.

📡

What Is Mirakurun?

Mirakurun is an open-source Japanese digital TV tuner API server maintained by Chinachu. It abstracts physical TV tuner hardware — DVB and chardev types — into a clean, network-accessible HTTP API so any app on your LAN can stream or record live TV.

👥

Who Is It For?

Mirakurun is built for Japanese home server enthusiasts, DVR builders using Chinachu, IPTV hobbyists, and Linux users who want programmatic access to their TV tuner hardware without wrestling with low-level driver code.

💡

Why Was It Created?

Managing TV tuner hardware in Japan is complex due to the variety of chardev-based devices. Mirakurun was built to provide a stable, unified API layer so software like Chinachu and EPGStation can focus on features rather than tuner management.

Everything Mirakurun Does Out of the Box

All features are included at no cost. No license key, no trial period.

🌐

RESTful HTTP API

A clean, well-documented REST API exposes all tuner operations — channel scanning, streaming, status — so any language or tool on your network can integrate easily.

📺

DVB Driver Support

Supports tuners using standard Linux DVB drivers with automatic detection and configuration when running the Docker setup command — no manual tuner.yml editing needed in most cases.

🔌

Chardev Tuner Support

Also supports traditional chardev-based tuners common in Japan, via customizable startup scripts and manual tuner config for hardware that doesn't use DVB drivers.

🐳

Docker-First Deployment

The recommended and best-supported installation method. A single docker compose up gets Mirakurun running with shared library dependencies and a clean runtime environment.

🖥️

Built-In Admin UI

A web-based admin interface at :40772/ lets you monitor tuner status, manage channels, and check live connections without touching the command line.

📋

Swagger API Explorer

Interactive API documentation available at :40772/api/debug so developers can explore and test every endpoint directly from the browser.

⚙️

YAML-Based Config

Server, tuner, and channel settings are managed via simple YAML files, making it easy to version-control your setup or migrate to a new machine.

🔒

PCSCD Smart Card Support

Supports B-CAS smart card readers via pcscd integration for watching encrypted Japanese broadcast channels with compatible hardware.

🚀

Lightweight Background Service

Runs as a low-overhead system service. PM2 support has been removed in favor of Docker-managed process lifecycle for a cleaner, more reliable setup.

Get Mirakurun Free via Docker or GitHub

The official Mirakurun image is available on Docker Hub, and the source code is fully open on GitHub under the Chinachu organization.

Install Mirakurun in Under 5 Minutes

Pull the official Docker image and start your TV tuner server with a single command. No account required, no license, completely free.

DeveloperChinachu Project
PlatformLinux (Docker)
LicenseApache-2.0
PriceFree / Open Source
Docker Imagechinachu/mirakurun
Default Port40772
Config FormatYAML
LicenseApache-2.0
SourceGitHub

How to Install Mirakurun on Linux

Follow these steps to get Mirakurun up and running with Docker in under five minutes.

1

Install Docker on Your Linux Machine

Mirakurun's recommended method is Docker. Install Docker Engine on your Linux system using the official installer script.

curl -sSL https://get.docker.com/ | CHANNEL=stable sh
2

Pull the Mirakurun Docker Image

Download the official Mirakurun image from Docker Hub. This contains everything needed to run the tuner server.

docker pull chinachu/mirakurun
3

Run the Automated Setup Wizard

For DVB-supported tuners, run the setup command — Mirakurun will automatically detect tuners and write the configuration files for you.

docker compose run --rm -e SETUP=true mirakurun
4

(Optional) Edit YAML Config Files

For chardev tuners or custom channel lists, edit the YAML config files manually to specify your tuner commands and channel lineup.

vim /opt/mirakurun/config/tuners.yml
vim /opt/mirakurun/config/channels.yml
5

Start Mirakurun

Bring up the container in detached mode. Mirakurun starts in the background and begins serving the API immediately.

docker compose up -d mirakurun
6

Open the Admin UI and Confirm It's Running

Navigate to the admin panel in your browser to verify tuner connections, check channel status, and confirm the API is live.

http://YOUR_SERVER_IP:40772/

From Physical Tuner to Network Stream in Six Steps

Mirakurun sits between your tuner hardware and your DVR or media software, handling all the complexity invisibly.

01

Connect Your Tuner

Plug in a DVB or chardev-compatible Japanese TV tuner to your Linux machine or server.

02

Deploy Mirakurun via Docker

Run the Docker image. Setup auto-detects supported DVB tuners and writes the config automatically.

03

Mirakurun Registers the Tuner

Mirakurun takes control of the tuner hardware and exposes it as an HTTP API endpoint on port 40772.

04

Choose Channels & Set EPG

Configure your channel lineup in channels.yml or let the admin UI guide you through available broadcasts.

05

Connect Your DVR Software

Point Chinachu, EPGStation, or any compatible app at Mirakurun's API to enable recording and streaming.

06

Stream and Record Live TV

Your entire network can now access live Japanese broadcast TV streams through the unified Mirakurun API.

Where Mirakurun Works

Mirakurun is designed for Linux with DVB and chardev tuner hardware. Here is a full compatibility breakdown.

Platform / Tuner Type Support Status Notes
Linux (Ubuntu, Debian) Fully Supported Recommended platform. Docker Compose works out of the box.
Raspberry Pi OS Partial DVB kernel modules may need to be manually built on lightweight distros.
DVB Driver Tuners Fully Supported Auto-detected by setup wizard. Easiest configuration path.
Chardev Tuners (recpt1 etc.) Supported Requires manual startup script and tuners.yml configuration.
B-CAS Smart Card (pcscd) Partial Mount pcscd.comm or disable host pcscd to avoid conflicts. See docs.
Chinachu DVR Full Integration Mirakurun was built alongside Chinachu and is its primary tuner backend.
EPGStation Full Integration EPGStation supports Mirakurun as its tuner source natively.
Windows / macOS Not Supported Mirakurun requires a Linux environment with direct hardware access.

Mirakurun Pros & Cons

A balanced look at where Mirakurun excels and where it has trade-offs, so you know what to expect.

✅ Pros

Completely free and open source under Apache-2.0
Docker deployment is fast, clean, and reproducible
REST API makes integration with any software easy
Auto-detects DVB tuners — minimal manual setup needed
Built-in admin UI and Swagger explorer are very useful
Works seamlessly with Chinachu and EPGStation

⚠️ Cons

Linux-only — no Windows or macOS support
Chardev tuner setup requires manual YAML editing and scripts
pcscd (B-CAS) integration can conflict with host services
Documentation is primarily in Japanese, though GitHub is readable
PM2 support was removed, so non-Docker setups are less convenient

Who Gets the Most Out of Mirakurun

Mirakurun adapts to a variety of home server and hobbyist broadcasting setups.

🎬

DVR Builders

The backbone of Chinachu and EPGStation setups — manage tuners once, let your DVR handle the rest.

📡

IPTV Enthusiasts

Expose Japanese broadcast TV to any IPTV player on your LAN via the Mirakurun HTTP streaming API.

🖥️

Home Server Operators

Run Mirakurun alongside Jellyfin, Plex, or other media servers to bring live TV into your media ecosystem.

👨‍💻

Developers

Use the REST API and Swagger UI to build custom tools, integrations, or experiments on top of live TV data.

Common Mirakurun Issues and How to Fix Them

Tuner not detected after running setup
Make sure your DVB kernel modules are loaded. On Raspberry Pi OS and other lightweight distros, these modules may not be included — build and enable them manually. For chardev tuners, check that your startup script path in tuners.yml is correct and the binary is executable.
pcscd conflict errors on startup
If pcscd is installed on the host, it can conflict with Mirakurun's containerized pcscd. Disable the host service first (systemctl stop pcscd && systemctl disable pcscd), then set the environment variable DISABLE_PCSCD=1, or mount /var/run/pcscd/pcscd.comm directly into the container.
Admin UI not accessible at :40772
Confirm the container is running with docker ps. Check that port 40772 is mapped in your docker-compose.yml (e.g. - "40772:40772"). If accessing from another machine, ensure your firewall allows inbound TCP on port 40772.
Channels not showing up after setup
If the setup wizard didn't auto-populate channels, edit /opt/mirakurun/config/channels.yml manually with your region's channel list. Restart the container after saving changes for them to take effect.
How to completely remove Mirakurun
Stop and remove the Docker container: docker compose down. Remove the image with docker rmi chinachu/mirakurun. Delete config files in /opt/mirakurun/. Your tuner hardware will return to normal Linux device access immediately.

What People Say After Setting Up Mirakurun

★★★★★

"Got Mirakurun running in about ten minutes with Docker. The auto-detection for my DVB tuner worked perfectly — I didn't have to touch a single YAML file."

TK
Taro K.
Home Server Hobbyist
★★★★★

"The Swagger UI at /api/debug is genuinely useful. I built a small custom script to pull EPG data, and having the API explorer saved me hours of reading docs."

RS
Ryota S.
Software Developer
★★★★☆

"Solid middleware between my chardev tuner and EPGStation. The pcscd setup took some trial and error, but once configured it has been rock solid for months."

MH
Makoto H.
NAS / DVR Enthusiast

Frequently Asked Questions About Mirakurun

What is Mirakurun?
Mirakurun is a free, open-source Japanese digital TV tuner API server developed by the Chinachu project. It bridges physical TV tuner hardware — both DVB and chardev types — to a clean HTTP API, allowing DVR software and media apps to stream and record live Japanese broadcast TV over a local network.
Is Mirakurun free to download and use?
Yes. Mirakurun is completely free and released under the Apache-2.0 open-source license. The Docker image, source code, and all documentation are available at no cost with no account required.
What tuners does Mirakurun support?
Mirakurun supports two categories: DVB driver-based tuners (auto-detected by the setup wizard) and chardev-based tuners common in Japan (configured via tuners.yml and startup scripts). Many common tuners in the Japanese home server scene are supported.
Does Mirakurun work with Chinachu and EPGStation?
Yes. Mirakurun was built alongside Chinachu and is its native tuner backend. EPGStation also supports Mirakurun as a first-class tuner source. Both applications connect to Mirakurun's API to manage recordings and channel access.
Can I run Mirakurun on a Raspberry Pi?
Yes, but with a caveat. Raspberry Pi OS Lite and similar lightweight distributions may not include the necessary DVB kernel modules by default. You may need to manually build and enable the relevant modules before Mirakurun can detect your tuner.
What is the default port Mirakurun uses?
Mirakurun listens on port 40772 by default. The Admin UI is at http://YOUR_IP:40772/ and the Swagger API explorer is at http://YOUR_IP:40772/api/debug. This port is configurable in server.yml if needed.
Does Mirakurun work on Windows or macOS?
No. Mirakurun requires a Linux environment with direct access to TV tuner hardware at the OS level. It is not supported on Windows or macOS natively. You could theoretically run it in a Linux VM with USB passthrough, but this is not officially supported.
What's the difference between Mirakurun and Chinachu?
Mirakurun is the tuner middleware — it manages the physical hardware and exposes an API. Chinachu is a full DVR application that uses Mirakurun as its tuner backend to handle scheduling, recording, and playback. Think of Mirakurun as the engine and Chinachu as the car.

Ready to Stream Japanese Live TV Across Your Network?

Set up Mirakurun in minutes with Docker and connect your DVR software today — completely free.

Get Mirakurun on GitHub →