Page 1 of 1

Headless Server - How to enable automatic updates

Posted: Fri Jun 02, 2017 11:50 am
by owlowlowl
Hi All,

I have done some searching on google, reddit and this forum and have not been able to find a solution to my problem.

I installed a server recently and have been playing on version 0.15.16 with no issues.

My client automatically updated to 0.15.18 so I am looking to update the server without having to reinstall it from scratch.

I edited

Code: Select all

/config/config.ini
to set

Code: Select all

 'enable-experimental-updates' 
to true, but when I launch the server i get the messages

Code: Select all

   0.268 Info Updater.cpp:751: Downloading https://updater.factorio.com/get-available-versions?username=XXXXXXXXXXXX&token=<private>&apiVersion=2
   0.788 Some core updates would be reachable if experimental updates were enabled.
   0.789 0 packages available to download (experimental updates disabled).
So, I quit the server and check on

Code: Select all

/config/config.ini
the enable experimental updates field has reverted back to false.

I then copied config.ini to a different directory and launched the server adding it's path using

Code: Select all

-c [ --config ] PATH
to the new path. The same thing happens and the new config.ini is overwritten and set to false.

I'm using

Code: Select all

sudo runuser -l factorio -c "/opt/factorio/bin/x64/factorio --server-settings /opt/factorio/data/server-settings.json --start-server-load-latest --port 34197"
to launch the server.

As this wasn't working, I then tried to update manually by adding

Code: Select all

--apply-update /home/factorio/factorio_headless_x64_0.15.18.tar.xz
to my launch parameters. I receive the following error:

Code: Select all

   2.144 Info Updater.cpp:382: Applying update /home/factorio/factorio_headless_x64_0.15.18.tar.xz
   2.144 Error Util.cpp:62: Error opening update package: Opening zip /home/factorio/factorio_headless_x64_0.15.18.tar.xz failed: Bad zip file
   2.152 Goodbye
The first strange thing is that the file is not a zip file. I guess this is because I'm trying to update using the full installer package downloaded from the factorio site. I then went to

Code: Select all

https://updater.factorio.com/get-available-versions?username=MYUSERNAME&token=MYTOKEN&apiVersion=2
to look for the update manually. there doesn't seem to be a 'from V0.15.16' 'to V0.15.18'.



So, if anyone can explain how i can a) enable automatic updates of experimental releases or b) provide a link to where i can get the update files from manually then I'm sure my problems will be fixed. I'm not running any mods. Thanks in advance...

Re: Headless Server - How to enable automatic updates

Posted: Fri Jun 02, 2017 11:58 am
by owlowlowl
Update, my first mistake was not removing the semicolon from the config file (doh!) so at least now we are getting the following:

Code: Select all

   0.989 2 packages available to download (experimental updates enabled).
   0.992 Factorio initialised
Sadly the server still isn't updating itself - does anyone know what arguments i need after

Code: Select all

--apply-update
to apply the update? The documentation is not clear.

Re: Headless Server - How to enable automatic updates

Posted: Tue Jun 06, 2017 2:20 pm
by AlienX
It looks like --apply-update needs a path to a zip file containing the new server binary and data files.

Re: Headless Server - How to enable automatic updates

Posted: Fri Aug 04, 2017 12:52 am
by Opiboble
Did you have any luck getting this going?

Re: Headless Server - How to enable automatic updates

Posted: Fri Aug 04, 2017 2:46 am
by inick
The updating process cannot skip versions, is probably packaged for full installs (not headless [unverified]), and seems to be impossible to google a URI for it.


If you're coming from (in any example, let's take yours) 0.15.16 to 0.15.18; the client would normally fetch 0.15.17, fetch 0.15.18 and apply both on client restart.
The file you're downloading (full install tarball) is not the same contents as the upgrade zip. I tore the upgrade zip apart once to just understand they're different, but not why.


You'll likely need to restart the server side anyway if the update thing does work. I haven't seen Factorio updates work without restarting the client yet.
HTH, Good luck.
--iNick