An open source, free-to-play, Unciv multiplayer server written in TypeScript.
To run UncivServer.xyz locally, you would need:
- Git: If you are on Linux then Git should be installed by default. On Windows, install from here.
- Bun: Install from https://bun.sh/
- MongoDB: You can run a local MongoDB instance with
docker run -d --name some-mongo -e MONGO_INITDB_DATABASE=unciv -p 27017:27017 mongo. Alternatively, you can make a free MongoDB instance with the database nameuncivfrom here.
All of your data would be hosted at your MongoDB server. Now clone this project and open the
directory and make a file named .env.
git clone https://github.com/touhidurrr/UncivServer.xyz.git
cd UncivServer.xyz
# If running via docker, should be `echo "MONGO_URL=mongodb://localhost" > .env`
echo "MONGO_URL=<Your MongoDB URL>" > .env
# Required for sync tests to pass
echo "SYNC_TOKEN=$(openssl rand -base64 32)" >> .envNow run the following commands to start your server! By default, the server will start at
http://[::]:1557 (port 1557 on all ipv6 addresses), which you can access from http://localhost:1557 from your browser. However,
you can change this behavior setting PORT and HOST environment variables in the .env file you
just made. Note that both of these variables are optional.
bun run build
bun startTo start the development server run:
bun devDon't forget to lint, format, and test the code before submitting a pull request.
bun lint
bun format
bun test