You can run SHOUTcast as a Windows Service, so that you can log off on your server and still run SHOUTcast. This is done with a utility called SRVANY.EXE. This utility runs as it’s own service and when it starts it starts SHOUTcast with it. Pretty simple stuff really, so here goes.
Installation:
- Install SHOUTcast server as normal to the C:\Program Files\SHOUTcast directory
- Copy instsrv.exe to your C:\WINDOWS\system32 directory
- Copy SRVANY.EXE to C:\Program Files\SHOUTcast
- From command prompt, run this command – INSTSRV SHOUTcast “C:\Program Files\SHOUTcast\srvany.exe”
- Run the Registry Editor (REGEDT32.EXE)
- Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SHOUTcast: create a ‘Parameters‘ key (folder)
- Under the this key, create a REG_SZ string value called Application and add in this data C:\Program Files\SHOUTcast\sc_serv.exe
- Configure the SHOUTcast .ini file C:\Program Files\SHOUTcast\sc_serv.ini
- Close Regedit, then open the services console in administrative tools, or start, run, services.msc, confirm it is set to start Automatically and the logon account is LocalSystem. Then click the Allow Service to Interact with Desktop
- Start the service, check in Task Manager, you will see sc_serv.exe in there, and if you stop the service then sc_serv.exe will disappear.
Update April, 2020 – Or you can just run the below PowerShell script:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the latest copy of SHOUTcast | |
$url = 'http://download.nullsoft.com/shoutcast/tools/sc_serv2_win64-latest.exe' | |
$exeoutput = "$env:TEMP\sc_serv2_win64-latest.exe" | |
Invoke-WebRequest –Uri $url –OutFile $exeoutput | |
# Setup SHOUTcast silently | |
$arguments = '/S' | |
Start-Process $exeoutput –ArgumentList $arguments –Wait | |
# Copy the SHOUTcast Config file | |
$url = 'https://ejukebox03.blob.core.windows.net/shoutcastcontainer/sc_serv.conf' | |
$confoutput = "$env:ProgramFiles\SHOUTcast\sc_serv.conf" | |
Invoke-WebRequest –Uri $url –OutFile $confoutput | |
# Register the SHOUTcast service | |
$proc = "$env:ProgramFiles\SHOUTcast\sc_serv.exe" | |
$arguments = 'install Shoutcast sc_serv.conf' | |
Start-Process $proc –ArgumentList $arguments –Wait | |
# Start the SHOUTcast service | |
Start-Service 'SHOUTcast' | |
Set-Service –Name 'SHOUTcast' –StartupType Automatic | |
# Allow SHOTcast through Windows Firewall | |
New-NetFirewallRule –DisplayName "Allow SHOUTcast" –Direction Inbound –Program "$proc" –Action Allow |
An example sc_serv.conf file?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adminpassword=AdminPassword | |
publicserver=never | |
requirestreamconfigs=1 | |
logfile=logs\sc_serv.log | |
w3clog=logs\sc_w3c.log | |
banfile=control\sc_serv.ban | |
ripfile=control\sc_serv.rip | |
portbase=8000 | |
;Stream IDs | |
; Connect like this as the password: Password:#1633 | |
;Test | |
streamid_1=1 | |
;Player 1 | |
streamid_2=001 | |
;Player 2 | |
streamid_3=002 | |
;Stream Paths | |
streampath_1=/zero | |
streampath_001=/one | |
streampath_002=/two | |
;Stream Passwords | |
password_1=Passw0rd | |
password_001=Passw0rd | |
password_002=Passw0rd | |
;streamauthhash_1=tWbo4BLct4FX5lOF1geL | |
;Specify whether the buffer size is fixed [0] or adaptive [1] [Default = 0] | |
buffertype = 1 |
[…] […]
Thanks much for the good information.
Modified registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SHOUTcast\Parameters\Application. Added config file to load when sc_serv.exe is started.
Example: C:\Program Files\Shoutcast\sc_serv.exe sc_serv_public.conf
Correct config file for my server is started automatically.
Didn’t use sc_serv.ini.