Page 1 of 2

Factorio Update Helper (an aid for headless server owners)

Posted: Sat Aug 08, 2015 11:26 am
by Narc
I didn't want to (yet again) download the full Factorio Linux64 package and throw it up to my server, so I wrote a script to fetch the updates for me.

Figuring that others might also like it, I've put it up on Github. The README should be reasonably comprehensive (though feel free to let me know if it needs more, as long as you're not asking for a whole tutorial on setting up Python or the like).

It's not much more than four hours of work, so there are bound to be plenty of rough edges, but you can probably make it work for you with a minimum of thought.


Download
Just the script, or the full package.


License
The Factorio Update Helper is released under the MIT license, meaning you can do whatever you like with it as long as my name stays on it somewhere.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sun Aug 09, 2015 4:54 pm
by Bisa
nice one, I've just edited my update from yesterday ;) https://forums.factorio.com/forum/vie ... 097#p99097

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sun Aug 09, 2015 5:04 pm
by Narc
Bisa wrote:nice one, I've just edited my update from yesterday ;) https://forums.factorio.com/forum/vie ... 097#p99097
Heh. Yeah, getting Factorio to apply the update is almost certainly better than blindly extracting -- I believe the update packages include instructions for deleting obsolete files, which otherwise would get left behind; this was a problem for me when manually updating to 0.12.0 when it came out (some of the files in 0.11 got renamed/deleted).

Feel free to integrate the update helper directly into your init script; if you keep the updater username and token in your config file, you can just pass those automatically; combine with having the updater output to a controlled directory, and you can get pretty complete automation in place.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Mon Aug 10, 2015 7:52 am
by Bisa
And there we go, thnx a bunch - keep scripting! ;)

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Nov 21, 2015 10:52 am
by Bisa
*bump* This topic ain't seein nuff views - this is a wonderful piece of code :)

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Mon Nov 23, 2015 1:42 am
by JyeGuru
Narc wrote:1 API key was invalidated during the development of this script.
I love this comment. :)

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sun Feb 28, 2016 11:44 am
by lordfiSh
steam version has no api key inside the json
Would use steamcmd to update the game, but it require you to be signed it :?

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Mon Mar 07, 2016 1:35 pm
by Narc
lordfiSh wrote:steam version has no api key inside the json
Would use steamcmd to update the game, but it require you to be signed it :?
Indeed, there was really no way to fix this from my end, but thankfully Tomas (aka slpwnd) took a hand in the situation so now the script should just work without needing the updater username or token -- as long as you only need the headless server updates.

I took the liberty to update the documentation regarding this new development (as well as bring the --help output in line), but there should be no need to update if you have a copy of the script already.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Fri Mar 25, 2016 8:21 pm
by gloix
It seems that the factorio servers don't keep updates for older versions. One is forced to always keep the game to the latest version, otherwise a case like mine can occur.

I have headless version 0.12.26 and the current update is for 0.12.28 to upgrade to 0.12.29. I guess I'll have to manually update :|

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Fri Mar 25, 2016 11:32 pm
by Bisa
gloix wrote:It seems that the factorio servers don't keep updates for older versions. One is forced to always keep the game to the latest version
I'm planning to implement a type of install command to my init script, but without the "latest" version on an accessible link it's a bit finnicky - if you would like to see this supported may I suggest you show some love in viewtopic.php?f=6&t=22210

(this feature would essentially allow you to do "clean install" or "force latest version" alleviating the need to "update manually" )

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Mar 26, 2016 4:01 pm
by gloix
Done!

Also... how will the init script update functionality differ from the update script by Narc if the latest-version-url-thingy is done? (in terms of updating functionality).
That is to say, why would I prefer one over the other?

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sun Mar 27, 2016 1:03 am
by Bisa
gloix wrote:Done!

Also... how will the init script update functionality differ from the update script by Narc if the latest-version-url-thingy is done? (in terms of updating functionality).
That is to say, why would I prefer one over the other?
the init script relies on narcs updater - the "force latest version" would probably just delete the factorio folder (retaining conf/saves etc) then download the tar from /latest/, not sure how I'm going to do that yet.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Wed Apr 13, 2016 10:50 am
by Khossus
Seems like it won't work for now..

Code: Select all

1.220 Info Updater.cpp:752: Downloading https://www.factorio.com/updater/get-available-versions?username=myemail@address&token=<private>&apiVersion=2
   2.351 Download failed (status 500; Connection to the authorization server failed.)

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Wed Apr 13, 2016 2:10 pm
by daniel34
Khossus wrote:Seems like it won't work for now..

Code: Select all

1.220 Info Updater.cpp:752: Downloading https://www.factorio.com/updater/get-available-versions?username=myemail@address&token=<private>&apiVersion=2
   2.351 Download failed (status 500; Connection to the authorization server failed.)
Probably the same as this bug: viewtopic.php?f=7&t=23592

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Fri Apr 15, 2016 9:42 pm
by TheHalfwayXBray
does anyone know how to kick and ban people from your dedicated server and if not are there any mods to do so?

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Fri Apr 15, 2016 10:09 pm
by daniel34
TheHalfwayXBray wrote:does anyone know how to kick and ban people from your dedicated server and if not are there any mods to do so?
At the most you can do is get their IP from the log files and disable access using a firewall/iptables (blacklisting).
Or invite players by only giving them your IP/Port or enabling for them to join using firewall/iptables (whitelisting).

0.13 should bring some improvements.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Apr 16, 2016 3:25 am
by TheHalfwayXBray
cant wait for .13 because running a public server without an easy way to ban people is a nightmare and keeps you worried at all time

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Apr 16, 2016 6:25 am
by Bisa
TheHalfwayXBray wrote:cant wait for .13 because running a public server without an easy way to ban people is a nightmare and keeps you worried at all time
My experience so far running a public server since ~June last year:
- auto saves, keep as many auto saves as you are comfortable with being "away" from the server, that way you can always revert to a known good state
- mods, it has a small but noticeable effect on the amount of random idiots entering your server (I prefer vanilla+ mods myself to keep the experience as close to and even better as vanilla factorio)

This beeing said, yea I long for the authentication changes hinted about in the other weeks FFF :)

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Apr 16, 2016 1:15 pm
by daniel34
Bisa wrote:auto saves, keep as many auto saves as you are comfortable with being "away" from the server, that way you can always revert to a known good state
Note that clients copy the autosave settings. If you set it to 100 autosaves, the clients will also store the same number. I did this and later reverted it after I found that out, because I didn't want to be the reason for 2GB (20MB x100) of storage on the clients playing on my server.

Re: Factorio Update Helper (an aid for headless server owners)

Posted: Sat Apr 16, 2016 4:38 pm
by Bisa
daniel34 wrote:
Bisa wrote:auto saves, keep as many auto saves as you are comfortable with being "away" from the server, that way you can always revert to a known good state
Note that clients copy the autosave settings. If you set it to 100 autosaves, the clients will also store the same number. I did this and later reverted it after I found that out, because I didn't want to be the reason for 2GB (20MB x100) of storage on the clients playing on my server.
I know, however, I rather have a persistent world =P ppl can always delete saves fromt he folder ;)