Factorio Update Helper (an aid for headless server owners)
Factorio Update Helper (an aid for headless server owners)
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.
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)
nice one, I've just edited my update from yesterday https://forums.factorio.com/forum/vie ... 097#p99097
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
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).Bisa wrote:nice one, I've just edited my update from yesterday https://forums.factorio.com/forum/vie ... 097#p99097
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)
And there we go, thnx a bunch - keep scripting!
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
*bump* This topic ain't seein nuff views - this is a wonderful piece of code
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
I love this comment.Narc wrote:1 API key was invalidated during the development of this script.
Re: Factorio Update Helper (an aid for headless server owners)
steam version has no api key inside the json
Would use steamcmd to update the game, but it require you to be signed it
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)
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.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
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)
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
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)
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=22210gloix 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
(this feature would essentially allow you to do "clean install" or "force latest version" alleviating the need to "update manually" )
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
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?
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)
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.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?
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
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)
Probably the same as this bug: viewtopic.php?f=7&t=23592Khossus 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.)
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 15, 2016 9:36 pm
- Contact:
Re: Factorio Update Helper (an aid for headless server owners)
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)
At the most you can do is get their IP from the log files and disable access using a firewall/iptables (blacklisting).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?
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.
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 15, 2016 9:36 pm
- Contact:
Re: Factorio Update Helper (an aid for headless server owners)
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)
My experience so far running a public server since ~June last year: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
- 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
Hosting a factorio server? Take a look at this || init script ||.
Re: Factorio Update Helper (an aid for headless server owners)
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.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
Re: Factorio Update Helper (an aid for headless server owners)
I know, however, I rather have a persistent world =P ppl can always delete saves fromt he folderdaniel34 wrote: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.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
Hosting a factorio server? Take a look at this || init script ||.