Romm¶
Romm is a frontend to manage and even play emulator roms.
There is an official image for this service that we'll use: rommapp/romm.
Pre-Installation¶
We'll create a folder in the main user's home where all the service's data will be saved.
mkdir ~/services/games/romm
Docker Compose¶
Romm will be run using Docker Compose. The content of the docker-compose.yml
file is as follows:
services:
web:
image: rommapp/romm:latest
restart: unless-stopped
depends_on:
- db
networks:
default:
proxy_external:
aliases:
- romm
volumes:
- ./resources:/romm/resources
- ./redis:/romm/redis-data
- /media/sata_2tb/Retroid:/romm/library
- ./assets:/romm/assets
- ./config:/romm/config
environment:
TZ: America/Guayaquil
DB_HOST: db
DB_NAME: ${MYSQL_DATABASE}
DB_USER: ${MYSQL_USER}
DB_PASSWD: ${MYSQL_PASSWORD}
IGDB_CLIENT_ID: ${IGDB_CLIENT_ID}
IGDB_CLIENT_SECRET: ${IGDB_CLIENT_SECRET}
ROMM_AUTH_SECRET_KEY: ${ROMM_AUTH_SECRET_KEY}
ROMM_AUTH_USERNAME: ${ROMM_AUTH_USERNAME}
ROMM_AUTH_PASSWORD: ${ROMM_AUTH_PASSWORD}
DISABLE_CSRF_PROTECTION: true
labels:
traefik.enable: true
traefik.docker.network: proxy_external
traefik.http.routers.romm.rule: Host(`${DOMAIN_ROMM_LOCAL}`) || Host(`${DOMAIN_ROMM_VPN}`)
traefik.http.routers.romm.entrypoints: local-https
traefik.http.routers.romm.tls: true
traefik.http.routers.romm.tls.certresolver: le
traefik.http.routers.romm.service: romm@docker
traefik.http.services.romm.loadbalancer.server.port: 8080
db:
image: mariadb:10
restart: unless-stopped
volumes:
- ./data:/var/lib/mysql
environment:
TZ: America/Guayaquil
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
proxy_external:
external: true
Secrets¶
Make sure to create a .env
file with the following structure:
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=
IGDB_CLIENT_ID=
IGDB_CLIENT_SECRET=
ROMM_AUTH_SECRET_KEY=
ROMM_AUTH_USERNAME=
ROMM_AUTH_PASSWORD=
DOMAIN_ROMM_LOCAL=
DOMAIN_ROMM_VPN=
Note
Make sure to change AUTH_SECRET_KEY
to a custom secret value. You can generate this with openssl rand -hex 32
. Also replace AUTH_USERNAME
and AUTH_PASSWORD
to something secret.
Note
Make sure to change IGDB_CLIENT_ID
and IGDB_CLIENT_SECRET
with a client ID and secret generated from twitch.tv.
Reverse Proxy¶
This service is exposed by a reverse proxy. More specifically, it is using Traefik.
For this reason, you will see that this service has:
- A directive to connect it to the
proxy_external
external network. - A container alias for the
proxy_external
network. - A number of labels with names starting with
traefik
.
If you're not using a reverse proxy, feel free to remove these from the docker-compose.yml
file. Keep in mind you might need to bind the ports to connect to the service instead.
Running¶
Start up the service with:
docker compose up -d
That's it! The service will auto-start on system startup and restart on failure.