Skip to content

Instantly share code, notes, and snippets.

@corrigat
Last active January 2, 2023 16:54
Show Gist options
  • Save corrigat/33b514e5cdf43973c2d6273c7c09e65f to your computer and use it in GitHub Desktop.
Save corrigat/33b514e5cdf43973c2d6273c7c09e65f to your computer and use it in GitHub Desktop.
Host an Icarus server on a windows system
First you'll need a modern version of powershell - v5.1 or later, which ships with current versions of windows 10 and higher.
Head to the Powershell GSM repository and download the code with the green Code button: https://github.com/patrix87/PowerShellGSM
Extract the archive somewhere. The server files will live here as well. I picked c:\pgsm.
In the extracted folder, copy the template config to the config dir:
cp templates/icarus.psm1 config/icarus.psm1
In the launchers directory, copy run.cmd to icarus.cmd:
cp launchers/run.cmd launchers/icarus.cmd
So the resulting important files for me are:
c:\pgsm\launchers\icarus.cmd
c:\pgsm\config\icarus.psm1
Go and edit the config file at config\icarus.psm1:
1. Putting a password on your server is highly recommended
2. Note the ports needed to be forwarded by your router. (Defaults: 27015, 17777)
3. Personally, I recommend setting
* UsePID = $true
* AutoRestart = $false
And managing crashes manually because the method of using scheduled tasks to
kill and start servers is not multi-process friendly. Meaning the watchdog tasks will
shoot legitimate server processes listening on different ports. If you are not running
multiple servers on your machine, don't worry about #3 here.
Go into the launchers directory and double click icarus.cmd. Don't call the script from a prompt or powershell. double click it.
This will download everything you need, including steamcmd, start the server,
then prompt you to close the window and edit files. This is unnecessary. Close the windows then
re-launch icarus.cmd and wait for the server window to say 'server is now empty' before joining.
The server files will download to servers\<configfilename>. So if I named my config file surviveicarus.psm1, the server would be in c:\pgsm\servers\surviveicarus\... . If I had multiple different named configs with different ports, noting #3 above, I would have a copy of the server files for each config:
PS C:\psgsm\configs> ls
Directory: C:\psgsm\configs
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 12/16/2022 6:25 PM 128 #README.txt
-a---- 1/1/2023 3:15 PM 8857 icarus.psm1
-a---- 1/1/2023 3:15 PM 8879 icarusmissions.psm1
-a---- 1/1/2023 3:15 PM 8887 icarusmissions2.psm1
-a---- 1/1/2023 3:15 PM 8872 icarusmissions3.psm1
PS C:\psgsm\configs> cd ..\servers
PS C:\psgsm\servers> ls
Directory: C:\psgsm\servers
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 12/25/2022 12:26 PM icarus
d----- 1/1/2023 2:53 PM icarusmissions
d----- 12/30/2022 4:54 PM icarusmissions2
d----- 12/31/2022 3:27 PM icarusmissions3
-a---- 12/25/2022 4:44 PM 108 icarus.INI
-a---- 1/1/2023 2:54 PM 108 icarusmissions.INI
-a---- 1/1/2023 2:54 PM 4 icarusmissions.PID
-a---- 12/31/2022 11:18 AM 108 icarusmissions2.INI
-a---- 12/31/2022 3:28 PM 108 icarusmissions3.INI
-a---- 12/31/2022 3:28 PM 4 icarusmissions3.PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment