How to Set Up a The Forest Server on AnonVM Hosting

The Forest is a popular survival horror game where players must navigate a mysterious forest after a plane crash, build shelters, fight off cannibals, and explore the environment. Hosting a dedicated server on AnonVM can provide a lag-free experience for you and your friends to enjoy the game in a private environment. This guide will show you how to set up your own The Forest server on a VPS hosted by AnonVM.

Prerequisites

Before we begin, ensure you have the following:

  • A VPS from AnonVM with at least 2 GB of RAM, 2 CPU cores, and 20 GB of disk space.
  • SSH access to your VPS.
  • Basic knowledge of Linux commands.
  • A stable internet connection to download server files and updates.

Step 1: Access Your AnonVM VPS

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

Step 2: Install Dependencies

You need a few essential packages to run The Forest server. Let’s install them first.

  1. Update your system:

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

     
    apt-get install wget curl screen lib32gcc1 -y

These packages are necessary to run the server without issues.

Step 3: Install SteamCMD

SteamCMD is a command-line tool used for downloading and managing game servers, including 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. Run SteamCMD to verify the installation:

     
    ./steamcmd.sh

    After running this command, you should see the SteamCMD prompt. Type quit to exit.

Step 4: Download The Forest Server Files

Now that SteamCMD is installed, you’ll need to download the dedicated server files for The Forest.

  1. Login anonymously to SteamCMD:

     
    ./steamcmd.sh login anonymous
  2. Set the installation directory:

     
    force_install_dir ./the_forest_server
  3. Download the server files for The Forest (App ID: 656450):

     
    app_update 656450 validate

    This will download and validate the server files. The process may take a while depending on your internet speed.

Step 5: Configure the Server

After downloading the server files, you need to configure your server.

  1. Navigate to the server directory:

     
    cd /home/steam/the_forest_server
  2. Configure the server: The primary configuration for The Forest is in the start_server.sh script. You can edit this file to adjust settings such as server name, password, and more.

    Open the start_server.sh file using a text editor:

     
    nano start_server.sh

    In the script, you can adjust settings like:

    • Server Name: Change the server’s name that will be displayed in the server list.
    • Max Players: Adjust the maximum number of players that can join your server.
    • Password: Set a password for your server if you want to limit access.

    Example configuration:

     
    ./TheForestDedicatedServer.x86_64 -batchmode -nographics -logfile /home/steam/the_forest_server/server_log.txt -name "My The Forest Server" -password "your_password"

    Save and exit the editor (CTRL + X, then Y to confirm).

Step 6: Open Required Ports

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

The default ports for The Forest are:

  • UDP 27015: For the game server
  • UDP 27005: For client queries
  1. Open the necessary ports on your VPS:

     
    ufw allow 27015/udp ufw allow 27005/udp ufw reload

    If you use a different firewall, make sure these ports are open.

Step 7: Start The Forest Server

Now that everything is configured and the ports are open, you can start the server.

  1. Run the server in a screen session: Running the server in a screen session allows it to continue running even if you disconnect from the VPS.

    • Start a new screen session:

       
      screen -S the_forest_server
    • Start the server:

       
      ./start_server.sh
  2. Detach from the screen session: To leave the screen session running in the background, press CTRL + A and then D. You can reattach later with:

     
    screen -r the_forest_server
  3. Check the server logs: You can check the server logs for any errors or issues by looking at the server_log.txt file:

     
    tail -f server_log.txt

Step 8: Connect to Your Server

Once your server is running, you and your friends can join.

  1. Launch The Forest on your local machine.
  2. Go to Multiplayer and click Join Game.
  3. Enter your server’s IP address or search for it by name in the server list.
  4. If you’ve set a password, you’ll need to enter it to connect.

Step 9: Update Your Server

To ensure your server stays up to date, you should check for updates periodically.

  1. Update the server files: Run the following commands in your SteamCMD directory to check for updates:

     
    ./steamcmd.sh login anonymous force_install_dir ./the_forest_server app_update 656450 validate

    This will download and install any new updates for the server.

Conclusion

By following these steps, you should now have a fully functional The Forest server running on your AnonVM VPS. Hosting your server on AnonVM allows you to enjoy a private and secure multiplayer experience with your friends. Keep your server updated and configure it to your liking for the best possible experience. Happy gaming!

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

Powered by WHMCompleteSolution