Here’s the situation:
I set up the server for the first time on version 20.0.10. I tried configuring it according to the Factorio Multiplayer wiki, and the server always shows up in the "public games" list. However, more often than not, the server is unreachable. When this happens, I try stopping and starting the service, rebooting the server, and manually restarting the server. After some time, it might just start working again, though I’m not sure what triggered it.
I suspect the issue could be related to how I’ve set up the server, as I’m not an experienced Linux server admin, but I don’t know for sure. The server is also running other services.
I’ve created a script that runs nightly to check for updates. Here’s what it looks like:
Code: Select all
# Stop the Factorio service
sudo systemctl stop factorio.service
sleep 5
# Switch to the Factorio user
sudo su - factorio <<'EOF'
sleep 5
# Set the directory
cd /home/factorio
sleep 5
# Download the latest version as a temporary file
wget -O factorio_latest.tar.xz https://www.factorio.com/get-download/latest/headless/linux64
sleep 5
# Check if the new download is identical to the existing version
if cmp -s factorio_latest.tar.xz factorio.tar.xz; then
sleep 5
echo "No new update available. Exiting."
rm factorio_latest.tar.xz
sleep 5
else
# New update found; replace the old file and update Factorio
mv factorio_latest.tar.xz factorio.tar.xz
sleep 5
tar xJvf factorio.tar.xz
sleep 5
echo "Factorio has been updated to the latest version."
fi
# Exit from Factorio user
EOF
sleep 5
I cannot see a reason why it shouldn't work, as was hoping for some help here. Don't make me go back to Windows!