Server Ubuntu - Musta1337/TeknoMW3 GitHub Wiki

Note

  • ⚠️
  • Support for TeknoMW3 on Linux is limited.
  • While it's possible to run TeknoMW3 on Linux, we recommend running it on Windows if possible.
  • To run it on Linux, a compatibility layer (e.g. Wine) is required.

Requirements

  • Follow How to install TeknoMW3 Server (Windows).
    • It's easier to install TeknoMW3 on a Desktop (Windows) PC and copy the files to your Server later.
    • This guide focuses on getting a TeknoMW3 Server running, not on installing the TeknoMW3 files.
  • An installation of Ubuntu
    • This guide assumes you are using Ubuntu Server (e.g. Ubuntu Server on a VPS).
    • If you use Ubuntu Desktop on a local PC, you can skip some steps (it's not necessary to install a desktop environment and Xrdp and use Remote Desktop Connection).
  • Basic knowledge of Linux.
  • An SSH client (like PuTTY) and, optionally, an SFTP client to copy the TeknoMW3 Server files to your Server (like WinSCP).
  • 2 GB RAM (or higher) is recommended.
  • ~25 GB (or more) of free storage space for Ubuntu Server + TeknoMW3 files (the "main" folder of TeknoMW3 can be removed to save storage space, but you should still expect the TeknoMW3 files alone to to take up to 10 GB).

Basic Setup and installing a Desktop Environment

  • A Desktop Environment is required for the TeknoMW3 Server to run.
    • On Ubuntu Server, it has to be installed manually.
# First of all, make sure that your user has a strong password.
# If that's not the case, set a strong password by entering the command: passwd

# Update the system
sudo apt update
sudo apt upgrade -y

# Install Xfce as a light desktop environment
#  * Skip this if you have a desktop distribution (e.g. Ubuntu Desktop)
#  * Includes a graphical user interface and a minimal set of tools
sudo apt install xfce4 xfce4-goodies lightdm-gtk-greeter -y

# Install Xrdp to allow remote desktop connections
#  * Skip these if you have a desktop distribution and don't need remote access
sudo apt install xrdp -y
# Use xfce4-session as session manager
echo xfce4-session > ~/.xsession

# Firewall setup
# Deny incoming connections by default
sudo ufw default deny incoming
# Allow SSH port
sudo ufw allow ssh
# Allow the Xrdp port 3389 for remote desktop connections
sudo ufw allow 3389/tcp
# Allow TeknoMW3 net_port (27017 by default)
sudo ufw allow 27017/udp
# Allow TeknoMW3 net_masterServerPort (27018 by default)
sudo ufw allow 27018/udp
# Enable ufw
sudo ufw enable
# Check status of ufw (should be active)
sudo ufw status

# Reboot to apply changes
sudo reboot

Installing Wine

  • The following instructions apply to Ubuntu 24.04 LTS.
    • If you have a different Ubuntu version, follow the corresponding instructions on the Wine Website.
# For Ubuntu 24.04 LTS

# Create a directory for the repository key
sudo mkdir -pm755 /etc/apt/keyrings
# Download and add the repository key
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -

# Enable the 32-bit repository
sudo dpkg --add-architecture i386
# Add the sources file
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources

# Update the package information
sudo apt update

# Install Wine (stable)
sudo apt -y install --install-recommends winehq-stable

# Reboot to apply changes
sudo reboot

Connecting to Xrdp from Windows using Remote Desktop Connection

Note: By default, Xrdp allows only one remote desktop session per user.

  • Start Remote Desktop Connection (mstsc) on your Windows PC
  • Enter your Server's IP address and click Connnect
  • Enter your username and password and click OK
  • You should now be connected to the desktop of your Ubuntu Server

Starting the TeknoMW3 Server using Wine

  • At this point, it's required that a Desktop Environment and Xrdp are installed.
  • Connect to your Server using Remote Desktop Connection, as explained above.
  • Open the Terminal inside your TeknoMW3 folder or use the cd command to navigate to that directory.
  • Inside your TeknoMW3 folder, run the command chmod +x Start-Dedicated-Server.sh to give the script execute permissions.
  • Run the command ./Start-Dedicated-Server.sh to start the TeknoMW3 Server.
  • The TeknoMW3 Server will start using Wine.
    • When Wine is started for the first time, initialization takes a few seconds. If Wine prompts you to install Wine-Mono, install it.
  • The TeknoMW3 Server Console should appear after a few seconds and the Server should be running.