Page 1 of 2

Full headless server setup guide

Posted: Tue Jan 03, 2017 4:04 am
by Liemander
I created a guide on how I set up my server for Factorio.
It is a full guide from beginning to end including installing Ubuntu.

It includes the information you will need to set up multiple Factorio servers running on one Ubuntu server.
I have verified it works with 0.14.21
https://1drv.ms/w/s!Am6ec-B57UlIhCKUYiGeTWu_R-DO

Let me know if there is anything I missed or should Add.

Re: Full headless server setup guide

Posted: Thu Jan 05, 2017 1:19 am
by noliVe
its insane to teach how to set up a ubuntu server for new players way to much Info. ;D still a worth praise for this work. congrats!

I read through and learnd some new commands i can use. Thank you!

Re: Full headless server setup guide

Posted: Thu Jan 05, 2017 6:20 am
by impetus maximus
would anything need to be changed to do this in Debian?

Re: Full headless server setup guide

Posted: Thu Jan 05, 2017 1:28 pm
by Liemander
impetus maximus wrote:would anything need to be changed to do this in Debian?
Ubuntu is based on Debian, I have not personally used Debian so I can only guess but you may need to install the software these commands use before you can use them. you may also be able to accomplish the same things with a different command.
noliVe wrote:its insane to teach how to set up a ubuntu server for new players way to much Info. ;D still a worth praise for this work. congrats!

I read through and learnd some new commands i can use. Thank you!
I was thinking the same thing when I finished up the guide but hadn't thought much about how to make it better, what do you think about breaking it up into multiple guides, one for just how to set up the Factorio server with a link back to how to set up Ubuntu if they don't have it set up yet?

I think the Ubuntu information isn't too hard since it does most of the work for you, mostly just next next next.

Re: Full headless server setup guide

Posted: Fri Jan 06, 2017 8:59 pm
by noliVe
one for just how to set up the Factorio server with a link back to how to set up Ubuntu if they don't have it set up yet?
I want you to write for my projekt .. get my first forum page cleaner and in better grammar. please?

Re: Full headless server setup guide

Posted: Wed Mar 15, 2017 5:03 pm
by Bisa
If you are still around to update this - look into using the "latest" link instead of having the user figure out which version to use, it's probably the latest any way? https://www.factorio.com/get-download/l ... ss/linux64 (also, a shameless self promote - the factorio init script I'm maintaining has a pretty straight forward install option if you want to simplify the process for your readers even more)

Re: Full headless server setup guide

Posted: Wed Mar 15, 2017 7:49 pm
by Liemander
I plan to split out the ubuntu setup from the factorio setup and update the document to 0.15 when it comes out.
I can make this part of the update.

Re: Full headless server setup guide

Posted: Wed May 24, 2017 2:48 am
by hyspeed
Hi,

Have you made any progress on your update?

I plan to install a server over the upcoming holiday weekend (US).

thanks,
jon

Re: Full headless server setup guide

Posted: Sun Jul 09, 2017 7:42 am
by gromit83
This guide works well.

Only 2 things I needed to change for latest 0.15

the settings file needed to be in the root folder (/opt/factorio, not /opt/factorio/data)

and point 7 at page 24 needed the exclude the pointer for the settings file. so the startup command looks like this

Code: Select all

/opt/factorio/bin/x64/factorio --start-server-load-latest –Port 34197
Also the systemctl daemon crashes on every startup. Don't know why. Still looking into that.

EDIT:

Found it out. It is because the server tries to start factorio before the server has an IP adress and is available to communicate with the factorio Auth server. If it failes to recieve a token from auth.factorio.com the server fails.

The systemctl script on page 25-26 needs to add 2 more lines under [Unit]. These lines tell the systemctl daemon to wait for a working IP connection before it starts the headless server. Look below

Code: Select all


[Unit]
Description=Factorio Headless Server
Wants=network-online.target
After=network.target network-online.target

[Service]
Restart=always
Type=simple
User=factorio
Group=factorio

ExecStart=/opt/factorio/bin/x64/factorio --port 34197 --start-server-load-latest

[Install]
WantedBy=multi-user.target

Re: Full headless server setup guide

Posted: Fri Dec 15, 2017 3:09 pm
by skinner927
The document is gone! It was a great guide from what I remember. I should have made a local copy. :(

Edit: It seems there's some pretty good guides stickied to the top of the forum, I should have looked there first. Sorry for necroing this. :oops:

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 2:02 am
by EngineerFox
i hate to necro this post but, im having problems, im at the part where you install factorio on the server, i used the direct command "wget -O /tmp/factorio.tar.gz https://www.factorio.com/get-download/0 ... ess/linux6". but when i run the next command "sudo tar -xzf /tmp/factorio.tar.gz -C /opt" it does not seem to work. here is a screen shot of my terminal
c91367acc03672c4feb2f190c8c681e2.png
c91367acc03672c4feb2f190c8c681e2.png (42.05 KiB) Viewed 30546 times

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 2:16 am
by Liemander
it looks like the type of compressed file changed.
try sudo tar -xvf /tmp/factorio.tar.gz -C /opt
you may have to rename the file to .xz first but that may not be required.

I just verified this works and I updated the document.

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 5:45 am
by EngineerFox
Liemander wrote:it looks like the type of compressed file changed.
try sudo tar -xvf /tmp/factorio.tar.gz -C /opt
you may have to rename the file to .xz first but that may not be required.

I just verified this works and I updated the document.
i am still getting the error, i have tried changing factorio.tar.gz to factorio.xz and it did not work, i then changed it to factorio.tar.xz and it still did not work

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 5:53 am
by hyspeed
I recall having a similar problem.

I _think_ I re-zipped the file one a Windows PC to a .zip file so that it would be recognized by the unzip command.

jon

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 10:28 am
by EngineerFox
Alright, i got it working, here is what i had to do, i had to do

Code: Select all

wget https://factorio.com/get-download/0.16.51/headless/linux64
it downloaded as linux64 i then ran

Code: Select all

sudo tar -xvf /tmp/linux64 -C /opt
after that it unpacked everything just fine

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 11:33 am
by EngineerFox
8bdf22e872f20e8714be1f3bb9736b5d.png
8bdf22e872f20e8714be1f3bb9736b5d.png (11.1 KiB) Viewed 30519 times
I GOT A NEW ERROR, idk what happened, im a n00b with linux, but i know some things but just files and simple debuging other then that idk what to do next, thats the error, idfk what it means at this point

Re: Full headless server setup guide

Posted: Mon Jul 09, 2018 12:46 pm
by Liemander
It sounds like it doesn't recognize the json file.
Its easy to break the json file, make sure your not missing a quote or comma.

when adding admins make sure its looks like this
"admins": ["name1","name2","name3"]

the file should start with a { and end with a }
The rest of the file Every line should end with a comma except the last one.
all text should be wrapped in quotes except true/false "text"
true/false should be all lowercase
numbers do not need quotes

Re: Full headless server setup guide

Posted: Tue Jul 10, 2018 7:17 am
by EngineerFox
Well, i checked, and still to no prevail did it work here is my server settings, idk what is going on, i keep getting the same errors

Re: Full headless server setup guide

Posted: Tue Jul 10, 2018 11:43 am
by Dergonic
Did you try to remove last "," ? (After ""admins": ["EngineerFox"],")
This one is useless and might be the issue

Re: Full headless server setup guide

Posted: Tue Jul 10, 2018 12:32 pm
by Liemander
I reccomend using a site like https://jsonlint.com/
it will help you find the syntax issues.

Visibility has an extra , after "lan":true
Visibility is missing the , after the }

Admins has an extra , after it.

every {} indicates a group of name-value pairs. every pair should be separated with a , and the last pair shouldn't have a ,

Visibility is a name-value pair where the value is a group of name-value pairs so it needs a , after the }