# Self-host RomM

> A self-hosted retro game library manager. It scans your ROM collection, matches metadata and cover art, and lets you browse, search and play games in the browser. Runs with a bundled MariaDB database. On first open, the setup page asks you to create the admin login.

- Page: https://levelrail.com/templates/romm/
- JSON: https://levelrail.com/templates/romm.json
- Category: Media
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/rommapp/romm
- Upstream docs: https://docs.romm.app/latest/

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 11.8.9

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | mariadb | 11.8.9 | none | dbdata -> /var/lib/mysql |
| romm | rommapp/romm | 5.4.1 | 8080 | resources -> /romm/resources; library -> /romm/library; assets -> /romm/assets; config -> /romm/config; redis -> /redis-data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | MARIADB_DATABASE | preset |
| db | MARIADB_PASSWORD | generated |
| db | MARIADB_ROOT_PASSWORD | generated |
| db | MARIADB_USER | preset |
| romm | DB_HOST | preset |
| romm | DB_NAME | preset |
| romm | DB_PASSWD | generated |
| romm | DB_PORT | preset |
| romm | DB_USER | preset |
| romm | DISABLE_DOWNLOAD_ENDPOINT_AUTH | preset |
| romm | ROMM_AUTH_SECRET_KEY | generated |
| romm | ROMM_DB_DRIVER | preset |
| romm | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install romm --name my-romm
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/romm/install \
  -d '{
    "name": "my-romm"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Open the app and create the admin account on the setup page.
2. Copy your ROM files into the library volume, one folder per platform, then run a scan from the app.

## Questions

### Can I deploy RomM on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for RomM, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image mariadb:11.8.9, rommapp/romm:5.4.1 is what you deploy there.

Self-host RomM, RomM docker compose file, deploy RomM on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
