This guide provides step-by-step instructions to set up and run a Rust server using PowerShell and a pre-configured script.
- 👨💻 Administrator Access: You will need administrator privileges on your computer to execute some of the commands in this setup.
- 📂 Required Files:
rust-server-carbon.ps1: The PowerShell script for setting up and configuring the server.Carbon.Windows.Release.zip: The Carbon file, used by the server.miniupnpc.zip: Contains UPnP utilities required for port mapping.
-
📂 Place all required files in the same folder:
- Make sure
rust-server-carbon.ps1,Carbon.Windows.Release.zip, andminiupnpc.zipare in the same directory on your computer.
- Make sure
-
📥 Extract
miniupnpc.zip:- Right-click on
miniupnpc.zipand select “Extract All.” - Extract it to
C:\miniupnpc. The extracted folder should containupnpc-static.exe, which the script will use for network configuration.
- Right-click on
If you want to customize the server’s IP address or directory, you can manually edit the following variables in rust-server-carbon.ps1:
- 💻
$LocalIP: Set this to your local IP address (e.g.,192.168.1.115). If you don’t know your local IP address, you can find it by opening Command Prompt and typingipconfig. - 📁
$ServerDir: Set this to the path where you want the Rust server files to be installed (e.g.,C:\rust_server). - 📄
$CarbonZipPath: Set this to the full path ofCarbon.Windows.Release.zip.
If you're not comfortable editing these values, the script will use defaults.
-
🔓 Open PowerShell as Administrator:
- Right-click on the Start Menu and select Windows PowerShell (Admin). This will open PowerShell with administrator privileges.
-
📂 Navigate to the Folder:
- In PowerShell, navigate to the folder where you placed the
rust-server-carbon.ps1script. Use thecdcommand to change directories. For example:cd "C:\path\to\your\folder"
- In PowerShell, navigate to the folder where you placed the
-
▶️ Temporarily Allow Script Execution:- If you encounter an error about the script not being digitally signed, bypass this restriction temporarily by running:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
- If you encounter an error about the script not being digitally signed, bypass this restriction temporarily by running:
-
▶️ Run the Script:- Run the script by typing the following command:
.\rust-server-carbon.ps1
- This script will do the following:
- ✅ Check for administrator privileges.
- 🔗 Set up UPnP port forwarding to allow players to connect to the server.
- 🛡️ Configure Windows Firewall rules to allow network traffic on the required ports.
- 📂 Create the Rust server directory.
- 🛠️ Download and install SteamCMD, a tool for installing dedicated game servers.
- 🎮 Install the Rust server.
- 📦 Extract
Carbon.Windows.Release.zipto the server directory for additional functionalities. - 📜 Generate a
start_server.batfile to start the server with specific configurations.
- Follow any on-screen prompts. If there are any errors, check if all required files are in place and that PowerShell has the necessary permissions.
- Run the script by typing the following command:
-
▶️ Runstart_server.bat:- Once the script completes successfully, navigate to your Rust server directory (default:
C:\rust_server). - Double-click on
start_server.batto start your Rust server. This file was created by the script and contains the necessary commands to launch the server with your settings.
- Once the script completes successfully, navigate to your Rust server directory (default:
-
✅ Confirm the Server is Running:
- A new Command Prompt window should open, showing logs of the server starting up.
- Look for messages indicating that the server has successfully started. You should see the configured ports (22220 for the game, 22222 for RCON, etc.) and other information.
-
🌍 Find Your Public IP Address:
- The PowerShell script will display your public IP address at the end of the setup. Alternatively, you can go to WhatIsMyIP to find it.
-
🔗 Connect to Your Server:
- Launch Rust on your computer.
- Open the game console (press
F1in Rust) and type the following command to connect:Replaceclient.connect [Your Public IP Address]:22220[Your Public IP Address]with the IP address you obtained in the previous step.
If you encounter issues, here are some common troubleshooting tips:
-
🚪 Ports Not Open:
- Ensure that UPnP is enabled on your router. The PowerShell script uses UPnP to open ports automatically.
- You may need to log into your router and manually forward the ports (22220 for the game, 22222 for RCON, 27015 for Steam, and 22288 for Rust+) if UPnP is not working.
-
🛡️ Firewall Blocking Connection:
- Check that Windows Firewall or any third-party firewall is not blocking Rust’s network traffic. The PowerShell script should add firewall rules, but you may need to verify them in Windows Firewall settings.
-
🔄 Server Not Responding:
- Double-check that
rust-server-carbon.ps1is configured correctly and that all paths are accurate. - Ensure all required files are present, especially
Carbon.Windows.Release.zipandminiupnpc.zip.
- Double-check that
This guide provides all the necessary steps for setting up and running a Rust server on Windows. If you have additional questions or encounter specific issues, refer to the Troubleshooting section or reach out for support.
Happy hosting! 🎉