Multiplayer
Multiplayer in Unciv is based on simple save file up/download, which is why it is based on a free Dropbox account by default. However, a lot of people use this default, so it is uncertain if you'll actually be able to access it consistently. See Hosting a Multiplayer server for hosting your own server.
How to play
- Make sure you are all using the same multiplayer server (
Main Menu -> Options -> Multiplayer) - Let all players send you their user ID (
Main Menu -> Multiplayer -> Copy user ID).- (Optional) Add those user IDs to your friend list (
Main Menu -> Multiplayer -> Friends list).
- (Optional) Add those user IDs to your friend list (
- In
Main Menu -> Start new game, checkOnline multiplayeron the left. On the right, add more human players and input the user IDs of the players you want to play with. PressStart game!. - The game ID will be automatically put in your clipboard. (If you lost it, you can get it again from
Main Menu -> Multiplayer -> Copy game ID). Send this game ID to the other players. - The other players need to go to
Main Menu -> Multiplayer -> Add multiplayer gameand enter the game ID you just sent them. They can then join the game from this multiplayer screen.
Hosting a Multiplayer server
Due to certain limitations on Dropbox's API, with the current influx of players, we've many times reached the point that Dropbox has become unavailable.
Therefore, you can now host your own Unciv server on any computer that can run Java programs.
This guide is written for people with a moderate amount of technical knowledge about computer software and who are able to search the web to learn stuff they might not know. If you're completely new to this, you'll likely not be able to follow without some larger time investment to learn.
If you're proficient in server hosting, there's another how-to for you at the end.
How To
Before starting, you must have Node.js 20+ and pnpm 10+ installed, or Docker. The server is provided by the TypeScript UncivSrv, available as the server-ts/ submodule of this repository.
From the repository root, open a terminal, enter the submodule and start it:
cd server-ts
pnpm install
pnpm build && pnpm startIf you use Docker instead:
cd server-ts
docker compose up -d --buildYour server has now started!
To check if everything works, you can start Unciv on the same computer, go to "Options > Multiplayer", then enter http://localhost:11451 as the "Server address" and click "Check connection to server". You should now get a "Success!" result, which means it's working!
To connect with other devices outside your local network or to make your server accessible from the web, you'll need a real IP. If your ISP provides you with a real IP already, forward your server's port (default 11451) with your router, and your server would be exposed to the internet! In this case you can also use http://<your-real-ip-adress>:<your-forwarded-port>. For example, if you have the IP 203.0.113.1 and forwarded the port of your server to port 1234, your server can be accessed from the internet from the url http://203.0.113.1:1234. Additionally, since the HTTP protocol defaults to port 80, if you have forwarded your server to port 80, you wouldn’t need to specify any port. For example, if you forward the server's port to port 80 of your real IP, your server would be exposed to http://<your-real-ip> or in this case http://203.0.113.1.
On the other device, enter the URL to your server (http://<your IP address>:<your chosen port>), click 'check connection' from the new device, and if you get the same "Success!" result - congratulations, you're connected to the same server and can start a multiplayer game!
Please note:
- Devices not connected to the same server will not be able to participate in multiplayer games together
- In many places, your external IP address changes periodically. If that is the case, you either have to update the IP all the time or use something like a dynamic DNS service.
- To start your server from some special ports like
80or443, you would need admin privileges. If you want to use those ports, run PowerShell as admin. However, if you use port forwarding from a router, you really don't need to do this. You can start the server from port11451and forward it to80.
How To for people with hosting experience
- Have Node.js 20+ and pnpm 10+ installed (or use Docker)
- Get the UncivSrv sources (the
server-ts/submodule of this repository is a snapshot of it) - Configure it with a
.envfile — seeserver-ts/example.envfor the available options- Listen address/port, database path, registration mode (
open/approval/closed), chat toggle, etc. are all set in.env.
- Listen address/port, database path, registration mode (
- Run it:
pnpm build && pnpm start(usepnpm devwhile developing)- Storage is SQLite with automatic database migrations.
- Player passwords are stored as scrypt hashes rather than a plaintext file.
Third-party (unofficial) software for hosting your own Unciv server
- https://github.com/blyrin/unciv-srv (TypeScript, the
server-ts/submodule of this repository; most feature-complete) - https://github.com/Mape6/Unciv_server (Python)
- https://gitlab.com/azzurite/unciv-server (NodeJS)
- https://github.com/oynqr/rust_unciv_server (Rust)
- https://github.com/touhidurrr/UncivServer.xyz (TypeScript | Bun)
Third-party (unofficial) publicly hosted Unciv servers
These servers are run by the community and not official servers. These servers may become (temporarily or permanently) unavailable and lose your game saves. They might also collect data like your IP, how often you play, or other data. Use these only if you accept these risks and trust the server owners.
https://uncivserver.xyz/- Run by @touhidurrr on their Discord (Source Code)