DEFO CLOUD KNOWLEDGE BASE

Linux and Windows server setup guides

Common problems and practical setup guides for Windows and Linux servers.

15 installation guides
Windows2
Windows Server expired after 180 days? Server stops on its own?How to rearm a Windows Server evaluation installation.

If a Windows Server evaluation installation reaches its evaluation period, Windows may shut down automatically. The built-in rearm command can reset an eligible evaluation period.

Open Windows PowerShell

Connect to your server and open Windows PowerShell as administrator.

Reset the evaluation period

Run this command:

slmgr -rearm

Restart the server

Restart Windows when prompted. The evaluation period is reset if the installation is eligible.

Add and manage Windows Server usersCreate local accounts and assign appropriate Windows groups.

Prerequisites

  • Windows Server with Remote Desktop access.
  • Administrator rights on the server.

Open Computer Management

Right-click the Windows logo and open Computer Management.

Open Local Users and Groups

Select Local Users and Groups, then open Users.

Create a user

Right-click an empty area in the user list, choose New User, and enter the username and a strong password. Select the password options that match your account policy, then choose Create.

Assign group membership

Open the new user’s Properties, select Member Of, then Add. Enter an appropriate group and use Check Names to verify it.

Confirm the permissions

Use Administrators only when full administrative access is required. Remote Desktop Users grants remote sign-in rights without automatically granting full administrator access.

Linux3
Linux: Open and close portsManage a Linux server firewall with UFW.

UFW (Uncomplicated Firewall) provides a simple interface for managing firewall rules on Debian and Ubuntu.

Install UFW

Log in to the Linux console and install the firewall:

sudo apt update && sudo apt install ufw

Allow a port

For example, allow incoming TCP traffic on port 8080:

sudo ufw allow 8080/tcp

Deny a port

To block incoming TCP traffic on port 8080, use:

sudo ufw deny 8080/tcp

Check and manage UFW

Review the firewall rules before enabling UFW:

sudo ufw status
sudo ufw enable
sudo ufw disable
Install Docker on Debian 12Install Docker Engine and verify that the service is running.

Docker provides containers for running applications. Run installation commands as root or prefix them with sudo.

Update packages and install prerequisites

apt update && apt install ca-certificates curl gnupg

Install Docker Engine

The Docker convenience script configures and installs Docker Engine. Review the script and Docker documentation before running it:

curl -fsSL https://get.docker.com | sh

Install the Compose plugin

apt install docker-compose-plugin

Check Docker

systemctl status docker
docker --version
docker compose version
Set up an OpenVPN server on DebianInstall and configure OpenVPN with the community installation script.

Prerequisites

  • A Debian server (Debian 10 or newer is required by the original guide; use a currently supported release).
  • Root access.

Update the system

apt update && apt upgrade -y

Check the public IP (optional)

If you do not know the server IP, check it in your provider dashboard or with a network command such as:

ip addr

Download the installation script

mkdir -p /openvpn && cd /openvpn
wget https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod 755 openvpn-install.sh

Run the installer

./openvpn-install.sh

Answer the setup prompts

Confirm the public IP if needed. Choose whether to enable IPv6 based on your network, keep the default port if suitable, select a DNS provider, and decline compression and custom encryption settings unless you have a specific reason to change them.

Game servers7
Set up a FiveM serverStep-by-step setup of a FiveM server and txAdmin on Debian.

This guide uses a Linux KVM server and the FiveM Linux installer. Follow the current requirements and licensing terms from Cfx.re.

Prerequisites

  • At least 4 CPU cores, 8 GB RAM, and 50 GB storage are recommended.
  • A Linux installation (Debian 12 is a suitable example).
  • A server key from Cfx.re Keymaster.

Order a server

Choose a KVM package with enough resources for your expected player count.

Install Debian 12

In the dashboard, open your server management page, choose Reinstall, select Debian 12, and confirm. Save the new root password shown after the installation.

Connect over SSH

Install an SSH client such as Termius, create a host using your server IP, use root as the username, and connect with your root password.

Update the system

apt update && apt upgrade -y

Install phpMyAdmin (optional)

Only run third-party installation scripts you have reviewed and trust. This example installs phpMyAdmin:

bash <(curl -s https://raw.githubusercontent.com/JulianGransee/PHPMyAdminInstaller/main/install.sh)

Install FiveM

bash <(curl -s https://raw.githubusercontent.com/Squex0978/linux-fiveminstaller/main/fiveminstaller.sh)

Configure txAdmin

Open http://YOUR-SERVER-IP:40120 in your browser, follow the setup wizard, create an administrator account, and choose a server template.

Add your Cfx.re server key

Create a server key in Keymaster using your server IP, then add it in txAdmin under Settings → FXServer → License key.

FiveM: Fix ESX Legacy GetSharedObjectRestore compatibility for older resources that use the legacy ESX event.

Some older ESX resources still request the removed `esx:getSharedObject` event. If you maintain the server and need temporary compatibility, update the handler in your ESX resource.

Open shared.lua

On the FiveM server, open:

resources/[esx]/es_extended/shared/shared.lua

Find the legacy error handler

Locate the handler that prints the “getSharedObject event no longer exists” error.

Replace the handler

For a server-side handler that provides the ESX object to the callback, use:

AddEventHandler("esx:getSharedObject", function(cb)
    cb(ESX)
end)

Restart the server

Save the file and restart the FiveM server, then verify that the affected resources load.

Install a TeamSpeak server on LinuxInstall and start the TeamSpeak 3 server on a Linux host.

Prerequisites

  • A Linux VPS or root server.
  • SSH access and administrator privileges.

Update the system

sudo apt update && sudo apt upgrade -y

Create a server directory

mkdir -p /home/teamspeak
cd /home/teamspeak

Download the TeamSpeak server archive

wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2

Extract the archive

tar xvf teamspeak3-server_linux_amd64-3.13.7.tar.bz2

Accept the license and start the server

cd teamspeak3-server_linux_amd64
touch .ts3server_license_accepted
./ts3server_startscript.sh start

Connect as administrator

Save the server administrator token printed during the first start. Connect to the server IP in the TeamSpeak client and enter the token when prompted.

Set up a Garry’s Mod server on Debian 12Install and launch a Garry’s Mod dedicated server with SteamCMD.

Prerequisites

  • SteamCMD installed.
  • Basic SSH knowledge.
  • Screen is optional for a persistent terminal session.

Install server files with SteamCMD

In SteamCMD, set the install directory, sign in anonymously, then download and validate the server:

force_install_dir /root/gmod/
login anonymous
app_update 4020 validate

Create a start script

Create /root/gmod/run.sh and add a launch command. Replace the collection placeholder if you use a Workshop collection:

cd /root/gmod
nano run.sh
./srcds_run -game garrysmod -maxplayers 16 +gamemode sandbox +map gm_flatgrass +host_workshop_collection <collection-id>

Make the script executable and start the server

chmod u+x /root/gmod/run.sh
cd /root/gmod
./run.sh

Run in a Screen session (optional)

sudo apt install screen
screen -S gmod
cd /root/gmod && ./run.sh
Set up a Minecraft Vanilla server on LinuxDownload the server JAR, accept the EULA, and run Minecraft.

Prerequisites

  • A Linux VPS or root server with SSH access.
  • Java 21 or newer for current Minecraft releases (check the selected release requirements).
  • Screen is optional for background sessions.

Create the server directory

mkdir -p minecraft && cd minecraft

Download the server JAR

Download the server file for your selected Minecraft version from the official Minecraft download page. The supplied example URL is version-specific:

wget https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar

Accept the Minecraft EULA

Review the Minecraft EULA, then create eula.txt and set `eula=true` only if you agree to it:

printf "eula=true\n" > eula.txt

Start the server

Adjust memory to fit the resources available on your server:

java -Xms2G -Xmx2G -jar server.jar nogui

Run in Screen (optional)

screen -S minecraft
java -Xms2G -Xmx2G -jar server.jar nogui
Set up a Minecraft Purpur server on LinuxRun Purpur, a configurable Paper-based Minecraft server.

Prerequisites

  • A Linux server with SSH access.
  • Java version matching your chosen Minecraft release.
  • Screen is optional for background sessions.

Create a directory and download Purpur

The supplied URL downloads Purpur for Minecraft 1.20.1. Change the version in the URL when needed:

mkdir -p minecraft && cd minecraft
wget -O purpur.jar https://api.purpurmc.org/v2/purpur/1.20.1/latest/download

Accept the EULA

Review and accept the Minecraft EULA before starting the server:

printf "eula=true\n" > eula.txt

Start the server

java -Xms2G -Xmx2G -jar purpur.jar nogui

Use a Screen session (optional)

screen -S minecraft
java -Xms2G -Xmx2G -jar purpur.jar nogui
Set up a Minecraft Forge server on LinuxInstall Forge and launch a modded Minecraft server.

Prerequisites

  • A Linux server with SSH access.
  • Java that matches your Minecraft and Forge versions.
  • Screen is optional for background sessions.

Create a server directory

mkdir -p minecraft && cd minecraft

Download the Forge installer

Choose a compatible installer from the official Forge site. This is the supplied 1.20.1 example:

wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.1.0/forge-1.20.1-47.1.0-installer.jar

Install the server files

java -jar forge-1.20.1-47.1.0-installer.jar --installServer

Accept the EULA

Review and accept the Minecraft EULA before starting:

printf "eula=true\n" > eula.txt

Start Forge

Use the generated run script (the exact files may vary by Forge version):

chmod +x run.sh
./run.sh
Applications3
Install Kasm WorkspacesDeploy browser-based workspaces using Docker.

Kasm Workspaces streams isolated browser and desktop environments to a browser tab. The commands below refer to the legacy 1.12.0 release from the supplied guide.

Prerequisites

  • Minimum example: 2 vCPUs, 4 GB RAM, and 50 GB storage.
  • Recommended example: 4 vCPUs, 10 GB RAM, and 60 GB SSD.
  • The supplied release lists Ubuntu 22.04 LTS; check current Kasm requirements before installing.

Download and extract the installer

cd /tmp
curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.12.0.d4fd8a.tar.gz
tar -xf kasm_release_1.12.0.d4fd8a.tar.gz

Start the installation

sudo bash kasm_release/install.sh --accept-eula --swap-size 4096

Save the generated credentials

When installation completes, securely save the credentials shown in the terminal. They may not be displayed again.

Open the web interface

Visit https://YOUR-SERVER-IP and sign in using the administrator account and generated password. Change default credentials if prompted, then select a workspace from the Workspaces area.

Install MongoDB on LinuxInstall and verify MongoDB on Ubuntu 22.04 (Jammy).

The repository configuration below targets Ubuntu 22.04 (Jammy) and MongoDB 6.0, which is an older release. Do not use it unchanged on Debian or another Ubuntu release.

Prerequisites

  • Ubuntu 22.04 server with root or sudo access.
  • A MongoDB version that is still supported for your workload.

Update and install prerequisites

sudo apt update && sudo apt upgrade -y
sudo apt install -y gnupg curl

Add the MongoDB signing key

curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-6.0.gpg

Add the Ubuntu Jammy repository

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

Install MongoDB

sudo apt update
sudo apt install -y mongodb-org

Start and enable the service

sudo systemctl enable --now mongod
sudo systemctl status mongod

Test the MongoDB shell

mongosh
Install Nextcloud on Linux with DockerDeploy Nextcloud and MariaDB using Docker Compose.

Prerequisites

  • A Linux server with at least 2 GB RAM.
  • Docker Engine and the Docker Compose plugin.
  • A domain or subdomain is recommended for HTTPS.

Create a working directory

mkdir -p /opt/nextcloud && cd /opt/nextcloud

Create a Compose file

Create compose.yaml and use strong, unique secrets instead of the example placeholders:

services:
  db:
    image: mariadb:10.11
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: REPLACE_WITH_A_LONG_RANDOM_ROOT_SECRET
      MYSQL_PASSWORD: REPLACE_WITH_A_DIFFERENT_LONG_RANDOM_SECRET
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud

  app:
    image: nextcloud:latest
    restart: unless-stopped
    ports:
      - "8080:80"
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      MYSQL_PASSWORD: REPLACE_WITH_A_DIFFERENT_LONG_RANDOM_SECRET
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_HOST: db

volumes:
  nextcloud:
  db:

Start Nextcloud

docker compose up -d

Complete setup

Open http://YOUR-SERVER-IP:8080 and follow the Nextcloud setup wizard to create an administrator account.

Need help with your server?

Contact Defo Cloud support if you need a hand with your service.

Contact support