Install CCcam Server on Ubuntu: Full Setup Guide
If you're trying to do a cccam server install ubuntu and running into walls — missing libraries, silent crashes, clients that won't connect — you're not alone. This is one of those setups where the documentation is scattered, outdated, or written for Debian Lenny. This guide covers the full process from scratch: dependencies, binary placement, systemd service, config file syntax, firewall rules, and hardening. Real commands, real file paths, no handwaving.
Prerequisites Before Installing CCcam on Ubuntu
Before you touch the binary, get your system ready. Skipping this part is why most installs fail silently.
Supported Ubuntu Versions (18.04, 20.04, 22.04)
Ubuntu 20.04 LTS is the sweet spot right now. 18.04 reached end-of-life in April 2023, so don't use it for anything you care about. 22.04 works but introduces a multiarch headache with libssl — more on that below. If you're on 22.04, expect to spend extra time on library compatibility. Anything older than 18.04 is a dead end.
Required Hardware: Smart Card Readers and CAM Cards
You need a physical smart card reader that Linux recognizes. USB readers (like the Omnikey 3121 or Gemalto PC Twin) are the easiest path. Internal CI+ slots show up as /dev/ci0 or similar — the device path differs, and you'll need to verify it manually with ls /dev/ci*. If you have multiple readers connected, CCcam will try to grab the first one it finds, so know which device path corresponds to which reader before you configure anything.
Running on a Raspberry Pi? Stop here. CCcam is an x86 binary — it will not run on ARM. Use OScam instead, which has native ARM builds.
Required Packages: libssl, libpcsclite, pcscd
First, add i386 architecture support. On a 64-bit Ubuntu system this is non-negotiable:
sudo dpkg --add-architecture i386
sudo apt updateThen install the required packages:
sudo apt install pcscd libpcsclite1 libpcsclite-dev \ libssl-dev libc6:i386 libstdc++6:i386 libpcsclite1:i386On Ubuntu 22.04, libssl1.0 is gone. You need libssl1.1:i386 instead. If that's not available in the repos either, you may need to pull the .deb from Ubuntu 20.04's pool and install it manually with dpkg -i. It's annoying but it works.
Checking Kernel Module for Smart Card Reader (pcsc_scan)
Install and run pcsc_scan before doing anything else with CCcam:
sudo apt install pcsc-tools
sudo systemctl start pcscd
pcsc_scanIf your card reader shows up and the card is detected, you're good. If pcsc_scan hangs or reports no readers, the problem is at the OS level and CCcam can't fix it. Check dmesg | grep -i usb to see if the reader was even recognized when you plugged it in. The pcscd daemon must be running before CCcam starts — if it's not, CCcam will log can't open /dev/pcsc and your card goes nowhere.
Downloading and Installing the CCcam Binary on Ubuntu
CCcam has no official distribution channel — the developers shut down years ago. Common versions still circulating are 2.1.4, 2.2.1, and 2.3.0. Version 2.3.0 has the best client compatibility. Get the binary from a source you trust (satellite forums, community archives). Do not name, link to, or rely on random reseller sites — some distribute modified binaries.
Where to Obtain the CCcam Binary (version 2.1.4, 2.2.1, 2.3.0)
Version differences matter for client compatibility. Some older set-top boxes only speak the 2.1.x protocol version. If clients are dropping or failing auth for no obvious reason, check whether the client's firmware expects a specific CCcam version. Version 2.3.0 is generally the most permissive and backwards-compatible.
Making the Binary Executable: chmod and Placement in /usr/local/bin
Once you have the binary:
chmod +x CCcam
sudo mv CCcam /usr/local/bin/CCcamThat's it for placement. /usr/local/bin keeps it clean and in your system PATH.
Handling 32-bit Dependencies on 64-bit Ubuntu
This is the number one install failure point and most guides don't even mention it. CCcam is a 32-bit binary. On 64-bit Ubuntu, running it without the i386 libraries gives you this:
bash: /usr/local/bin/CCcam: No such file or directoryThe file exists. The error is misleading. What's actually missing is the 32-bit ELF interpreter. Fix it:
sudo apt install libc6:i386 libstdc++6:i386 libssl1.1:i386 libpcsclite1:i386If you're on 22.04 and libssl1.1:i386 doesn't install cleanly, download the package directly:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_i386.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_i386.debVerifying the Binary Runs: ./CCcam --version
Test it before building a service around it:
CCcam --versionYou should see a version string. If it segfaults immediately, you still have missing 32-bit libs. Run ldd /usr/local/bin/CCcam and look for any line that says not found — those are your missing dependencies.
Setting Up CCcam as a systemd Service
Forget old init.d scripts. Create a proper systemd unit at /etc/systemd/system/cccam.service:
[Unit]
Description=CCcam Card Sharing Server
After=network.target pcscd.service
Requires=pcscd.service
[Service]
Type=simple
User=cccam
Group=cccam
WorkingDirectory=/etc/cccam
ExecStart=/usr/local/bin/CCcam
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.targetThen enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable cccam
sudo systemctl start cccamThe Requires=pcscd.service line ensures pcscd is up before CCcam tries to access the card reader. Without this, you get a race condition on boot where CCcam starts first and finds nothing.
Configuring CCcam: The CCcam.cfg File Explained
The config file is where most people spend the most time. The syntax is unforgiving and the error messages are not helpful.
Default Config File Location: /etc/CCcam.cfg and ~/.CCcam/CCcam.cfg
CCcam looks for its config in /etc/CCcam.cfg by default when run as a system service. If run as a user, it checks ~/.CCcam/CCcam.cfg. For a systemd service running as the cccam user, put your config at /etc/CCcam.cfg and make sure file permissions allow the cccam user to read it. Also: do not make this file world-writable. CCcam will refuse to start if /etc/CCcam.cfg has permissions wider than 640.
Core Directives: PORT, SERVERIP, LOGFILE, CLIENTMAXHOPS
Here's a full annotated example config:
# CCcam.cfg - Main configuration file
# Port CCcam listens on for client connections (default 12000)
PORT = 12000
# Bind to all interfaces (use specific IP for security)
SERVERIP = 0.0.0.0
# Log settings
LOGFILE = /var/log/cccam.log
LOG LEVEL = 1
# Limit hop count to reduce latency and abuse
CLIENTMAXHOPS = 1
# Reshare level: 0 = no reshare, 1 = reshare to clients, 2 = reshare received cards
RESHARE = 1
# Cache ECM responses (milliseconds)
CACHEEX = 0LOG LEVEL 0 is silent, 1 is normal, 3 is verbose debug. In production, use 1. Level 3 will write gigabytes to disk quickly and tank I/O performance.
Defining Local Card Readers: DEVICE and SMARTCARD Lines
For a USB reader:
DEVICE = /dev/ttyUSB0For a pcsc-based reader:
DEVICE = /dev/pcsc/1If you have multiple readers, specify each one on a separate DEVICE line. CCcam will initialize them in order. For an internal CI+ slot, use /dev/ci0. Verify the actual device path with ls -la /dev/pcsc/ or pcsc_scan before putting it in the config.
Adding Client Users: C: and F: Line Syntax
This is where nearly every guide gets it wrong or doesn't explain it at all. There are two completely different line types and they serve opposite roles.
F: lines define users who connect to your server. These are your clients:
# F: username password {reshare} {ignore_reshare} {stealth}
F: client1 secretpass1 1 0 0
F: client2 anotherpass 0 0 0C: lines define upstream servers your CCcam connects to:
# C: hostname port username password {stealth}
C: upstream.example.local 12000 myuser mypassword 0The reshare field in F: lines controls whether that client can re-share what they receive. Set to 0 if you don't want clients redistributing cards. The stealth field hides the card info from that client when set to 1.
Adding Upstream Servers: C: Line Format (hostname port username password)
If you're connecting to an upstream CCcam server for cards you don't have locally:
C: 192.168.1.100 12000 username password 0The fifth field (stealth mode) is optional but defaults to 0. Using a hostname works but DNS resolution at startup can cause delays — prefer IP addresses for local setups.
Setting ECM Cache and Reshare Levels
RESHARE controls how received cards propagate. RESHARE = 0 means your server won't pass any cards it receives from upstream to your local clients. RESHARE = 1 means it will. RESHARE = 2 means clients can re-reshare — generally avoid this unless you specifically want a relay node.
CLIENTMAXHOPS = 1 limits the card hop count to one. This reduces latency and prevents your server from being used as a relay through which reshared cards keep hopping across multiple servers. Keep it at 1 for a standard local setup.
Enabling Newcamd and Camd35 Protocol Support
CCcam can also speak Newcamd (N: lines) and Camd35 protocols for compatibility with clients that don't support the native CCcam protocol:
# Newcamd port
NEWCAMD PORT = 15050
# Camd35 port
CAMD35 PORT = 15001These are separate ports. Open them in your firewall the same way you do port 12000. Not all clients need these — native CCcam protocol on port 12000 is sufficient for most modern receivers.
Firewall, Networking, and Port Configuration
Opening CCcam Default Port 12000 with ufw
CCcam communicates over TCP, not UDP. Open it with:
sudo ufw allow 12000/tcpIf you added Newcamd or Camd35 ports:
sudo ufw allow 15050/tcp
sudo ufw allow 15001/tcpCheck your rules with sudo ufw status numbered.
Using Non-Standard Ports to Reduce Exposure
Running on port 12000 is fine for a private local setup, but if the server is internet-facing, automated scanners hit that port regularly. Move CCcam to something like port 29100 or 38000 — update both PORT in CCcam.cfg and the ufw rule. It's not real security, but it kills the noise.
Binding to a Specific Network Interface with SERVERIP
SERVERIP = 0.0.0.0 binds to all interfaces. If your server has multiple network interfaces (say, a LAN interface at 192.168.1.10 and a WAN interface), you can restrict CCcam to only listen on the LAN side:
SERVERIP = 192.168.1.10This is particularly useful if you have a static NAT setup with multiple WAN IPs and don't want CCcam accidentally binding to the wrong interface. For most home setups, 0.0.0.0 is fine.
NAT and Port Forwarding for Remote Clients
If clients are connecting from outside your network, port-forward TCP 12000 on your router to the Ubuntu server's LAN IP. The process varies by router — you need the server's static LAN IP (set it with a DHCP reservation or configure it statically). Exposing port 12000 to the public internet is a real risk — restrict access by IP with ufw when you can:
sudo ufw allow from 203.0.113.45 to any port 12000 proto tcpTesting Connectivity with netcat and telnet
From the server itself:
nc -zv localhost 12000From a remote machine:
nc -zv 192.168.1.10 12000You can also use telnet 192.168.1.10 12000 — it won't establish a CCcam session but it'll tell you whether the port is reachable. If nc fails from localhost but CCcam is running, check ss -tnlp | grep 12000 to see what address CCcam actually bound to.
Troubleshooting Common CCcam Install Problems on Ubuntu
Most problems fall into a small number of categories. Here's how to diagnose each one systematically. A proper cccam server install ubuntu procedure should always include knowing how to read the logs.
CCcam Won't Start: Checking systemd Logs with journalctl
First stop for any issue:
journalctl -u cccam -fFor historical logs since last boot:
journalctl -u cccam -bAlso tail the CCcam log directly:
tail -f /var/log/cccam.logIf CCcam exits immediately with no useful output in its own log, journalctl will catch the exit code and stderr. A return code of 127 usually means the binary or a linked library wasn't found.
Card Not Found: pcscd Not Running or Wrong Device Path
The log will show something like:
[ERROR] can't open /dev/pcsc
[INFO] no card found on device /dev/ttyUSB0Fix the first issue:
sudo systemctl restart pcscd
sudo systemctl restart cccamFix the second by verifying your device path with pcsc_scan and updating the DEVICE line in CCcam.cfg. If you have AppArmor enabled, it may be silently blocking access to /dev/pcsc. Check sudo aa-status and look for CCcam in the enforcement list. You'll need to either create a profile exception or set it to complain mode temporarily to diagnose.
Clients Can't Connect: Port Blocked or Wrong Credentials
If a client connects and immediately drops, check the CCcam log for:
[WARN] client disconnected
[ERROR] invalid username or passwordThe F: line in CCcam.cfg must match exactly — username and password are case-sensitive. CCcam requires a full restart to pick up any config changes. No SIGHUP, no reload signal — just a full sudo systemctl restart cccam. This catches people out constantly.
CCcam Starts But No ECM: Checking CAID and Provider ID in Logs
If CCcam is running and the card is detected but clients aren't getting ECM responses, look for the CAID your card is advertising in the log. A log entry like:
[INFO] card found: CAID 0x0500, provider 0x040810...tells you what the server sees. If the client is requesting a different CAID, there's a mismatch. Also check that RESHARE is set correctly — if it's 0, clients connected via C: lines won't receive cards from your local reader.
Segfault or Immediate Crash: 32-bit Library Issues
Segfault on launch almost always means missing 32-bit libs. Run:
sudo apt install libc6:i386 libstdc++6:i386
ldd /usr/local/bin/CCcamAny not found in the ldd output is your culprit. Install the i386 version of that library.
High CPU Usage: Log Level and ECM Cache Tuning
If CCcam is hammering the CPU, the first thing to check is LOG LEVEL. Level 3 (debug) generates enormous log I/O. Drop it to 1 in CCcam.cfg and restart. Also check if log rotation is set up — a 4GB CCcam log file causes noticeable slowdown just from the write overhead.
CCcam.cfg Changes Not Applied: Restart vs Reload Behavior
CCcam does not support runtime config reloads. No signal, no command — you must do a full restart:
sudo systemctl restart cccamAny time you edit CCcam.cfg, restart the service. Forgetting this is a classic time-waster when debugging config changes that appear to have no effect.
Security Hardening for a CCcam Server on Ubuntu
Running CCcam as root is a genuinely bad idea. If there's an exploit in the binary — and with a closed-source binary from an unknown source, you can't rule it out — root access means complete system compromise. Harden this setup properly.
Running CCcam as a Non-Root Dedicated User
Create a system user with no login shell:
sudo useradd --system --no-create-home --shell /usr/sbin/nologin cccamGive it access to the pcsc device group:
sudo usermod -aG plugdev cccamSet correct ownership on the config and log files:
sudo chown cccam:cccam /etc/CCcam.cfg
sudo chmod 640 /etc/CCcam.cfg
sudo touch /var/log/cccam.log
sudo chown cccam:cccam /var/log/cccam.logThe systemd unit file shown earlier already uses User=cccam — this is what ties it together.
Restricting Log File Permissions
Don't leave /var/log/cccam.log readable by everyone. Mode 640 (owner read/write, group read, others nothing) is appropriate. Set up log rotation to prevent the file growing unbounded:
# /etc/logrotate.d/cccam
/var/log/cccam.log { weekly rotate 4 compress missingok notifempty create 640 cccam cccam
}Using fail2ban to Block Brute Force on Port 12000
CCcam logs failed auth attempts. You can build a basic fail2ban filter around them. Create /etc/fail2ban/filter.d/cccam.conf:
[Definition]
failregex = \[WARN\] client .* invalid username or password
ignoreregex =Then add a jail in /etc/fail2ban/jail.local:
[cccam]
enabled = true
port = 12000
filter = cccam
logpath = /var/log/cccam.log
maxretry = 5
bantime = 3600The exact log format depends on your CCcam version — check your actual log output and adjust the regex accordingly. This is a starting point, not a copy-paste-and-forget solution.
VPN Tunnel Option for Remote Client Connections
The cleanest security approach for remote clients is not exposing port 12000 at all. Run WireGuard on the server, have clients connect to the VPN, and let CCcam listen only on the VPN interface (e.g., SERVERIP = 10.0.0.1). Port 12000 never touches the public internet.
WireGuard setup is outside the scope of this article, but a basic WireGuard server on Ubuntu is well-documented and takes about 15 minutes to configure. OpenVPN works too but the overhead is higher.
Monitoring Active Connections with netstat and ss
See who's currently connected to your CCcam server:
ss -tnp | grep 12000Or with established connections only:
ss -tn state established | grep 12000The output shows remote IPs and ports. If you see connections from IPs you don't recognize, check your F: line credentials and consider restricting access by IP in ufw. Time synchronization also matters here — if a client's clock is more than a few seconds off from the server, connection drops can occur intermittently. Make sure both server and clients have NTP running (sudo systemctl status systemd-timesyncd).
What Ubuntu version is best for running a CCcam server?
Ubuntu 20.04 LTS is the most reliable choice right now. The 32-bit library support is straightforward, libssl1.1 is available in the repos, and it won't hit end-of-life until April 2025. Ubuntu 22.04 works but requires more manual effort for multiarch library configuration, particularly getting libssl in the right version for the 32-bit CCcam binary. Avoid any Ubuntu version that's already end-of-life for anything you plan to run long-term.
Why does CCcam say 'No such file or directory' even though the binary exists?
This is the 32-bit library problem. CCcam is a 32-bit binary and on 64-bit Ubuntu, the ELF interpreter for 32-bit executables isn't installed by default. Run sudo dpkg --add-architecture i386, then sudo apt install libc6:i386 libstdc++6:i386 libssl1.1:i386. After that, try running CCcam again. If you still see the error, run ldd /usr/local/bin/CCcam and install whatever comes back as "not found."
What is the difference between C: lines and F: lines in CCcam.cfg?
They're opposite in direction. F: lines define users who connect TO your CCcam server — you're creating accounts for your clients. C: lines define upstream servers that your CCcam connects TO — you're telling CCcam where to go for cards it doesn't have locally. F: line syntax is F: username password reshare ignore_reshare stealth. C: line syntax is C: hostname port username password stealth. Getting these backwards is one of the most common config mistakes.
How do I check if my smart card is being detected by the CCcam server?
Start with the OS layer: systemctl status pcscd to confirm the pcsc daemon is running, then pcsc_scan to see if the reader and card appear. If pcsc_scan doesn't see anything, CCcam definitely won't either. Once you've confirmed the card is visible at the OS level, check /var/log/cccam.log after starting CCcam — look for lines containing "card found" with a CAID value. No CAID in the log means CCcam isn't seeing the card regardless of what pcsc_scan shows, which usually points to a wrong DEVICE path in CCcam.cfg.
Can CCcam and OScam run simultaneously on the same Ubuntu server?
Yes, and it's actually a solid setup. Run OScam on port 11000 to handle the physical card reader directly, then add a C: line in CCcam.cfg pointing to localhost port 11000. CCcam handles client connections while OScam manages the hardware. The key rule: they cannot both claim the same /dev/pcsc device directly. OScam owns the card, CCcam talks to OScam. Make sure the ports don't overlap — CCcam on 12000, OScam reader interface on a different port.
How many client connections can a CCcam server handle?
There's no fixed number — it depends on your hardware, network, and config. A modern desktop or VPS running Ubuntu can handle tens of simultaneous clients without breaking a sweat. What kills performance is high hop counts (keep CLIENTMAXHOPS at 1), verbose logging (keep LOG LEVEL at 1 in production), and high ECM request rates from many clients decoding simultaneously. Watch CPU usage and log I/O — those are your real bottlenecks, not some theoretical connection limit.
Does CCcam work on Ubuntu running inside a VM or container?
In a VM (VirtualBox, KVM, VMware), yes — but you need to pass the USB smart card reader through to the VM, not just share it from the host. VirtualBox has USB passthrough in the device settings; KVM uses USB host device passthrough in the VM XML config. Docker containers are problematic for physical card access — USB passthrough in Docker requires privileged mode and device mapping, which gets complicated fast. If you need a physical card, use a proper VM or bare metal. If you're running a pure relay (no local card, just connecting upstream via C: lines), then containers work fine.