Skip to content
← All articles
Article

RetroArch Web Games

Listen to the audio story

RetroArch Web Games: a retro arcade in Docker · 1:27 · AI-written script, synthetic voices

Transcript

Ava: Imagine opening a browser tab and playing a Game Boy classic, served from your own machine.

Andrew: Nice. How does that work?

Ava: It's retroarch-web-games, a Docker image by Antoine that runs RetroArch in the browser with games already packed in. It covers NES, SNES, Genesis and Game Boy titles. You self-host the web player and deploy with Docker or Docker Compose.

Andrew: How do you start it?

Ava: One command: docker compose up with the detach flag. The image is also published on Docker Hub.

Andrew: What's the catch?

Ava: Size. The page warns that the image is about ten gigabytes, because of all the games it includes.

Andrew: How do the games get there?

Ava: Scripts in the image download game archives and sort them. A bash function and a Python script fetch the archives from several sources, rename the files and put them in directories so RetroArch can list them cleanly. Downloads run in parallel, and failures get reported instead of disappearing.

Andrew: Is it built from scratch?

Ava: No. It's based on an existing RetroArch web Docker setup and RetroArch's own Emscripten package, and it's MIT licensed. Antoine also links a related project called FlashGames, a small collection of old Flash games that run in modern browsers with Ruffle.

Andrew: A pocket arcade, then.

Ava: Pretty much. The project page has the links and the script notes.

Table of contents

RetroArch Web Games

retroarch-web-games: Docker Retroarch Web with pre-downloaded games.

Self-hosted RetroArch in the browser with NES, SNES, Genesis, and Game Boy games packaged in a Docker image.

Features

  • Pre-loaded games for NES, SNES, Genesis, and Game Boy
  • Self-hosted web player
  • Docker / Docker Compose deploy

How to Use

To get started, run the Docker image with the following command:

docker-compose up -d

Download HERE

https://hub.docker.com/r/antoinebou13/retroarch-web-games

Image Size Warning

Note: The Docker image is approximately 10GB due to the inclusion of various games.

Script Explanation

### Behind the Scenes: Scripting for Game Downloads

Scripts in the image download and organize game archives:

1. **Batch downloading of game archives:**
   The `download_7z_files` bash function and a Python script fetch archives from several sources.

2. **Renaming and sorting games:**
   Bash and Python rename files and sort them into directories so RetroArch can list them cleanly.

3. **Parallel downloads and errors:**
   Bash jobs and Python's ThreadPoolExecutor run downloads in parallel; failures are reported instead of failing silently.

## Acknowledgements

This Docker image is based on:

- [Inglebard/dockerfiles (retroarch-web branch)](https://github.com/Inglebard/dockerfiles/tree/retroarch-web)
- [libretro/RetroArch (master/pkg/emscripten)](https://github.com/libretro/RetroArch/tree/master/pkg/emscripten)

### License

MIT License.

### Source

"https://archive.org/download/nointro.gb"
"https://archive.org/download/nointro.gbc"
"https://archive.org/download/nointro.gba"
"https://archive.org/download/nointro.snes"
"https://archive.org/download/nointro.md"
"https://archive.org/download/nointro.nes-headered"