Profile
Back to NewsBack
GitHub Trending 6 min
Reader Mode
Open-Historia/open-historia: An open source alternative to Pax Historia

Open-Historia/open-historia: An open source alternative to Pax Historia

16 hours ago

License & Copyright

Copyright (C) 2026 Open Historia

This project is licensed under the terms of the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See the LICENSE file for details.

Contributions are accepted under the Contributor Copyright Assignment Agreement, which assigns the copyright in contributions to the Open Historia Organisation. CLA Assistant asks you to sign it on your first pull request; see CONTRIBUTING.md.

Open Historia

An open-source, better alternative to Pax Historia.


Built with ❤︎ by contributors.




✨ Features

  • __interactive world map:__ watch territory, borders, and nations shift as history unfolds
  • __ai-generated events:__ dynamic events shaped by your decisions and the state of the world
  • __diplomacy:__ negotiate with AI-controlled nations through natural language chat — click any country to talk to it or get an AI intelligence briefing
  • __ai advisor:__ consult your advisor for strategic guidance, economic analysis, and situation summaries
  • __map editor:__ a full vector map editor (draw, split, merge, paint owners, cities) built into the scenario editor — build a world and hit Apply & Play
  • __troops:__ deploy, move and battle armies; deployments stay pending until the AI resolves them; scenarios control which troop types exist in their era
  • __scenario hub:__ browse, vote on and import community scenarios from the in-game Community tab, and publish your own
  • __self-hostable:__ run your own instance with your own AI backend completely offline

🚀 Play

In your browser

openhistoria.com — nothing to install. Games are saved in your browser, and you bring your own AI key (it goes straight to your provider, never to us). The world map is served by the community content-node network.

Local AI (Ollama, LM Studio) needs one extra step in the browser: the server has to allow the site's origin, e.g. start Ollama with OLLAMA_ORIGINS=https://openhistoria.com. The desktop app below needs no such setup.

Desktop (offline, single-player)

Download Open-Historia.zip (~186 MB — code and all map data), unzip it anywhere, then:

  • Windows: run Open-Historia-Setup.exe, then open Open Historia from the Start Menu
  • macOS: unzip and drag Open Historia to Applications (first run: right-click -> Open)
  • Linux: chmod +x Open-Historia-x86_64.AppImage and run it
The launcher checks Node.js, downloads the map data, installs dependencies, builds, and opens the game. To update an existing install later, run the matching newest installer from the downloads page and run it over the top - your saves while preserving your saves, scenarios, and map data.
[!TIP]
Run the launcher normally — it does not need (and works better without)
administrator rights: an elevated window gets the admin account's environment,
which can hide a Node.js that was installed for your own account.

Android app (thin APK)

Easiest: download open-historia.apk from the Android release and open it to install (allow installs from your browser when Android asks). It's a thin client: the game itself runs on whatever server it connects to, so you need one of the two:

  • A desktop on the same network running the launcher — type its address
(e.g. http://192.168.1.20:3000) into the app once; it's remembered.
  • Termux on the phone itself running the server — the app
finds it on first launch by itself, no address needed.

Build the APK yourself (needs the Android SDK)

cd mobile
npm install
npx cap sync android
cd android && ./gradlew assembleDebug   # gradlew.bat on Windows

The APK lands in mobile/android/app/build/outputs/apk/debug/. (Or open mobile/android in Android Studio and press Run.) Maintainers: the Build Android APK action in the Actions tab builds and republishes the release APK — run it after changing mobile/.

Manual

Prerequisites: Git and Node.js 22 LTS or newer (minimum 20.19 / 22.12 — the client build runs on Vite 7, which requires it).

git clone https://github.com/Open-Historia/open-historia.git
cd open-historia
node scripts/fetch-map-assets.mjs  # Download the world map data (see note below)
npm install                        # Install dependencies (includes OpenLayers etc. for the editor)
npm run build                      # Build the client
node server/server.js              # Start the server

Then open http://localhost:3000 in your browser.

[!TIP]
Running the server only — Termux/Android, a headless box, a NAS? Skip the
desktop-app tooling:
>
> npm install --omit=dev --omit=optional
>
> That drops Electron and its build chain (783 packages → 286) while keeping
everything the client build and the server actually need. On Android it is the
difference between working and not: Electron publishes no Android build, so its
install script exits with *"Electron builds are not available on platform:
android"*. A plain npm install still succeeds there — Electron is an
optionalDependency, so npm reports the failure and carries on — but there is no
reason to download it in the first place.
Note: the large map binaries (.pmtiles, public/assets/-seed.*, and
server/data/scenarios/default/regions.geojson) are not in the repo — they are
hosted as GitHub Release assets
and downloaded by scripts/fetch-map-assets.mjs. The launcher script for your platform
runs this for you automatically, so a plain ZIP download works too — no Git LFS needed.

🌍 Scenarios

Modern Day is the only built-in scenario. All other official presets — World War II — 1939, Medieval — 1200 AD, Rome — 117 AD, Mongol World — 1300 AD, New World — 1650, and Bronze Age — 1200 BC — live on the Scenario Hub, pinned at the top of the in-game Community tab. Import any of them with one click, or publish your own.

To rebuild an official preset from source (specs live in scripts/presets/):

node scripts/presets/build-preset.mjs scripts/presets/wwii-1939.spec.mjs

To regenerate the built-in Modern Day map: node scripts/build-default-map.mjs

🗺️ Map editor

Open any scenario's editor and click 🗺️ Open Map Editor (or visit http://localhost:3000/?editor=1 for the standalone editor). Draw regions, split and merge borders freehand, paint owners, import 70k cities, sign your map, then Apply & Play.

🖥️ Host a server node

Want to help the network? Run a content node on your own device to cache and serve the game's map data to nearby players so everyone loads faster. It's a one-click install and deliberately safe — a node only ever serves read-only, checksum-verified map files, and never touches anyone's games, accounts, AI keys, or code.

➡️ Set up a node → Open-Historia/open-historia-node

Your node registers itself and starts serving players once an admin accepts it. See the node README for the full walkthrough (including a free Cloudflare Tunnel to put it online).

Chat with me