Skip to content
The backend of OpenSpeedRun
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is the backend system of the OpenSpeedRun server software.

What is OpenSpeedRun?

OpenSpeedRun is an open source (AGPL licensed) server software suite for hosting speedrunning leaderboards.

OpenSpeedRun aims to provide the resources for individuals and organizations to host their own leaderboards for games.

The base server comes without a frontend; while we do provide an official frontend, OSR can be used headless to store time leaderboards for games directly.

We host an offical instance for general speedrunning at


Building OpenSpeedRun


To build this project, you first need a suitable D compiler installed.

We recommend the DMD compiler for debug builds and LDC2 for release builds.



OpenSpeedRun depends on the following C libraries and services:

  • OpenSSL
  • MongoDB

Make sure those are installed before building




The output of the builds are stored in the out/ directory.

If the directory doesn't exist, it will be created automatically.

The output will be called osr-server.


To build a debug build, run the folllowing

dub build

in the root directory of the project.


To build a release build, run the folllowing

dub build -b release --compiler=ldc2

in the root directory of the project.


Running OpenSpeedRun

Configuring the Server

OpenSpeedRun is configured via the osrconfig.sdl file, which should either be placed in the same directory as the executable or /etc/osr/osrconfig.sdl on POSIX complaint systems.

A new configuration file will automatically be generated if the server finds none.

Configuration is written in SDLang.


// Email Server Settings
smtp {

  // Email username
  username ""
  // Email password
  password ""

  // Email host
  host "localhost"

  // Email port
  port 25

  // Origin email field
  originEmail ""

// Authentication settings
auth {
  // Allow signups on the server
  allowSignups true
  // Enable 2-factor authentication system
  enable2FA true
  // Wether to require email verification
  emailVerification false
  // Max length of email
  maxEmailLength 72
  // Minimum length of email
  minUsernameLength 3
  // Maximum length of username
  maxUsernameLength 72
  // Minimum password length
  minPasswordLength 8
  // Maximum password length
  maxPasswordLength 1024
  // Google ReCaptcha Secret
  recaptchaSecret "Secret Here"
  // Google ReCaptcha Site Key
  recaptchaSiteKey "Site Key Here"

// The local address to bind the server to.
bindAddress ""

// The MongoDB database connection string
dbConnectionString "mongodb://"


Running the server (debug)

To build and run a debug build, run the folllowing


In the project's root directory.


Running the server (release)

It is recommended to (on Linux), run the server via a systemd unit. We also recommend installing osr in to /opt/osr as it's not a system package.

We won't provide Windows Server-specific instructions as Windows Server is not officially supported. The executable should build and run on Windows, but here be dragons.


Would be present in /etc/systemd/system/osr.service

Description=OpenSpeedRun Server



Remember to enable and start the server with

systemctl enable osr.service
systemctl start osr.service

These commands only need to be run once.

You can’t perform that action at this time.