Mirakurun Guide ๐Ÿ”’

How to Set Up B-CAS Smart Card (pcscd) with Mirakurun

๐Ÿ“… June 19, 2026  ยท  ๐Ÿท๏ธ Guide  ยท  โฑ๏ธ 5 min read

โ† Back to All Guides | Mirakurun Guide

What is B-CAS and Why Do You Need It?

B-CAS (Broadcasting Satellite Conditional Access Systems) is the conditional access system used for encrypted Japanese broadcast TV channels, including most BS and CS satellite channels. To decode these channels, you need a physical B-CAS smart card and a compatible card reader connected to your server.

What is pcscd?

pcscd is the PC/SC Smart Card Daemon โ€” a Linux service that manages communication between the operating system and smart card readers. Mirakurun uses pcscd internally to interface with the B-CAS card for decrypting encrypted broadcast content.

Option 1 โ€” Let Mirakurun's Docker Container Run pcscd

The simplest setup is to let Mirakurun's container manage pcscd internally. First, make sure the host pcscd service is stopped and disabled to avoid conflicts:

sudo systemctl stop pcscd sudo systemctl disable pcscd

Then set the environment variable in your docker-compose.yml:

environment: - DISABLE_PCSCD=0

Option 2 โ€” Use Host pcscd and Mount the Socket

If you prefer to use the host's pcscd service, mount the pcscd socket into the Mirakurun container:

volumes: - /var/run/pcscd/pcscd.comm:/var/run/pcscd/pcscd.comm

Then disable pcscd inside the container by setting:

environment: - DISABLE_PCSCD=1

Verifying B-CAS Is Working

After setup, try streaming an encrypted BS channel through the Mirakurun API. If the stream plays without scrambling errors, B-CAS decryption is working correctly.

Frequently Asked Questions

Do I need B-CAS for terrestrial (GR) channels?โ–ผ
Most Japanese terrestrial channels are unencrypted and do not require a B-CAS card. B-CAS is primarily needed for BS and CS satellite channels.
What card reader should I use?โ–ผ
Any PC/SC compatible smart card reader works. The Sony RC-S330 and similar USB readers are commonly used in the Japanese home server community.

Ready to Get Started with Mirakurun?

Download free and follow our guides to set up your TV tuner server today.

Download Mirakurun Free โ†’