How to update a Valheim dedicated server on Linux? Valheim, the popular Viking-themed survival game, has taken the gaming community by storm. For those hosting their own dedicated servers on Linux, keeping the server up to date is crucial for ensuring compatibility with the latest game features, bug fixes, and security patches. This guide will walk you through the steps required to update your Valheim dedicated server on a Linux system, ensuring a smooth gaming experience for you and your fellow Vikings.
1. Preparing Your Server for Update
Before diving into the update process, it’s essential to take some preparatory steps to avoid potential issues.
a. Backup Your Server Data
- First and foremost, create a backup of your server’s world data. This make sure that you have a safety net in case anything goes wrong during the update process.
- To back up your server data, navigate to your Valheim server directory. Typically, this can be found in:
javascript
Copy code ~/.config/unity3d/IronGate/Valheim
- Copy the entire folder to a safe location, such as an external drive or a cloud storage service.
b. Notify Players
- Inform the players on your server that it will be going offline for maintenance. This prevents any potential data loss from players trying to connect during the update process.
2. Stop the Valheim Server
- Before you can update your server, it’s essential to stop it from running. This can be done using the following order:
arduino
Copy code sudo systemctl stop valheimserver.service
- If you’re not using systemd, you might need to stop the server manually by identifying the process and killing it:
perl Copy code ps aux | grep valheim kill <PID>
3. Updating SteamCMD
SteamCMD is the tool used to download and update Valheim on your Linux server. To ensure a smooth update, first, update SteamCMD itself.
a. Navigate to Your SteamCMD Directory
- Open your terminal and navigate to the SteamCMD directory, where SteamCMD is installed. This is typically located in your home directory or another specified location:
bash Copy code cd ~/steamcmd
b. Update SteamCMD
- Run SteamCMD to ensure it’s up to date:
bash Copy code ./steamcmd.sh
- SteamCMD will automatically check for updates and install them if available. Once it’s updated, you’ll see a command prompt where you can proceed with updating the Valheim server.
4. Updating the Valheim Server
Now that SteamCMD is updated, you can proceed with updating your Valheim dedicated server.
a. Log in to SteamCMD
- You’ll need to log in to SteamCMD with an anonymous account:
Copy code login anonymous
b. Set the Installation Directory
- Specify the directory where Valheim is installed. Replace /home/user/valheim with the correct path to your Valheim installation:
arduino Copy code force_install_dir /home/user/valheim
c. Update the Valheim Server
- Run the following command to download the latest server files:
Copy code app_update 896660 validate
- This command will ensure that your server is updated to the latest version. The validate flag checks the integrity of the files and re-downloads any that are missing or corrupted.
5. Start the Valheim Server
With the update complete, it’s time to start your Valheim server again.
a. Start the Server Using systemd
- If you’re using systemd, start the server with the following command:
SQL Copy code sudo systemctl start valheimserver.service
- Check the status to make sure it’s running correctly:
lua Copy code sudo systemctl status valheimserver.service
b. Manual Start
- If you’re not using systemd, navigate to your Valheim server directory and start the server manually:
bash Copy code cd /home/user/valheim ./start_server.sh
6. Verifying the Update
It’s essential to verify that your server is running the latest version to ensure compatibility with the updated game client.
a. Check the Server Log
- Open the server log file, typically located in the Valheim installation directory, to verify that the server started successfully and is running the latest version:
bash Copy code tail -f /home/user/valheim/valheimserver.log
b. Test the Server
Connect to your Valheim server using the game client to ensure everything is working correctly. Make sure all players can connect without issues and that no errors are present.
7. Inform Your Players
- Once the server is up and running, inform your players that the update is complete. You can do this via your server’s Discord channel, website, or any other communication method you use.
8. Troubleshooting Common Issues
Even with the best preparation, issues can sometimes arise. Here are some common problems & their solutions:
a. Server Not Starting After Update
- If your server fails to start after the update, check the log files for errors. Common issues include missing dependencies or file permissions problems. Ensure that all required dependencies are installed and that the server files have the correct permissions.
b. Players Unable to Connect
- If players cannot connect to the server, double-check that the server is running on the correct port and that your firewall settings allow traffic on that port. You may also need to update any custom server configurations to match the new version.
c. Rollback to Previous Version
- In rare cases, an update may cause significant issues. If needed, you can roll back to a previous version by restoring your backup files and re-running SteamCMD with the specific version number:
PHP Copy code app_update 896660 -beta <version> validate
Conclusion
Updating your Valheim dedicated server on Linux is a straightforward process, but it requires careful attention to detail to avoid disrupting your server’s operation. By following this guide, you can ensure that your server remains up to date, providing a seamless and enjoyable experience for all players. Remember to back up your data regularly, keep your software up to date, and stay informed about the latest changes in Valheim to maintain a thriving Viking world.
