Skip to content

Instantly share code, notes, and snippets.

@perryBunn
Last active March 6, 2018 20:44
Show Gist options
  • Save perryBunn/78cc64792db3de6a90add0babe0e880f to your computer and use it in GitHub Desktop.
Save perryBunn/78cc64792db3de6a90add0babe0e880f to your computer and use it in GitHub Desktop.

Factorio gcloud server

I struggled setting up a server so i figured i write a gist to help me in the future/anyone wanting to set one up too. I do not recomend that you run the server as root. yes there are better ways to do this but this was what i did and it works.

create the vm

self explainatory.

update and grab dependancys

sudo passwd

enter what ever password you want for

su root
apt-get update || apt-get upgrade
apt-get install glibc-source

create factorio files and configs

wget --content-disposition https://www.factorio.com/get-download/latest/headless/linux64
tar xf factorio <tab to autocomplete>

cd factorio/data
cp server-settings.example.json server-settings.json
nano server-settings.json

make all of the changes that you want to the server-settings

cp map-gen-settings.example.json map-gen-settings.json
cp map-settings.example.json map-settings.json

you dont have to change anything in these files if you dont want to they are just there as the settings to generate the world.

create a new world

cd ~/factorio
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings ./data/map-gen-settings.json --map-settings ./data/map-settings.json

start the server and load the world

./bin/x64/factorio --start-server <file> --server-settings ./data/server-settings.json

after your first run you can use

./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json

thats it you should be able to connect to your server now through the server browser or direct connecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment