Jump to content
BinaryCrash

Setup Server (Alternative Method) (Outdated)

Recommended Posts

This topic is very old and if you have a server, PLEASE USE THIS WIKI: http://squad.gamepedia.com/Server_Configuration

 

The old info below is here just for information and curiosity.

 

Spoiler


 

 

Hello,

 

I made this topic as an alternative method for configuring Squad Server.

But you are free to test my settings.

 

---

 

Just for information i use:

i7-4820K

Windows Server 2012 R2 Datacenter

56 GB RAM Corsair Dominator Platinum 1866

5 SSDs with MegaRaid.

 

---

 

Requirements:

Visual C++ Redistributable for Visual Studio 2015 vc_redist.x64.exe

https://www.microsoft.com/en-us/download/details.aspx?id=48145

 

DirectX End-User Runtimes (June 2010)

https://www.microsoft.com/en-us/download/details.aspx?id=8109

 

For getting steamids i use this site: https://steamid.io/

You will be using steamID64 for admins permissions, bans, etc;

 

You can use steam CMD or any method of updating your server, i still use windows steam client.

 

Firewall and ports to open you can use the official topic. I have set more than one server, so i usually put the servers not too close on port range.

I use step by 100, more details in start command line later in this post.

 

I recommend you do a fresh server install if you played with other server configs before.

 

Be sure you go to Control Painel -> Power Options and set CPU to be 100% all the time. Full performance.

 

 

Settings:

 

I have the server saved in default steam app directory:

C:\Program Files (x86)\Steam\steamapps\common\Squad Dedicated Server

You can put it anywhere you want as long as you don't have folder permission problems.

 

My server settings are saved in:

Squad\Config\DedicatedServerGameUserSettings.ini

NOTE: Create the file if it does not exist yet.

Contents:

[ServerAdmins]Admin=76561198027635638:524287 // BinaryCrash+Admin=76561197979687511:270336 // Slot Reservado + Cameraman+Admin=76561197992212044:270336 // Slot Reservado + Cameraman+Admin=76561198041606388:9024 // PIRAJU 64 (broadcast) + 256 (kick) + 512 (ban) + 8192 (camera man) = 9024+Admin=76561198022031489:832 // MARCIO 64 (broadcast) + 256 (kick) + 512 (ban) = 832[SquadOnlineSessionSettings]ServerName=[BRAZIL] ComunidadeGamer.com.br #1ServerPassword=MaxNumPlayers=60NumReservedSlots=4ShouldAdvertise=trueNumPlayersDiffForTeamChanges=2AllowTeamChanges=truePreventTeamChangeIfUnbalanced=trueEnforceTeamBalance=trueRejoinSquadDelayAfterKick=180AllowCommunityAdminAccess=trueIsLANMatch=false[SquadGameInstance]MapRotation="Chora"+MapRotation="Fool's Road 1"+MapRotation="Kohat"+MapRotation="Logar"+MapRotation="OP First Light"+MapRotation="Sumari"

For server admins permissions you can use the table from official topic.

The first line without + and the other ones with +.

// For comments.

I tested it, it works.

 

[squadGameInstance] for maps rotation.

I didn't specify the mode, so the server will choose what mode to use randomly.

For this map list to work, you need to make sure files DefaultGameUserSettings.ini and/or DefaultGame.ini DO NOT HAVE [squadGameInstance]

Server Fresh install have default map rotation in one of these files. Remove it to have your DedicatedServerGameUserSettings.ini work with map rotation.

 

[squadOnlineSessionSettings] is for your general server settings.

In this example i have MaxNumPlayers=60 and NumReservedSlots=4

The server will show in  in-game server list with 56 slots and admins with reserved slot permission will use the reserved slot.

ShouldAdvertise=true is for your server to show up in server list.

 

After all settings are set, save this file and set it to READ-ONLY so when you update the server from steam it will not overwrite or delete your file.

 

Starting your server:

 

First you need to know currently the Unreal Engine 4 have problems with multiple IPs configured in windows.

If you setup the IP in command line, but have other ips configured in this OS, Squad will use your other IPs to send UDP packets related to player movements, etc. (After the player joined the server).

If this change in the future i will update this information.

So i recommend have your windows configured with only ONE IP.

If you use Virtual Machine, Hyper-V, etc, i am talking about the Guest system, the one running squad.

In my case, i do not use virtual machine to run Squad.

 

Squad server will heavily use one core.

I have set affinity to manage what cores each server will use.

 

This processor i use have 8 logical cores in total and i want to set affinity to core 3, 4 and 5 for server #1, and 6, 7 and 8 for server #2.

 

Create new file in main folder, where you have SquadServer.exe, with name startserver.bat

 

The bat file script restart the server if it crash or end process.
Your admins will be able to kill the server using console and process will restart. If they have the permissions of course.

My server have this content inside startserver.bat:

:loopclsecho Starting Server. %date% %time% >> logrestarts.txtstart "Squad 1" /AFFINITY  0x1C /WAIT "C:\Program Files (x86)\Steam\steamapps\common\Squad Dedicated Server\SquadServer.exe" "MULTIHOME=177.72.27.31 Port=7787 QueryPort=27165 -log"echo Crash? Restarting server in 15 seconds. %date% %time% >> logrestarts.txtping localhost -n 16 > nulgoto loop

You should edit affinity, path, IP and Ports.

In my case my second server have this line:

start "Squad 2" /AFFINITY  0xE0 /WAIT "C:\Program Files (x86)\Steam\steamapps\common\Squad Dedicated Server2\SquadServer.exe" "MULTIHOME=177.72.27.31 Port=7887 QueryPort=27265 -log"

The rest of the Bat file is the same.

Note the ports used, step by 100 compared to server 1.

Directory is different.

I clone the entire folder to run the second server. And to update the other folders i use WinMerge once the first server is updated.

Affinity is set to use Cores 6, 7 and 8.

 

Choosing cores:

 

To know the value to be used in affinity i used this method:

For a 8 cores CPU you have this binary number: 00000000 (8 zeros)

They represent cores in the following order: 87654321

If you want to use core 8, 7 and 6 your binary number will be 11100000

1 = true, 0 = false.

All you need is convert it to hexadecimal.

To do this open windows calc, press alt+3 to enter programmer mode.

Select "bin" to enter binary numbers.

Put your binary number there, in my case was 11100000

Then select Hex and it will show you the Hex value, in my case E0

 

My affinity value will be 0xE0

 

I usually don't use the first core as some programs keep using it mostly.

 

Tick rate and Bandwidth:

 

For now, you should try to keep your server FPS (tickrate) 10 or more for better gameplay experience.

If you leave it default, server max tickrate will be 50 and will reduce significantly once you have 40+ players in the server.

I got good stability setting max players no more than 60 players and tickrate = 12.

This depend on your CPU model and settings. you have to find your own working values.

I didn't want to overclock and push to 72 slots as i do prefer stability over quantity.

I can run 4 servers with 50 slots without problem and not one 72 slots server alone because Unreal Engine 4 is not multi-threaded optimized yet.

This may change in the future, i hope.

 

To tune this setting open

Squad\Config\DefaultEngine.ini

Search for [/script/OnlineSubsystemUtils.IpNetDriver]

Change MaxInternetClientRate to 80000

Change NetServerMaxTickRate to 12

Like this:

[/Script/OnlineSubsystemUtils.IpNetDriver]InitialConnectTimeout=120.0MaxInternetClientRate=80000MaxClientRate=100000NetServerMaxTickRate=12LanServerMaxTickRate=55

The MaxInternetClientRate is the bandwidth rate limit sent to the player. You can try other values.

 

Save the file.

This file probably will be overwritten when you update the server.

Better let steam update and you change this settings again when needed.

 

 

CONSOLE KEY for NON-US Keyboards:

 

This is for game Client, not the server.

Some keyboards, like mine, do not open console when you press Tilde Key, the key bellow ESC.

You have two options. Change your regional settings in control painel before start the game to US Keyboard layout, or change INI files.

 

Devs says to open a file in appdata, but this didn't work for me in version 3.8.

If you want to try open your appdata folder (you can run %appdata% to get there fast, but you will be probably in appdata/roaming folder).

The file suggested by the devs is

AppData\Local\Squad\Saved\Config\WindowsNoEditor\Input.ini

search for [/script/Engine.InputSettings]

 

At the end you have something like this:

ConsoleKey=None-ConsoleKeys=Tilde+ConsoleKeys=Tilde

I changed to use Pause button, it now is:

ConsoleKey=None-ConsoleKeys=Pause+ConsoleKeys=Pause

BUT for me the file suggested by the devs didn't work. And i don't know if it is related to my keyboard layout.

So i changed another file instead:

steamapps\common\Squad\Squad\Config\DefaultInput.ini

Same instructions as above.

This may change in the future with new versions, so you have to try these files.

It is better than changing regional settings everytime you want to start the game.

 

Remember, this is alternative method, not the oficial.

Instructions in the oficial topic have changed a lot, i let my servers run with this configuration and it is performing ok.

If you find some English/Grammatical errors please let me know.

 

I run Comunidade Gamer servers.

 

[]

 

BinaryCrash

Edited by BinaryCrash
Topic is not recommended anymore. Use the wiki.

Share this post


Link to post
Share on other sites

Testing this filter:

/ip firewall filteradd chain=forward comment=AV content="TSource Engine Query" dst-address=177.72.27.14 limit=50,5 port=27365 protocol=udpadd chain=forward comment=AN content="TSource Engine Query" dst-address=177.72.27.31 limit=50,5 port=27365,27165,27265 protocol=udpadd action=drop chain=forward comment="Drop over limit." content="TSource Engine Query" dst-address=177.72.27.14 port=27365 protocol=udpadd action=drop chain=forward comment="Drop over limit." content="TSource Engine Query" dst-address=177.72.27.31 port=27365,27165,27265 protocol=udpadd action=drop chain=forward comment="Block R4P3.NET" content=R4P3.NET

Share this post


Link to post
Share on other sites

What sort of DDoS is this filtering?

 

If you have enough bandwidth and router cpu power, you can filter the DDoS attacks we were receiving in the last days.

It worked and it stopped all the attacks i have received.

 

If you do not have enough resources to filter it, then you would need another method, like via cleaning center, etc.

More details about DDoS here: https://en.wikipedia.org/wiki/Denial-of-service_attack

 

For me and others who host outside USA/NA the DDoS attack have low bandwidth, but it still kick every player from the server.

To protect the server against it, these filters help, again, if you have the resources for it.

 

You can try it.

 

The filter rate limit the normal query packets so it wont flood the server.

And block every packet identified with this specific hacker signature.

Share this post


Link to post
Share on other sites
Norby   

Interesting that you had to change the console keys in the defaultinput.ini

The disadvantage of that is that you loose the changes on the next update. I have no idea why it does not work for some people. We should just add it to the ingame menu.

Share this post


Link to post
Share on other sites

New updated Filter

/ip firewall filteradd action=drop chain=forward comment="Block R4P3.NET" content=R4P3.NET dst-address=177.72.27.31 dst-port=27165,27265,27365 protocol=udpadd action=drop chain=forward comment="Block getstatus" content=getstatus dst-address=177.72.27.31 dst-port=27165,27265,27365 protocol=udpadd chain=forward comment="Accept 100 packets per second with Query command." content="TSource Engine Query" dst-address=177.72.27.31 dst-port=27165,27265,27365 limit=100,5 protocol=udpadd action=drop chain=forward comment="Bloqueia quem passar do limite." content="TSource Engine Query" dst-address=177.72.27.31 dst-port=27165,27265,27365 protocol=udpadd chain=forward comment="Accept 200 packets per second." dst-address=177.72.27.31 dst-port=27165,27265,27365 limit=200,5 protocol=udpadd action=drop chain=forward comment="Block everything else." dst-address=177.72.27.31 dst-port=27165,27265,27365 protocol=udp

You have to change the IP address in the filter.

Change the ports accordingly to your server configs (query ports).

 

In this filter i have set 3 servers.

Share this post


Link to post
Share on other sites

I've used ur startserver.bat setting but its not launching squad server?

 

:loopclsecho Starting Server. "Squad" /AFFINITY  0x1C /WAIT "C:\Users\Administrator\Desktop\Users\Administrator\Desktop\Squad Server\steamapps\common\Squad Dedicated Server\SquadServer.exe" "MULTIHOME=145.131.8.53 Port=7787 QueryPort=27165 -log"echo Crash? Restarting server in 15 seconds. %date% %time% >> logrestarts.txtping localhost -n 16 > nulgoto loop

 

Share this post


Link to post
Share on other sites

This topic is outdated.

Bat file is still usable, example:

:loop
cls
echo Starting server. %date% %time% >> logrestarts.txt
start "Squad Server" /WAIT "C:\Squad\SquadServer.exe" "MULTIHOME=177.72.27.36 Port=7887 QueryPort=27865 -log"
echo Crash? Starting server again in 15 seconds. %date% %time% >> logrestarts.txt
ping localhost -n 16 > nul
goto loop

 

In this example server is in c:\Squad folder.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×