A perscriptive guide to run a private server. You'll need some basic idea of Git and Docker, but otherwise this guide should tell you exactly what you need to install and how to use it. Please create an issue if anything is unclear.
This guide will focus on 2HOL, but can very easily be translated to the OHOL option.
- Install Docker https://docs.docker.com/engine/install/.
- Open a command prompt.
- Enter
cd Documents
(Or your preferred save location). - Enter
git clone https://github.com/connorhsm/OneLifeDocker
to clone the repository. - Enter
cd OneLifeDocker
. - Enter
utils\start.cmd 2hol
to start the server.- Start up on Windows can take 5-60 seconds, wait for the message "Server listenting on port ....".
- Press
ctrl-c
to stop watching the output. It will continue running in the background.
- Stop the server
utils\stop.cmd 2hol
.- You can add
force
to kick all living players.
- You can add
- Open a terminal prompt.
- Clone repo
git clone https://github.com/connorhsm/OneLifeDocker
.- Optionally you can put this in any desired location.
- Enter
cd OneLifeDocker
. - Build and start a 2HOL server
utils/start 2hol
. - Stop the server safely
utils/stop 2hol force
.
Use your regular 2HOL client.
- Open your client.
- Open settings.
- Enable "Use custom server".
- Enter custom server address
localhost
. - Enter custom server port
8006
.
When the game is updated, you'll need to rebuild the server.
- Windows:
utils\build 2hol
. - Linux:
utils/build 2hol
. - Start the server as above.
Either use Patches (see below) before the first build of the server or edit settings files found in 2hol-data/settings/
.
See detailed description as in README.md.
Small changes that can be made to the server, which then requires a rebuild. Examples can be found in docker/2hol/OneLife/examples/
.
Apply these with:
- Windows
move docker/2hol/OneLife/examples/xyz.patch docker/2hol/OneLife/
- build
- Linux
cp docker/2hol/OneLife/examples/xyz.patch docker/2hol/OneLife/
utils/build 2hol
- Windows:
rmdir 2hol-data
- Linux:
sudo rm -rf 2hol-data
Create a new issue and let me know!