How to Create a SA-MP Server from Scratch on Windows VPS: Step-by-Step Guide
Learn how to set up a SA-MP server from scratch on a Windows VPS: download the official package, configure server.cfg, open firewall ports and validate your first connection.
Running a SA-MP server on a Windows VPS is still a common path in 2026, especially for Brazilian Roleplay communities that keep legacy gamemodes running on the 0.3.7 R5 build. What trips up beginners is almost never the game itself — it is infrastructure detail: port 7777 set as TCP instead of UDP, RCON with the default password, announce turned off, or the Windows firewall blocking samp-server.exe.
This tutorial covers the full path from scratch: official download, folder structure, minimal functional configuration, firewall, and connectivity validation. The target audience is anyone who has never run samp-server and wants to start with a solid base to later evolve into a custom Pawn gamemode.
Estimated execution time: about 30 minutes from the first RDP to seeing the server listed in the game client.
Prerequisites
A Windows Server 2019 or 2022 VPS with at least 2 vCPUs, 2 GB of RAM, and 20 GB of SSD storage. Administrative access via RDP, and the SA-MP 0.3.7 R5 client installed on your local machine to test the connection (download at sa-mp.com).
Windows Server 2022 7777 (UDP) 0.3.7-R5-1-1 2 GB 2 cores SA-MP is single-threaded, so high CPU clock matters more than core count. SSD storage is recommended but not critical — the gamemode loads everything into memory at boot and barely touches the disk after that.
Download the official SA-MP Server package
The official package is the ZIP distributed on sa-mp.com, containing samp-server.exe, default configuration, and the sample gamemodes. Always download from the official source: redistributed packages found in forums frequently include backdoored plugins.
Connect to the VPS via RDP using the credentials you received during provisioning. Open PowerShell as administrator and create the folder structure:
New-Item -ItemType Directory -Path "C:\samp-server" -Force
Set-Location "C:\samp-server"Keeping the server at C:\samp-server (root, no spaces) avoids issues with older plugins that do not handle long paths or paths with spaces well.
Download the Windows package for build 0.3.7-R5-1-1:
Invoke-WebRequest -Uri "https://files.sa-mp.com/samp037_svr_R5-1-1_win32.zip" -OutFile "samp-server.zip"
Expand-Archive -Path "samp-server.zip" -DestinationPath "." -ForceExpand-Archive creates a samp03 subfolder with all the contents. Move the files to the root to simplify:
Move-Item -Path ".\samp03\*" -Destination "." -Force
Remove-Item -Path ".\samp03" -Recurse
Remove-Item -Path ".\samp-server.zip"Confirm the main files are present:
Get-ChildItem | Select-Object Name, Length | Format-TableYou should see at least: samp-server.exe, samp-npc.exe, server.cfg, announce.exe, and the folders gamemodes, filterscripts, scriptfiles, plugins, and npcmodes. If any of them is missing, the download came in incomplete — repeat the previous step.
Configure server.cfg
server.cfg is the central configuration file. It defines the gamemode, RCON, server name, slots, and plugins. The default configuration is insecure and needs minimal adjustments before going live.
Generate a strong RCON password before editing the file:
$rcon = -join ((48..57) + (65..90) + (97..122) | Get-Random -Count 24 | ForEach-Object {[char]$_})
Write-Output $rconCopy the generated value — you will paste it into server.cfg in the next step. Also save it in a password manager; without RCON you lose administrative access to the server at runtime.
Open server.cfg in Notepad and replace the contents with the minimal functional configuration:
echo Executing server.cfg...
lanmode 0
rcon_password YOUR_RCON_PASSWORD_HERE
maxplayers 100
port 7777
hostname My SA-MP Server
gamemode0 grandlarc 1
filterscripts gl_actions gl_property gl_realtime
announce 1
query 1
chatlogging 1
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language EnglishReplace YOUR_RCON_PASSWORD_HERE with the password you generated in the previous step, and set hostname to your actual server name.
Bots scan IP ranges of known hosters looking for SA-MP servers with rcon_password changeme or admin. With RCON captured, the attacker runs exec to load malicious filterscripts. Changing it before the first boot is mandatory.
Open port 7777 in the firewall
By default, Windows Server blocks inbound traffic on non-standard ports. You need to create an explicit rule for UDP 7777, and also for samp-server.exe at the application level.
Create the firewall rule for UDP 7777 via PowerShell:
New-NetFirewallRule -DisplayName "SA-MP Server UDP 7777" `
-Direction Inbound `
-Protocol UDP `
-LocalPort 7777 `
-Action Allow `
-Profile AnyThe -Profile Any flag applies to Domain, Private, and Public — necessary because the VPS network interface is most likely categorized as Public.
Add the exception at the executable level as well, to cover cases of antivirus software or extra restrictive policies:
New-NetFirewallRule -DisplayName "SA-MP Server EXE" `
-Direction Inbound `
-Program "C:\samp-server\samp-server.exe" `
-Action Allow `
-Profile AnyIf you have an external firewall (provider security group or WAF), allow inbound UDP 7777 from 0.0.0.0/0 there as well — the Windows firewall does not cover edge rules.
Start the server and validate
With configuration and firewall ready, it is time to bring up the process. The first run will expose issues that stayed silent in the config — incomplete log, missing gamemode, or plugin with the wrong version.
Start the server for the first time in interactive mode (so you can see the log directly):
Set-Location "C:\samp-server"
.\samp-server.exeThe console window should open and show something similar to:
SA-MP Dedicated Server
----------------------
v0.3.7-R5-1-1, (C)2005-2015 SA-MP Team
[15:42:01] Server Plugins
[15:42:01] --------------
[15:42:01] Loaded 0 plugins.
[15:42:01] Filterscripts
[15:42:01] ---------------
[15:42:01] Loading filterscript 'gl_actions.amx'...
[15:42:01] Loading filterscript 'gl_property.amx'...
[15:42:01] Loading filterscript 'gl_realtime.amx'...
[15:42:01] Loaded 3 filterscripts.
[15:42:02] Number of vehicle models: 0
[15:42:02] Loading gamemode 'grandlarc.amx'...If you see “Unable to load gamemode” or “Filterscript could not be loaded”, confirm that the .amx files are present in gamemodes\ and filterscripts\.
In another RDP window (without closing the server), confirm the port is in LISTEN:
Get-NetUDPEndpoint -LocalPort 7777You should see a line with LocalAddress: 0.0.0.0 and LocalPort: 7777. If it shows “No matching MSFT_NetUDPEndpoint objects found”, the server did not come up correctly or is listening on another port — review the port line in server.cfg.
Open the SA-MP client on your local machine, go to Add Address and enter VPS_IP:7777. The server should show up with the configured hostname, current ping, and player count (0/100).
Connect with any nickname and type into chat:
/rcon login YOUR_RCON_PASSWORDIf RCON accepts (“You are logged in as admin”), the configuration is complete. Test with /rcon cmdlist to confirm the administrative commands.
Verification
To confirm the server is visible externally and responds to queries, use the official checker. In the browser, open https://sa-mp.com/server/YOUR_IP:7777. You should see the server data (hostname, players, gamemode, ping) rendered on the page.
If the page returns “Server offline” while the process is running, the issue is firewall at some level — VPS provider, Windows Defender, or your ISP blocking UDP. Confirm with Test-NetConnection -ComputerName YOUR_IP -Port 7777 from another external machine.
Troubleshooting
”Failed to load filterscript ‘gl_actions.amx’”
The .amx file is not in C:\samp-server\filterscripts\ or has denied permissions. Run icacls C:\samp-server /grant Everyone:F /T in admin PowerShell to reset permissions. Confirm with Get-ChildItem .\filterscripts\*.amx that the 3 filterscripts (gl_actions, gl_property, gl_realtime) exist.
Server shows up in the client but connect times out
This is almost always UDP being blocked at some hop between client and server. The query (which shows the data) uses the same UDP 7777 but sends small packets that pass more easily. Gameplay packets are larger and can be fragmented on poorly configured networks. Test from another network (mobile 4G) to isolate.
samp-server.exe closes on its own when starting
SmartScreen or antivirus most likely killed the process. Go to Windows Security → Reputation-based protection and disable “Potentially unwanted app blocking”, or add C:\samp-server as an excluded folder. Reopening samp-server.exe should then work.
In production, use NSSM (Non-Sucking Service Manager) to run samp-server.exe as a Windows service. This guarantees automatic restart on crash and on VPS boot. Command: nssm install SAMP "C:\samp-server\samp-server.exe" — then nssm start SAMP.
Next steps
With the server running, the next block is customization and operation:
- Switch to a custom gamemode: replace
grandlarc.amxingamemodes\and updategamemode0inserver.cfg. Keep the original as a backup. - Install common plugins (sscanf, streamer, MySQL): download the DLLs at forum.sa-mp.com, place them in
plugins\and add theplugins sscanf streamer mysqlline toserver.cfg. - Automated backup of scriptfiles: the
scriptfiles\folder holds persistent data (accounts, statistics). Schedule a Windows task to dump it daily to external storage. - Monitoring: set up alerts if the process goes down or if ping exceeds a threshold. Simple healthcheck systems (UptimeRobot pointing to the external query) cover the basics.
If you are putting this into production for a real community, a Hostini VPS with NVMe SSD ships with latency optimized for Brazilian players and managed DDoS protection at the edge — useful because Brazilian SA-MP servers are frequent targets of UDP flood attacks.
Frequently asked questions
What is the difference between SA-MP 0.3.7 and open.mp?
SA-MP 0.3.7 R5 is the final official build from the original team, frozen since 2022. Open.mp is the community-maintained fork, compatible with 0.3.7 gamemodes and with active security fixes. For a new server in 2026, open.mp is the safer technical choice, but this tutorial covers classic SA-MP because it is still what most legacy gamemodes (especially Brazilian Portuguese ones) assume as the base.
Do I need to open port 7777 on TCP, UDP, or both?
UDP only. SA-MP uses UDP 7777 exclusively for gameplay and query. If you only open TCP, the server will not even respond to the master list ping. If you want to expose the external query (used by stats sites), it is also UDP 7777 — same port, same protocol.
Why does my server not show up in the internal SA-MP list?
Three common causes: announce 0 in server.cfg, UDP port 7777 closed in the Windows firewall, or the VPS public IP is in a range blocked by the master list. Confirm with sa-mp.com/server/IP:7777 — if it loads data, the server is fine and the issue is just the master list taking time to index (up to 30 minutes).
How many slots can 2 GB of RAM and 2 vCPUs handle?
A vanilla server with a lightweight gamemode runs 100 slots comfortably on that spec. With a full gamemode like Roleplay and 50+ filterscripts, expect 200 to 500 stable slots. SA-MP is single-threaded by design — a fast vCPU matters more than many cores.
Is the default RCON password safe?
No. The server.cfg ships with something like `rcon_password changeme`, and any server with an exposed RCON and a weak password gets scanned within hours — attackers gain access to run commands at the server level. Change it to a random 20+ character password and consider disabling remote RCON if you only administer it through the local console.
Do I need Windows Server or does a regular Windows 10 work?
Windows Server 2019 or 2022 is the correct technical choice: better scheduler for long-running workloads, no 20 inbound connection limit like Windows 10/11, and official support for running as a service via NSSM. Desktop Windows works for local dev, but in production you will hit the connection limit and samp-server.exe can be blocked by SmartScreen.