This guide covers building OpenRCT2 from source on various Linux distributions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OpenRCT2/OpenRCT2/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Build Tools
You’ll need CMake 3.24+, a C++20 compiler (GCC 12+ or Clang 11+), and Ninja or Make.Required Dependencies
OpenRCT2 requires the following development libraries:- SDL2 development files
- libzip (≥1.0)
- zlib
- libpng (≥1.6)
- OpenSSL (≥1.0.0)
- libcurl
- FreeType2
- fontconfig
- ICU (libicu)
- zstd (libzstd)
Optional Dependencies
- FLAC (libflac)
- Vorbis (libvorbis, libvorbisfile)
- Ogg (libogg)
- OpenGL development files
- discord-rpc
- ccache (for faster rebuilds)
Installing Dependencies
Building OpenRCT2
Compile
openrct2 (the GUI) and openrct2-cli (the headless server).The build process will also generate required asset files (g2.dat, fonts.dat, palettes.dat, tracks.dat).Build Options
Creating a Portable Build
For a portable build that can be moved to any directory:$ORIGIN, allowing the binary to find libraries relative to its location.
Building for AppImage
For AppImage packaging:$ORIGIN/../lib for the AppImage directory structure.
Headless Build (Server Only)
To build only the headless server without GUI support:Static Linking
For a statically linked build:Building with Tests
Running OpenRCT2
After building, you can run OpenRCT2 directly from the build directory:On first run, OpenRCT2 will ask you to locate your RollerCoaster Tycoon 2 installation directory.
Using CCache
CCache can significantly speed up rebuilds. It’s enabled by default if detected. To install CCache:Troubleshooting
GCC Version Too Old
If your distribution provides an older GCC:Missing pkg-config Files
If CMake cannot find libraries:OpenSSL Link Errors
If you encounter OpenSSL linking issues:X11/OpenGL Errors
For headless systems or when OpenGL is causing issues:Native Packages
Several distributions offer pre-built OpenRCT2 packages:- Arch Linux:
sudo pacman -S openrct2 - Gentoo:
emerge games-simulation/openrct2 - NixOS:
nix-env -iA nixpkgs.openrct2 - Ubuntu PPA: Available from the nightly PPA
- Flatpak:
flatpak install flathub io.openrct2.OpenRCT2
Next Steps
- Building on WSL - Alternative method using Windows Subsystem for Linux
- Contributing - Guidelines for contributing code
- Development Setup - Setting up your development environment

