How to host your own Chaser Server (Ubuntu)
PROBLEM: I want to host my own Chaser server as cheaply as possible SOLUTION: You can run a Linux server like Ubuntu and use a tool called Wine to emulate Windows in order to run the Chaser server. You can use the following script to setup Wine and Chaser on a Ubuntu server (Ubuntu 21.04 x64). If you have any questions please use the CBOX.
#!/bin/bash
# Tested with Ubuntu 24.04 LTS x64. Run as root.
sudo timedatectl set-timezone America/New_York
# Remove annoying prompts
sudo apt-get -y remove checkrestart
sudo apt-get -y remove needrestart
# Install Wine
# https://wiki.winehq.org/Ubuntu
# https://askubuntu.com/questions/177192/how-do-i-create-a-32-bit-wine-prefix
sudo apt install -y wine-stable
dpkg --add-architecture i386 && apt-get update && apt-get install wine32:i386
mkdir /root/wine32
export WINEPREFIX=/root/wine32
export WINEARCH=win32
echo -e "\nWINEPREFIX=/root/wine32" >> /etc/environment
echo -e "\nWINEARCH=win32" >> /etc/environment
WINEARCH=win32 wine wineboot
# Setup headless screen - https://superuser.com/questions/902175/run-wine-totally-headless/948200#948200
sudo apt-get update -y
sudo apt-get install -y xvfb
sudo apt install x11-utils -y
xdpyinfo -display :0.0 >/dev/null 2>&1 && echo "Already running" || Xvfb :0 -screen 0 1024x768x16 &
export DISPLAY=:0.0
echo -e "\nDISPLAY=:0.0" >> /etc/environment
touch /var/spool/cron/crontabs/root
(crontab -l ; echo "@reboot xdpyinfo -display :0.0 >/dev/null 2>&1 && echo \"Already running\" || Xvfb :0 -screen 0 1024x768x16 &") | sort - | uniq - | crontab -
# Install winetricks. Use Windows 98.
sudo apt install -y winetricks
DISPLAY=:0.0 WINEARCH=win32 winetricks allfonts
WINEARCH=win32 winetricks win98
# Prepare to download chaser
mkdir "$WINEPREFIX/drive_c/chaser"
cd "$WINEPREFIX/drive_c/chaser"
# Download and install Chaser. Set to start on boot.
wget https://www.usmcchaser.com/server/example.zip
unzip example.zip
chmod +x "$WINEPREFIX/drive_c/chaser/example/start.sh"
(crontab -l ; echo "@reboot sleep 30; cd $WINEPREFIX/drive_c/chaser/example; ./start.sh 3004 DemoFS.def >> cronlog.log 2>&1") | sort - | uniq - | crontab -
# Reboot on a schedule
(crontab -l ; echo "30 1 * * 7 /sbin/shutdown -r now") | sort - | uniq - | crontab -
# Install updates automatically https://phoenixnap.com/kb/automatic-security-updates-ubuntu
sudo apt update
sudo apt install unattended-upgrades
systemctl status unattended-upgrades
systemctl enable unattended-upgrades
sudo systemctl restart unattended-upgrades.service
# Install Fail2ban to block random people from brute forcing ssh connections
sudo apt-get install fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo systemctl restart fail2ban.service
sudo systemctl enable fail2ban.service
# Optional: Setup a firewall to block uneeded ports (not the chaser servers or your ssh login)
# ...
# Reboot to make sure it all works
reboot
|