How to Set Up a Sons of the Forest Dedicated Server on AnonVM Hosting

Sons of the Forest is a survival horror game that builds on the success of its predecessor, The Forest. Set in an open world, the game focuses on survival, crafting, and exploration in a mysterious forest inhabited by dangerous creatures. Hosting your own dedicated server allows you to have full control over your game world, host private sessions, and manage gameplay settings. In this guide, we will walk you through the process of setting up a Sons of the Forest server on an AnonVM VPS.

Prerequisites

Before proceeding with the setup, make sure you have the following:

  • A VPS from AnonVM with at least 4 GB of RAM and 2 CPU cores.
  • SSH access to your VPS.
  • Basic understanding of Linux commands.
  • SteamCMD installed on your VPS. If SteamCMD is not installed, refer to previous guides to set it up.

Step 1: Access Your AnonVM VPS

  1. Log in to your AnonVM account and access your VPS.
  2. Use an SSH client like PuTTY (on Windows) or your terminal (Linux/Mac) to connect to your VPS:
     
    ssh root@your-vps-ip
    Replace your-vps-ip with your actual VPS IP address. Enter your password when prompted.

Step 2: Install Required Dependencies

Before we can install the server, we need to install some dependencies.

  1. Update your system:

     
    apt-get update && apt-get upgrade -y
  2. Install necessary dependencies:

     
    apt-get install wget curl unzip screen lib32gcc1 -y

These dependencies are required to run the server smoothly on your VPS.

Step 3: Install SteamCMD

SteamCMD is the tool we will use to download the server files for Sons of the Forest.

  1. Create a directory for SteamCMD:

     
    mkdir -p /home/steam cd /home/steam
  2. Download and extract SteamCMD:

     
    wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz
  3. Verify the installation:

     
    ./steamcmd.sh

    This command should launch SteamCMD. Once it opens, type quit to exit.

Step 4: Download the Sons of the Forest Server Files

  1. Log in to SteamCMD: Open SteamCMD and log in using the following command:

     
    ./steamcmd.sh login anonymous
  2. Set the installation directory: We need to specify the directory where the server files will be installed:

     
    force_install_dir ./sons_of_the_forest_server
  3. Download the server files: Run the following command to download the Sons of the Forest dedicated server files:

     
    app_update 1950430 validate

    This command will download the server files for Sons of the Forest. The process may take some time, depending on your internet speed and the server's performance.

Step 5: Configure the Server

Once the server files have been downloaded, it’s time to configure the server.

  1. Navigate to the server directory:

     
    cd /home/steam/sons_of_the_forest_server
  2. Modify the server configuration file: The configuration file for the server can be found in the directory. You’ll need to adjust several parameters to customize the server settings.

    Open the configuration file using a text editor like nano:

     
    nano server.cfg

    Some key settings to adjust:

    • ServerName: Set your server’s name here.
    • MaxPlayers: Set the maximum number of players allowed to join the server (e.g., MaxPlayers=8).
    • Password: If you want to password-protect the server, set a password in the Password field.
    • Port: The default port is usually 7777. Ensure that this port is open on your VPS.

    Save and exit the editor by pressing CTRL + X, then Y to confirm the changes.

Step 6: Open Required Ports

To allow players to connect to your server, you need to open the required ports.

  1. Open the default game port (7777):

     
    ufw allow 7777/tcp ufw reload
  2. Additional ports: If necessary, open the ports for server management or other game services, such as 7778:

     
    ufw allow 7778/tcp ufw reload

Step 7: Start the Sons of the Forest Server

Now that everything is configured, it’s time to launch the server.

  1. Start the server in a screen session: Running the server in a screen session will allow it to keep running in the background even if you disconnect from SSH:

     
    screen -S sons_of_the_forest
  2. Start the server: Run the following command to start the server:

     
    ./SonsOfTheForestServer.x86_64
  3. Detach from the screen session: You can detach from the screen session without stopping the server by pressing CTRL + A, then D.

  4. Reattach to the session: If you need to interact with the server again, use the following command to reattach:

     
    screen -r sons_of_the_forest

Step 8: Connect to Your Server

To connect to your server, follow these steps:

  1. Launch Sons of the Forest on your game client.
  2. Go to the Multiplayer section and click on Join Game.
  3. Enter your VPS IP address followed by the port number (e.g., your-vps-ip:7777).
  4. If the server is password-protected, you will be prompted to enter the password you set earlier.

Step 9: Update the Server

To keep your server updated with the latest patches and fixes, use SteamCMD to check for updates periodically.

  1. Log in to SteamCMD:

     
    ./steamcmd.sh login anonymous
  2. Update the server:

     
    force_install_dir ./sons_of_the_forest_server app_update 1950430 validate

    This will update your server to the latest version.

Conclusion

Your Sons of the Forest dedicated server is now up and running on your AnonVM VPS! You can invite your friends to join the server, adjust gameplay settings, and explore the depths of the forest together. With full control over the server, you can customize your gaming experience, host mods, and more.

Enjoy hosting your own Sons of the Forest server and have fun exploring, surviving, and crafting in the dangerous world of the forest!

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution