Retro Game Streaming
The retro container profile runs cartridge and disc-based consoles in the browser through RetroArch and a curated set of libretro cores. This page covers the administrator side: how ROMs are laid out, which systems need a BIOS, and how to troubleshoot a game that will not start.
For the player-facing experience, see Games.
Library layout
The games library is scanned for ROM files. One directory per system is the expected layout, and the directory name is what decides the platform:
games/
├── roms/
│ ├── nes/
│ ├── snes/
│ ├── n64/
│ ├── atari2600/
│ ├── megacd/
│ ├── psx/
│ ├── 3do/
│ └── bios/
│ ├── psx/
│ ├── megacd/
│ └── 3do/
└── <PC game directories>
Why the directory decides, not the extension
Several systems share one file extension. A .bin is an Atari 2600 ROM, a Mega Drive ROM, and a raw PlayStation track. Game Gear sets are commonly named .sms, the same extension as Master System. The ROM-set directory is the only reliable signal, so it wins over the extension. A file with an unambiguous extension (.z64, .nes, .sfc) still resolves correctly even from the wrong folder.
Supported systems
The bundled retro image ships these cores. A system without a core here cannot be played, and its ROMs are not imported (see Not yet supported).
| System | ROM-set folder | Core |
|---|---|---|
| NES / Famicom | nes, famicom |
nestopia |
| SNES / Super Famicom | snes, sfc |
snes9x |
| Nintendo 64 | n64 |
mupen64plus_next |
| Game Boy / Game Boy Color | gb, gbc |
gambatte |
| Game Boy Advance | gba |
mgba |
| Mega Drive / Genesis | genesis, megadrive, md |
genesis_plus_gx |
| Master System | sms |
genesis_plus_gx |
| Game Gear | gamegear, gg |
genesis_plus_gx |
| Mega-CD / Sega CD | megacd |
genesis_plus_gx |
| Atari 2600 | atari2600 |
stella |
| PC Engine / TurboGrafx-16 | turbografx, pce, tg16 |
mednafen_pce_fast |
| PlayStation | psx |
pcsx_rearmed |
| Arcade | arcade |
fbneo |
| 3DO | 3do |
opera |
| Atari 5200 | atari5200 |
atari800 |
| Atari 7800 | atari7800 |
prosystem |
| Atari Jaguar | jaguar |
virtualjaguar |
| Atari Lynx | lynx |
handy |
| ColecoVision | colecovision |
gearcoleco |
| Sega 32X | sega32x |
picodrive |
| Virtual Boy | virtualboy |
mednafen_vb |
Not every descriptive folder name is recognised
The folder has to match a known platform alias exactly. mastersystem, pcengine, and segacd are not aliases: a ROM in a folder with one of those names and an ambiguous extension (.bin, .iso, .chd) silently resolves to the wrong platform. Use the names in the table above. A .sms file in mastersystem/ still works because the extension itself is unambiguous, but do not rely on that.
BIOS files
Cartridge systems boot straight from the ROM and need nothing else. Five systems cannot start without a firmware image, and the core looks it up by bare filename in RetroArch's system directory. That is why each system's BIOS files live in their own folder and are mounted flat for the session.
Put them here, one folder per system, using the exact filenames in the tables below:
The backend detects the folder for the platform it is launching and mounts it read-only at /system inside the session container. When the folder is absent, the session still starts and the core reports the missing BIOS rather than failing on a bad mount.
PlayStation (psx)
The core only looks for these names. If it finds none, it falls back to a built-in high-level emulation BIOS, which lowers compatibility and is not recommended:
| Filename | Region |
|---|---|
scph5501.bin |
US (v3.0) |
scph5502.bin |
Europe (v3.0) |
scph5500.bin |
Japan (v3.0) |
psxonpsp660.bin |
from a PSP |
The core also accepts any file whose name starts with scph, so other retail dumps (scph1001.bin, scph7001.bin) work too.
Check the filenames, not just the files
A common mistake is having the right BIOS data under a name the core never looks for. A file called scph7003.bin may in fact hold the US v3.0 image, but the core searches for scph5501.bin first and falls back to high-level emulation when it finds nothing it recognises. Rename each BIOS to the region-appropriate name from the table. Verify with md5sum against the libretro documentation rather than trusting the filename.
Mega-CD / Sega CD (megacd)
One file per region. The core picks the matching region's BIOS automatically:
| Filename | Region |
|---|---|
bios_CD_U.bin |
US (Sega CD) |
bios_CD_E.bin |
Europe (Mega-CD) |
bios_CD_J.bin |
Japan (Mega-CD) |
3DO (3do)
Any one of these is enough:
| Filename | Model |
|---|---|
panafz1.bin |
Panasonic FZ-1 |
panafz10.bin |
Panasonic FZ-10 |
panafz10e-anvil.bin |
Panasonic FZ-10-E |
goldstar.bin |
Goldstar GDO-101M |
Some Japanese titles additionally need a Kanji font ROM (panafz1-kanji.bin). See the Opera core documentation for the full list.
ColecoVision (colecovision)
Gearcoleco marks its OS-7 image as mandatory, so this is the one cartridge-era system that needs a BIOS:
| Filename | Purpose |
|---|---|
colecovision.rom |
ColecoVision OS-7 ROM |
The core also accepts coleco.rom and os7.u2. The file must have a valid CRC32 of 3aa93ef3 (8192 bytes); the core rejects a wrong image rather than booting from it. Verify with md5sum: the expected hash is 2c66f5911e5b42b8ebe113403548eee7.
The optional ADAM expansion also uses eos.rom and writer.rom, which are not required for ColecoVision cartridges.
Arcade (arcade)
The FBNeo core needs the Neo Geo BIOS for Neo Geo titles:
| Filename | Purpose |
|---|---|
neogeo.zip |
Neo Geo BIOS (stays zipped) |
BIOS folders are not games
Anything inside a BIOS directory is deliberately excluded from the library. The scanner treats these directory names as support data, at any depth:
Without this, firmware images are imported as media items and show up as playable titles named after the file, for example scph1001 or bios CD U. If you already scanned before adding a BIOS folder, the entries stay in the database until the next scan removes them.
Only directory names count, so a game legitimately called System.nes is not mistaken for firmware.
Controllers
Two things have to hold for a controller to work: the browser must be able to read it, and RetroArch must receive it.
Browser gamepad
The browser reads the pad with the Gamepad API and forwards its state to lightrays, which turns it into RetroArch remote gamepad packets. This path carries real analog stick values and needs no device access.
Why not /dev/uinput? Virtual-device creation would be the obvious route,
but it needs uinput/uhid on the host, and under a nesting container runtime
(for example Proxmox LXC with the default AppArmor profile) opening
/dev/uinput fails with EPERM even in a --privileged child. The remote
gamepad path sidesteps device access entirely, so it works in that setup.
For this to work, lightrays and the game container must share a Docker network:
the packets are UDP, and a container on the plain bridge network is
unreachable from the compose network. lightrays detects its own network
automatically. Set LIGHTRAYS_SESSION_NETWORK only if it runs on several
networks and the automatic choice is wrong.
The pad must be connected after the stream starts, or picked up on the next
frame. Button layout follows the W3C "standard gamepad" mapping; lightrays
translates it to RetroPad ids in one place (lightrays/src/input.rs).
Deadzone and D-pad
Per-user settings live in User settings → Gaming:
| Setting | Effect |
|---|---|
| Analog stick deadzone | Values inside this range snap to 0, the rest is rescaled. Applied by lightrays to browser gamepads, and written to RetroArch as input_analog_deadzone for a locally attached pad |
| D-pad mode | Whether the D-pad acts as itself or as an analog stick (input_playerN_analog_dpad_mode) |
The deadzone is applied at the browser gamepad path by lightrays and at the local-pad path by RetroArch, so it is never applied twice to one input. The D-pad mode likewise only affects RetroArch's own input drivers: a browser gamepad sends RetroPad D-pad ids directly, so its D-pad stays a D-pad.
Disc-based games
Mega-CD, PlayStation, and 3DO titles are disc images. Multi-track games should use a .cue or .m3u file next to the tracks, not a bare .bin, so the core sees the whole disc.
Do not store 3DO or arcade ROMs as 7z archives
The Opera and FBNeo cores require uncompressed content, and the image cannot extract .7z (no 7z binary). A .7z ROM downloads and mounts fine, then fails at load with:
Extract 3DO and arcade ROMs to .iso, .cue, or .bin and keep .zip only where the core supports it (FBNeo reads zipped arcade sets directly).
Not yet supported
These systems have no core in the bundled image. There are two distinct cases, and only the first is truly unsupported.
No alias at all. The ROMs are not imported: they never appear in the library, so nothing is shown for them and no scan warning is raised. The ROM collection carries empty folders for every system Batocera knows about, so a folder existing under roms/ does not mean the system is supported.
| ROM-set folder | System |
|---|---|
c64 |
Commodore 64 |
atari800 |
Atari 8-bit computers |
msx1, msx2 |
MSX |
amiga500, amiga1200 |
Amiga |
pc98, x68000 |
Japanese home computers |
Registered, but no core. These have a platform alias, so a release tagged with them is recognised and the item is imported, but there is no core to run it, so the game cannot start. They appear in the library as platform names without playback:
| Platform | Slug |
|---|---|
| Sega Saturn | saturn |
| Dreamcast | dreamcast |
| Nintendo DS / 3DS | ds, 3ds |
| PlayStation 2 and newer | ps2 … ps5 |
| GameCube / Wii / Wii U | gamecube, wii, wiiu |
| Xbox family | xbox |
| Nintendo Switch | switch |
Neo Geo sets are the exception that works: neogeo resolves to arcade and runs on FBNeo, provided the neogeo.zip BIOS is present.
Adding a system is a code change: register the platform and its aliases, map its ROM extensions, add the core to the retro image, and add a BIOS folder to _BIOS_DIRS if the core requires firmware. See backend/src/streamarr/services/game_platforms.py and containers/retro/Containerfile.
Two things are easy to get wrong when doing so:
- Core names must exist on the buildbot. The image fails the build when a core
.sois missing, and it fails when the matching.infois empty. Both checks were added because the.infostep used a URL that returned 404 for every core, leaving 19 empty metadata files that RetroArch silently tolerated. - Aliases are matched with word boundaries. A broad alias can be swallowed by an existing one: registering
genesis 32xwould make "Sonic 32X" and anygenesis 32xfolder resolve to Mega Drive. The 32X therefore matchessega32xand32xonly.
Also note that a platform resolving does not imply its BIOS is optional. Gearcoleco requires its OS-7 image, while PicoDrive has an HLE fallback for 32X and needs none; check the core's .info (firmware0_opt) rather than assuming.
Troubleshooting
Start here when a game will not launch. The per-session container log shows what the backend decided and what the core reported.
The session starts and immediately stops. Check which core and ROM were used:
You should see the resolved core and ROM:
A wrong core is picked. The backend resolves the core from the ROM's path, so a mis-resolved platform means the ROM is in the wrong folder. Move it into the correct <system> directory and rescan.
The game starts but shows a BIOS screen or a black screen. The BIOS is missing or misnamed. Confirm the mount happened:
docker inspect lightrays-<session-id> --format '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{"\n"}}{{end}}'
A disc-based session shows a /system mount, pointing at the BIOS folder on the host:
No /system line means the platform needs a BIOS but the folder was not found. Check the path and the folder name against the tables above.
Content fails to extract. The ROM is a .7z archive for a core that needs uncompressed input. See the note above.
Related
- Games for the player-facing experience
- Libraries for scanning and platform filters
- Page Layouts for the sections on the games browse page