So me, my little brother and my big brother had this vision of a Factorio server that would be constantly running even if no one was connected. So I sacrificed an old laptop to run Headless Factorio server and bought a mobile internet thingy (because they are cheap) and we started our journey. The thing with the mobile internet tho was that it sometimes changed IP address so I had to post status updates (that is, the new IP) to our whatsapp group. Getting tired of doing it manually I decided to write a program that would upload the new IP address automatically to a website that would have a static IP. All was fine until we decided to install some mods which resulted into Factorio server to crash occasionally which again meant that I had to manually restart the server everytime it did.
...And then the map got bigger which meant that the caching-up phase got intolerable (as map download took longer). And server-settings.json didn't have any options to pause the server when a peer was connecting. So the program I initially wrote for a quick dirty fix got bigger and I got carried away.
So now that it works somewhat I decided I would share this program for all those who want it for similar reasons. Source code included.
Features
- Able to read console output and send input as well
- Restarts server if it crashes
- Able to pause the server when a peer is connecting, greatly reducing catching up phase
- Can write commands in-game to control the server
- Able to bind to public IP address to work as a server program that even has a GUI and can potentially be controlled from a website
- Able to to periodically connect to a selected web page so that e.g IP information can be uploaded
- Able to take real-time screenshots to send thru web page if requested (of the server interface, to see if the computer messed up, it can't take in-game screenshots)
Static Website:

Web interface:

In-game:

Download: http://www.mediafire.com/file/8wtrvjklz ... o.zip/file
Instructions
1. Unzip the file
2. Edit startup.cmd and change --start-server-load-latest "FACTORIO MULTIPLAYER 0.17.zip" to match your map file
3a. If you want to send IP information to a static web site then edit host.txt and write the host name in there (www.example.com)
3b. Upload the folder servu to the web site you wrote to host.txt
4. Run Connector.exe. You can access its server interface from the link from of your <yourhost>/servu website.
5. If you wish to change the program's behavior edit Connector.cpp and compile it.