Hi, in this tutorial I would like to show you how to create a One hour one life server. If you ever wanted to play this game on your private server. After this tutorial, your server should be up and running :)
To create server, we will use a linux operating system. In my case I will use ubuntu 16.04 server. We need to get some tools to compile server for our usage.
All you need is in this case linux server. You can get it by buying VPS for few bucks.
Below you can find command which will download all required tools to build executables.
Type this in console and press enter
sudo apt-get install git g++ imagemagick xclip libsdl1.2-dev libglu1-mesa-dev libgl1-mesa-dev
additionally, we will need screen software to make server run in background. You can install it like that:
sudo apt-get install screen
Once you get all required libraries and tools, we need to download source files which we got when we bought the game.
The url to site with source code should look like following:
It should look like that:
We need file called
We can download it using command wget:
sudo wget http://download6.onehouronelife.com/downloads/OneLife_Live4_UnixSource.tar.gz
Of course link can change so you need to copy it for yourself. If you downloaded server files, we need to extract them using this command:
sudo tar xzf OneLife_Live4_UnixSource.tar.gz
Once files are extracted, you need to go to folder containing all we need using command:
Now, we need to execute script which will get and compile everything we need like that:
Above script will get source code of a game from github repository so it will take a while and also it has to compile everything.
After it's done we have basically a compiled game. It will be needed to create our first server.
Next step is to go to server files using command:
It means that we go from folder OneLife_Live4_UnixSource to folder OneLife and then folder server.
Now we have to compile our server files using command:
We should see something like that
Our choice is probably linux if not, choose as you need.
After that we have to execute:
And almost last step is to link some game files to server files using commands line by line:
sudo ln -s ../../OneLifeData7/objects . sudo ln -s ../../OneLifeData7/transitions . sudo ln -s ../../OneLifeData7/categories .
Now, finally we can run our server like that:
If you did everything correctly, you should see something like this:
Now, to connect as player, we have to set server ip and enable custom server connection in player configuration.
First, we have to go to our game "one hour one life" files located on our PC or other hardware we got.
Next is to find
settings folder. And in that folder, we need file called
customServerAddress.ini. This file we just edit using software like notepad or other text editor. We should see localhost address. We change it to ip of our server. After we save it and close it.
Next file which we need to change is called
useCustomServer.ini. There should be number
0. When we change it to
1, game will connect directly to our server.
If we changed server port, then we have to change it in game file called
Last setting we might want to change is when our server wants password. If so, we have to set it in file called
If we did all described above, we are ready to go.
Let's run our game on our computer and click login using our credentials. We should be on the server and our console should look like this:
Success, we created our server and it works :)
If you want to change server port, let's get back to server console.
First, let's turn off our server. It's not in background yet, so just use shortcut
ctrl + d which turns off server.
We should be in path
We have to go to folder called
settings using command:
Now, let's find files
Names of files are self-explaining, so I will talk only about enabling server password. If you want to enable server password, head to file called
requireClientPassword.ini set value to
1 instead of
0 and set your password in file
clientPassword.ini. After those steps, you configured all basic configurations.
Now we want to use screen software to run server process in background. It means that server will not turn off after we close a terminal (console).
Let's head back to folder called
server. If we are in folder settings, we can go back using command:
Now let's run the server in the background using command:
sudo screen -dmS oneliveserver ./OneLifeServer
After using this command, our server process is in background mode. To attach to server process, type:
screen -r oneliveserver
Above command will bring you back to your "One hour one life" server console. To back into background mode, you need to use shortcut key
ctrl + a and
ctrl + d. It will detach server process and put it into background mode so it will run still.
I guess that's all you need to know to make "One hour one life" server up and running.
All links used to make this tutorial possible:
If you like my work contribution to steemit, vote on me here:
https://steemit.com/~witnesses with nick