No description
  • Go 95.3%
  • Python 3.7%
  • Shell 0.8%
  • Dockerfile 0.2%
Find a file
2026-04-26 17:52:11 +02:00
.tangled/workflows ocw sc upload 2026-04-26 17:52:11 +02:00
api ocw sc upload 2026-04-26 17:52:11 +02:00
config ocw sc upload 2026-04-26 17:52:11 +02:00
db ocw sc upload 2026-04-26 17:52:11 +02:00
examples ocw sc upload 2026-04-26 17:52:11 +02:00
nex ocw sc upload 2026-04-26 17:52:11 +02:00
orm ocw sc upload 2026-04-26 17:52:11 +02:00
ryujinx ocw sc upload 2026-04-26 17:52:11 +02:00
scripts ocw sc upload 2026-04-26 17:52:11 +02:00
util ocw sc upload 2026-04-26 17:52:11 +02:00
.dockerignore ocw sc upload 2026-04-26 17:52:11 +02:00
.gitignore ocw sc upload 2026-04-26 17:52:11 +02:00
.gitmodules ocw sc upload 2026-04-26 17:52:11 +02:00
docker-compose.yml ocw sc upload 2026-04-26 17:52:11 +02:00
Dockerfile ocw sc upload 2026-04-26 17:52:11 +02:00
go.mod ocw sc upload 2026-04-26 17:52:11 +02:00
go.sum ocw sc upload 2026-04-26 17:52:11 +02:00
main.go ocw sc upload 2026-04-26 17:52:11 +02:00
README.md ocw sc upload 2026-04-26 17:52:11 +02:00

OCW Game Server

Open Course World

Open Course world is a Course World server that is compatible with Super Mario Maker 2. To play levels, you can connect through the Ryujinx emulator or a Switch modded with Atmosphère. Alternatively, you can use the website to set up a maker account, browse makers and courses, or import and manage your own courses with our import tool.

Game Server

Code that makes up the Super Mario Maker 2 compatible server.

Set up a dev environment

Documentation of the configuration options can be found in scripts/defaults.sh. Each of these can be overridden using the syntax VAR=value in a .env file, or overridden in your environment by other means, such as direnv.

The Database

We use CockroachDB for our database, which should be run through Docker. Once you have set up docker, run:

./scripts/db-start.sh

to start the docker container for the database.

To restore a backup from production to your local database, you will need an AWS access key and secret. Put these in your .env:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

and run ./scripts/db-restore-aws.sh from the project root.

Auth

In order to log in via Twitch and/or Discord, you will need to obtain client secrets from the team. Add them to your .env:

export DISCORD_CLIENT_SECRET=...
export TWITCH_CLIENT_SECRET=...

The App

Once the database is running, run the app with ./scripts/app.sh:

$ ./scripts/app.sh

Once you have your server running, you can point your frontend to the http url configured in your env - by default, http://localhost:6001.

Connecting Ryujinx

In order to connect Ryujinx to your local server, you must build a version yourself with SSL verification patched out. This is available on our Ryujinx fork, which we try to keep reasonably up to date. Alternatively, the patch can be found in this repository at ryujinx/ryujinx_disable_ssl_verify_for_local_testing.patch.

Game Client Mod

client-mod and releases

Setup

Before we get running with docker, you will need to:

  • Install Docker.
  • Create a file in the project called .env - you can place config overrides here.
  • Open a terminal and cd or dir into the project root.

Running

  • Build the containers with docker compose build.
  • Run docker compose up and all the services will start.
  • To restart, quit the server using Ctrl-C and run both the above commands again.
  • For faster restarts, it's recommended to run the db in a separate terminal with docker compose up db. You can then run the app with docker compose build app and docker compose run app. Run both commands to restart when you've made code changes.

Scripts

  • To run scripts, use docker compose exec app bash, or docker compose exec app ./scripts/some-script.sh.
    • For example, to run a database console, use docker compose exec app ./scripts/db-console.sh
    • To print ocw-config.json for the dev user, use docker compose exec app ./scripts/ocw-api.sh ocw-config.json
    • You can do similar for other scripts documented above.
  • If the app isn't running, use docker compose run --rm in place of docker compose exec. This will create a temporary container for running scripts in.