EmulatorJS Setup for Pokémon in a Browser: Embed Page or RomM Library

Pokémon games from Game Boy through Nintendo 64 can run in a browser tab through EmulatorJS, which the project’s getting-started page lists as supporting Game Boy, Game Boy Advance, Nintendo DS and Nintendo 64 with no client installation. The catch is what EmulatorJS is: a library you embed in a page, not a ready-made server. So the 13 steps below split into two routes, a short embed page (steps 1 to 5) and a RomM library on Docker (steps 6 to 13). Two facts checked against the vendor pages set the limits: the EmulatorJS systems page lists neither 3DS nor Switch (rechecked 13 November 2026), and the FAQ said on 12 November 2026 that netplay is not currently supported.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

EmulatorJS is a library you embed, so pick the route before you install anything

The EmulatorJS documentation says the project runs RetroArch compiled to WebAssembly for the browser, and that it is a backend service to embed in your own website rather than a stand alone server. Backend is the docs’ word for it; the emulation itself runs in the visitor’s browser, which is why this guide calls it a library. The FAQ is blunter about the public demo, saying the project is meant for developers to embed and is not a website to go to and play games. That is why the old advice to “just open EmulatorJS” leads nowhere, and why you choose a route first.

On the player’s side nothing is installed. The getting-started page says WebAssembly lets it run in a modern browser, that all major browsers are supported, and that on Android and iOS you can use “Add to Home Screen” once EmulatorJS has loaded so the page behaves like an app. The project README on GitHub describes EmulatorJS as free and ad-free, with the demo page occasionally showing ads to cover hosting and a Patreon link for supporting development directly.

What you need to decideRoute A: embed page (steps 1 to 5)Route B: RomM library (steps 6 to 13)
Server softwareA web server: NGINX, the Apache server in XAMPP, or simple-web-serverDocker with the Compose plugin, a RomM container and a MariaDB container
Where the ROM goesIn the zip the Code Editor wizard generates, next to index.htmlIn one folder per system under library/roms
InterfaceOne page per game, no library screenRomM’s web interface over a whole collection
HTTPS and headershttps plus two response headers on your web server (step 4)The same two headers on a reverse proxy (step 13)
What you keep maintainingAn HTML file, a ROM and the EmulatorJS version you pointed atTwo containers, a .env file and the firmware folders

Take Route A for one game on one page, for example something to hand to a friend. Take Route B when you want a collection behind one address. If you only need Pokémon on a Mac you control, a native app is less work; our OpenEmu setup guide for Pokémon on Mac covers that.

Which systems the browser covers, which core runs them, and the firmware RomM lists

The getting-started page lists NES / Famicom, Nintendo 64, Nintendo DS, Nintendo GameBoy, Nintendo GameBoy Advance, PlayStation and PlayStation Portable (PSP). Neither 3DS nor Switch appears on the supported systems page, rechecked on 13 November 2026: its list runs from 3DO and the Atari consoles through the Nintendo systems above to the Sega systems and Virtual Boy, and the page itself says it is likely out of date and points to the developer cores list linked under the table below. A 12 November revision of this guide read a 3DS entry into that list; the page has none.

SystemEmulatorJS docs, checked 12 November 2026Default core, per the developer docsPokémon games on that system
Game Boy and Game Boy ColorListed on the getting-started pagegambatteRed, Blue, Yellow, Gold, Silver, Crystal
Game Boy AdvanceListed on the getting-started pagemgbaRuby, Sapphire, Emerald, FireRed, LeafGreen
Nintendo DSListed on the getting-started pagemelonds, with desmume2015 or desmume as fallbackDiamond, Pearl, Platinum, HeartGold, SoulSilver, Black, White
Nintendo 64Listed on the getting-started pagemupen64plus_next; parallel-n64 is the other N64 corePokémon Stadium, Stadium 2, Snap
3DSNo entry on the systems page, rechecked 13 November 2026None listedX, Y, Sun, Moon
SwitchNo entry on the systems page, rechecked 13 November 2026None listedLegends Z-A

Firmware is the other correction: it is not only DS titles that need BIOS files. RomM’s firmware management page opens with “Many emulated platforms require BIOS or firmware to boot, or to reach a certain level of stability”, and lists firmware for Game Boy Advance (gba_bios.bin), PSX, Sega CD, Saturn and DS, with filenames per platform. As of 12 November 2026 the page says you ingest firmware by placing the files in bios/{platform}/ and running a scan. Have both the Game Boy Advance and DS files ready if you take Route B.

EmulatorJS versionChange stated in the docs news page
4.0.9Cores and minified files are no longer included in the repository; you will need to get them separately

What Nintendo’s piracy guidance says about the files you supply

EmulatorJS is the player; the game and firmware files are yours to provide, and the Code Editor wizard packages the ROM you upload. Nintendo’s intellectual property and piracy FAQ states that Nintendo does not offer or authorize for sale any product that lets its game files be played or downloaded on personal computers. On a second support page Nintendo invites reports of ROM sites and emulators at [email protected].

This describes what the vendors publish and is not legal advice. In practice: dump your own cartridges and your own firmware rather than downloading either, and keep ROM files off any address other people can reach. For Game Boy, Game Boy Color and Game Boy Advance cartridges, the GBxCart RW product page lists support for Game Boy, Game Boy Color and Game Boy Advance cartridges with auto ROM size detection, so the reader copies the cartridge directly into a ROM file. A page served on a public address can be opened by anyone who has the URL, so leave the server on your own network unless you add access control.

Embed route: one game on one page, plus the two headers that threaded cores need

Steps 1 to 5 produce a single-game page you can host on a machine you run.

Step 1: Put a web server in place

The getting-started page asks for a web server such as NGINX or the Apache server included in XAMPP, or simple-web-server if you want something simpler. This is not optional: the FAQ answers the Network Error you get from double-clicking index.html with “Use a web server. You cannot just open the HTML file.”

Step 2: Fetch EmulatorJS and decide which build to point at

The documented install is to download the latest release and unzip it into the folder your web server hosts. The docs also describe a built-in server you can run from a cloned GitHub project, but since version 4.0.9 a clone does not contain the cores, so take them from a tagged release or from the public CDN at cdn.emulatorjs.org, which serves any version once you set the data path and loader.js accordingly.

EmulatorJS offers Stable, Latest and Nightly builds. Stable is described in the README as the most current release, with code and cores tested before release, and it is the default on the demo, per the CDN documentation. For a page you want to keep working, point at a fixed version taken from the project’s releases page rather than a moving build, and keep Nightly for experiments.

Step 3: Generate the page with the Code Editor wizard

The Code Editor on emulatorjs.org is a wizard that writes the HTML for you. You choose the emulator, paste its code into index.html and edit the fields, or use “Generate out file”, which gives a zip containing your ROM and an index.html ready to copy into your site. Unzip it into the web server folder from step 1. If you want to play a modified game, build that ROM first; our Universal Pokémon Randomizer ZX guide covers the tool.

A usage document in a third-party fork of EmulatorJS, on GitHub, lists a few optional lines for index.html: EJS_startOnLoaded = true to start the emulator immediately, though audio still waits for the user to interact with the page, EJS_gameName to set the filename of save states, and EJS_color to change the interface color. It also says ROMs can be used as zip, rar or 7z archives. The fork is not the project’s own docs, so confirm those names against the release you downloaded.

Step 4: Serve it over https with the two cross-origin headers

The FAQ’s fix for the “SharedArrayBuffer is not defined” error is to use https and make sure the server sends Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. In NGINX that is a pair of add_header lines:

location / {
    add_header Cross-Origin-Opener-Policy "same-origin" always;
    add_header Cross-Origin-Embedder-Policy "require-corp" always;
}

The FAQ also warns that Microsoft Edge’s “enhanced security” setting disables just-in-time compiling of WebAssembly and falls back to an interpreter that is “far slower”. Test in Chrome or Firefox, or turn that setting off for your site in Edge.

Step 5: Check the headers and open the page

This read-only script fetches only the response headers of your URL, prints the name of any header that is absent and exits with status 1:

#!/bin/sh
set -eu
url="${1:?usage: check-headers.sh https://your-host/}"
headers=$(curl -sI "$url")
for h in cross-origin-opener-policy cross-origin-embedder-policy; do
  printf '%s\n' "$headers" | grep -i "^$h:" || { echo "missing $h" >&2; exit 1; }
done

When both lines print, open the https address in a browser. On a phone, add the page to the home screen after it loads. Route A ends here.

Library route: RomM on Docker, from the compose file to an HTTPS front door

Steps 6 to 13 stand up RomM following the layout in RomM’s quick-start guide: a RomM container and a MariaDB container under Docker Compose, ROMs in one folder per system under library/roms, and the web interface on port 8080. The player is the same one as in Route A: RomM’s EmulatorJS page describes EmulatorJS as the in-browser retro emulator that powers RomM’s Play button, running RetroArch cores compiled to WebAssembly. Do not build on LinuxServer.io’s old emulatorjs image. Its deprecation notice says “This image is deprecated. We will not offer support for this image and it will not be updated.”, and names RomM, Gaseous Server and webЯcade as alternatives.

Step 6: Install Docker with the Compose plugin

On Windows and macOS install Docker Desktop. On Linux, install Docker Engine with the Compose plugin from your distribution’s packages or from Docker’s own documentation. If you use Docker’s convenience installer instead, do not pipe it straight into a shell: the first line below downloads it to a file, so you can read it before running it, and if you installed from packages skip those first three lines. The usermod line adds your account to the docker group so you can run docker without sudo, and newgrp applies the group in your current shell. Then confirm both commands answer:

curl -fsSL https://get.docker.com -o get-docker.sh
less get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker "$USER"
newgrp docker
docker --version
docker compose version

Step 7: Create the project and start the stack

Save the script as setup-romm.sh, then run bash setup-romm.sh. It creates the ROM folders, the firmware folders, a .env with two generated secrets and the compose file. The database password comes from .env so the two containers cannot disagree, set -e halts the script at the first failing command, and the trap deletes only the folder the script itself created if something fails.

#!/usr/bin/env bash
set -euo pipefail

dir="$HOME/romm-pokemon"
created=no
ok=no
cleanup() {
  if [ "$created" = yes ] && [ "$ok" != yes ]; then
    rm -rf "$dir"
    echo "setup failed, removed $dir"
  fi
}
trap cleanup EXIT

mkdir "$dir"
created=yes
mkdir -p "$dir"/library/roms/{gb,gba,nds,n64} "$dir"/library/bios/{gba,nds}
mkdir -p "$dir"/resources "$dir"/assets "$dir"/config
cd "$dir"

db_pass=$(openssl rand -hex 32)
secret=$(openssl rand -hex 32)
cat > .env <<EOF
DB_HOST=romm-db
DB_NAME=romm
DB_USER=romm
DB_PASSWD=$db_pass
ROMM_AUTH_SECRET_KEY=$secret
IGDB_CLIENT_ID=
IGDB_CLIENT_SECRET=
EOF
chmod 600 .env

cat > docker-compose.yml <<'EOF'
services:
  romm:
    image: rommapp/romm:latest
    container_name: romm
    env_file: .env
    ports:
      - "8080:8080"
    volumes:
      - ./library:/romm/library
      - ./resources:/romm/resources
      - ./assets:/romm/assets
      - ./config:/romm/config
    depends_on:
      - romm-db
    restart: unless-stopped

  romm-db:
    image: mariadb:11
    container_name: romm-db
    environment:
      MARIADB_DATABASE: romm
      MARIADB_USER: romm
      MARIADB_PASSWORD: ${DB_PASSWD}
      MARIADB_RANDOM_ROOT_PASSWORD: "true"
    volumes:
      - ./mariadb:/var/lib/mysql
    restart: unless-stopped
EOF

ok=yes
echo "created $dir"

Then start it from the new folder and watch the log:

cd ~/romm-pokemon
docker compose up -d
docker compose logs -f romm

Step 8: First login and metadata keys

Open http://your-server-ip:8080 in a browser and complete the first-run screen. The two IGDB lines in .env are empty on purpose; RomM’s quick-start guide says scans work without a metadata API for basic use, but that setup problems and companion-app integrations can fail without one, so consider adding a metadata provider before the first scan.

If you want one, RomM’s metadata providers page describes IGDB (Internet Game Database) as a popular provider of metadata, cover art, screenshots and related games, and says you will need a Twitch account to access the IGDB API. Put the client ID and secret you get there into the two empty IGDB lines in .env, then restart the stack.

Step 9: Put your ROMs in the system folders

Copy your own dumps into library/roms/gb, gba, nds and n64, then rescan the library in RomM. RomM’s folder structure page is the reference for folder names if you add other systems. To size your own library instead of guessing, run du -sh ~/romm-pokemon/library/roms.

Step 10: Add firmware where RomM looks for it

Place the firmware files you read from your own consoles in the matching bios/{platform}/ folder, which the script created under library for Game Boy Advance and DS, then scan again. The RomM page cited earlier lists the exact filenames, including gba_bios.bin for Game Boy Advance.

Step 11: Launch a game

Open a game from the library and start it. If it fails to start, the error text in the browser console may match a row in the symptom table further down.

Step 12: Saves, controls, phones and the missing netplay

Saves follow your RomM account, not the browser. RomM’s saves and states page (the 5.4.0 release of the docs) says they are stored on the server under /romm/assets/ per user and ROM (the ./assets folder in the compose file above), and that “They follow you across browsers and devices”, so you can start on a laptop and resume on a phone.

The FAQ tells you to make sure no keyboard key is assigned to more than one joypad option, otherwise several joypad buttons fire at once. On Android and iOS use “Add to Home Screen” after EmulatorJS has loaded. Trading and battling over netplay are out: the FAQ says “Netplay is not currently supported”, so do not plan on trading between two browser sessions.

Step 13: Put an HTTPS reverse proxy in front

The same https and header rules from step 4 apply to RomM, so set them at the proxy. A Caddy site block for a domain you own:

pokemon.yourdomain.com {
    header {
        Cross-Origin-Opener-Policy "same-origin"
        Cross-Origin-Embedder-Policy "require-corp"
    }
    reverse_proxy localhost:8080
}

Caddy’s automatic HTTPS documentation lists what has to be true for it to obtain the certificate on its own: your domain’s A/AAAA records point to your server, ports 80 and 443 are open externally, Caddy can bind to those ports (or they are forwarded to Caddy), and its data directory is writeable and persistent. With those in place, restart Caddy and RomM is reachable over https at that subdomain.

Then run check-headers.sh from step 5 against your https address to confirm the proxy passes both headers.

When the page loads but the game does not: symptoms, causes and fixes

What you seeCauseFix
“SharedArrayBuffer is not defined”No https, or the two cross-origin headers are missingServe over https, send the two headers from step 4, confirm with check-headers.sh
Network Error when opening index.htmlThe file was opened directly from diskUse a web server, clear your cache and update your data folder
Very slow in Microsoft EdgeEnhanced security disables just-in-time compiling of WebAssembly and uses a slower interpreterTry Chrome or Firefox, or turn the setting off for your site
Several buttons fire at onceOne keyboard key is mapped to more than one joypad optionRemove the overlapping mappings
A Game Boy Advance or DS title will not boot in RomMPlatform firmware missing; RomM says many platforms need it to boot or run stablyPlace the files in bios/{platform}/ and scan again (step 10)
A large PlayStation game crashesThe FAQ calls it a WebAssembly limitation: the game is likely too big for the browserNone in the browser; the FAQ’s example is PlayStation, not Pokémon

Which route to settle on, by what you need to keep and where you play

For one game on one page, stop after step 5: a web server, the wizard’s zip, https and the two headers are all it takes, and nothing needs maintaining beyond the EmulatorJS version you pinned. For a growing collection behind one address, including on a phone, take steps 6 to 13 and have the Game Boy Advance and DS firmware ready before the first scan, since RomM lists both. The systems page lists neither 3DS nor Switch, so those games need a native emulator; for Switch, our Eden setup guide for Pokémon on Switch covers general Switch Pokémon, and the Citron Neo guide for Pokémon Legends Z-A covers that game.

On either route, send the two headers and run check-headers.sh against your own https address before you load a single ROM; on Route A, also pin a fixed EmulatorJS version from the releases page.

Correction, 13 November 2026: a 12 November 2026 revision of this guide read a 3DS entry into the EmulatorJS systems page, which on recheck lists no 3DS, so that claim is removed; the same 12 November revision had corrected an older claim that only DS titles need firmware, cut a netplay step and hardened the Docker and setup scripts.

Elias Virtanen

Elias Virtanen

Games and consoles

Elias Virtanen covers games and consoles for Tech Insider: console and handheld hardware, game releases, emulators and the business of the games industry. His comparisons start from the makers' specifications and published independent results, and he says plainly what the evidence supports.

View all articles