Author Topic: How to start a Linux Paintball Server (Build 46 / Apr 13 2024)  (Read 39217 times)

ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
How to start a Linux Paintball Server (Build 46 / Apr 13 2024)
« on: November 01, 2013, 04:20:42 PM »
BASIC

Use a ssh program like Putty (Link) (necessary if you use Windows)
Guide based on b46, should work with any linux_full version. Check ftp://otb-server.de/pub/Game/ for the newest one.
Connect to your server (Debian, commands may change on other distro) and login as root.
Attention: The server may not launch properly if the necessary libs aren't installed.

As user root:
apt update && apt dist-upgrade
apt install screen

useradd -m -s /bin/bash paintball
passwd paintball (use another password than root!)
su paintball

As user paintball:
cd
wget ftp://otb-server.de/pub/Game/paintball2_build046_linux_full.tar.gz
tar xvf paintball2_build046_linux_full.tar.gz
cd paintball2
cp ./pball/configs/server.cfg ./pball/configs/myserver1.cfg
nano pball/configs/myserver1.cfg (This is the serverconfig for your server, you can add standard settings, logins etc here)
nano pball/configs/motd.txt (This file contains the Message of the Day, which you see when you join the server)
nano pball/configs/rotation.txt (This file containts the rotation for the server)
chmod +x paintball2
./paintball2 +set dedicated 1 +exec myserver1.cfg +set port 11111 +map arenaball
Check the serverbrowser if you see your server.
If you get an error like "paintball2 not found", read the error part.


Error
As user root:
Debian 7 and earlier:
As root:

dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs

Debian 8 and newer:
As root:

dpkg --add-architecture i386
apt-get update
apt-get install build-essential gcc-multilib rpm libstdc++6 libgcc1 zlib1g libncurses5 libc6


If you want to run your server in background:
nano /home/paintball/paintball2/myserver1.sh
Copy & Paste + Modify:
Quote
while true; do
./paintball2 +set dedicated 1 +exec myserver1.cfg +set port 11111 +map arenaball
done
chmod +x /home/paintball/paintball2/myserver1.sh
screen -A -m -d -S myserver1 ./myserver1.sh

Screen: Get back to the myserver1 console
Regarding screen, if you need to get back to the myserver1 console, you can use "screen -r myserver1" to restore it.  "myserver1" is whatever you specified in in the after "screen -S".
screen -r myserver1

Multiple server
Just replace the highlighted green word (myserver1) with another word (a.e. match (match.cfg, match.sh, ...)) and the port in the .sh file!

Useful commands

Update your Mapfolder with wget
Public Maps
Code: [Select]
wget -N -P /home/paintball/paintball2/pball/maps ftp://www.otb-server.de/pub/Maps/*.bsp
Beta Maps:
Code: [Select]
wget -N -P /home/paintball/paintball2/pball/maps/beta ftp://www.otb-server.de/pub/Maps/beta/*.bsp
Jump Maps:
Code: [Select]
wget -N -P /home/paintball/paintball2/pball/maps/jump ftp://www.otb-server.de/pub/Maps/jump/*.bsp
Mapinfos:
Code: [Select]
wget -N -P /home/paintball/paintball2/pball/maps/mapinfo ftp://www.otb-server.de/pub/Maps/mapinfo/*.txt
« Last Edit: April 13, 2024, 06:05:39 AM by ic3y »

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #1 on: November 01, 2013, 04:32:31 PM »
Thats good (maybe remember to use an own password for the paintball user) :D

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #2 on: November 01, 2013, 04:33:09 PM »
Stickied.

Regarding screen, if you need to get back to the server console, you can use "screen -r server" to restore it.  "server" is whatever you specified in in the after "screen -S".

SuperMAn

  • Committee Member
  • Autococker
  • Posts: 902
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #3 on: December 31, 2013, 10:32:11 AM »
Copied this to the wiki.  Didn't do all the formatting though.  One day when I am bored I will go through and fix formatting on some wiki pages.

Since these commands don't work on all linux distros, I might make a duplicate of this guide and just replace the commands.  Then there should also be a section at the top saying which distros this works on.

http://wiki.digitalpaint.org/doku.php?id=linux_server_setup_guide

Cameron

  • Global Moderator
  • Autococker
  • Posts: 2686
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #4 on: January 01, 2014, 12:11:18 AM »
Probably also add if running multiple screens (and hence multiple servers), that you can list them with 'screen -ls' or 'screen -list', as you may forget the names.

Aero

  • PGP
  • Posts: 47
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #5 on: January 31, 2014, 01:34:12 AM »
please add, that 64 bit server users have to install  "libXxf86vm" , else they will get wiered error like file not found(while it exists and permission is given).

ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #6 on: January 31, 2014, 04:51:45 AM »
please add, that 64 bit server users have to install  "libXxf86vm" , else they will get wiered error like file not found(while it exists and permission is given).
ia32-libs should be fine, idk you package. Which system?

SuperMAn

  • Committee Member
  • Autococker
  • Posts: 902
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #7 on: January 31, 2014, 08:57:32 AM »
please add, that 64 bit server users have to install  "libXxf86vm" , else they will get wiered error like file not found(while it exists and permission is given).
ia32-libs should be fine, idk you package. Which system?

Maybe just include a note saying that the server may not launch properly if the necessary libs aren't installed.  The required libs will be displayed after attempting to launch the server.

Installed libs will be different for every distro.  I had to install glibc on my new 64bit Centos 6.3 VPS.

Neoterra

  • VM-68
  • Posts: 107
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #8 on: April 13, 2014, 10:10:00 PM »
Not working for me with SUSE as distribution. I changed to Debian and it works fine.
The point on beginnig is not there.
/paintball2 +set dedicated 1 +exec server.cfg +set port 11111 +map arenaball
5 Minutes i need to look where my failure was. :) Sry my first time to handle a server.
Maybe little lines how i can restart server.

But thanks for your work. Help me alot.

mRokita

  • Autococker
  • Posts: 598
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #9 on: April 14, 2014, 12:34:53 AM »
To restart your pb server you have to check the PID of the screen.
To do it, simply type screen -ls.
Than find the screen name of your pb server.
When you will find it, just read the number before the dot and type "kill NUMBER_HERE"
To restart the server type screen -S pbserv than enter ./server.sh .

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #10 on: April 14, 2014, 01:48:10 PM »
Hm, just a note -- you should not edit server.cfg directly, as it will be overwritten by new releases.  You should rename/copy server.cfg to something like myserver.cfg or server_pub1.cfg, then customize it.

Ace

  • Autococker
  • Posts: 661
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #11 on: January 27, 2015, 12:33:50 AM »
One small thing, instead of the some of the chmod calls, should use "script /dev/null" instead, bit more secure.

ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #12 on: January 27, 2015, 03:10:15 AM »
One small thing, instead of the some of the chmod calls, should use "script /dev/null" instead, bit more secure.
Hm, could you give an example maybe? Idk /dev/null in combination with chmod.

Ace

  • Autococker
  • Posts: 661
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #13 on: January 27, 2015, 12:05:01 PM »
It has to do with permissions, sudo, and the "Cannot open your terminal '/dev/pts/4' - please check." error. There is no combination, you would just "script /dev/null" instead of "chmod +x filename"

/dev/null is kind of a black hole, so permission "error" is still there, but it suppresses it. The advantage from what I've seen is that the other common way, chmod +x, can give other users permission in your terminal. /dev/null keeps the screen to the current user only.


firefoxx04

  • PGP
  • Posts: 3
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #14 on: March 03, 2015, 09:40:45 PM »
Can Digital Paintball server run during boot?

Also, can I install and configure the server without a GUI? I like how little system resources CentOS and Debian use. I currently run a centOS VM and its using less than 200mb ram. I might just install a gui to install DP2 and then remove the gui when I am done.

Cheers!

ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #15 on: March 04, 2015, 12:43:50 AM »
Can Digital Paintball server run during boot?

Also, can I install and configure the server without a GUI? I like how little system resources CentOS and Debian use. I currently run a centOS VM and its using less than 200mb ram. I might just install a gui to install DP2 and then remove the gui when I am done.

Cheers!
The guide dont use any gui.

mRokita

  • Autococker
  • Posts: 598
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #16 on: March 04, 2015, 11:26:45 PM »
Can Digital Paintball server run during boot?

Also, can I install and configure the server without a GUI? I like how little system resources CentOS and Debian use. I currently run a centOS VM and its using less than 200mb ram. I might just install a gui to install DP2 and then remove the gui when I am done.

Cheers!
I run my servers on Debian without any GUI.
Yeah,  you can run it on boot. Every GNU/Linux has a kind of an Autostart script.

Davew_

  • PGP
  • Posts: 46
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #17 on: December 24, 2015, 05:11:41 PM »
the download link is dead use wget http://crack-gaming.de/paintball2/Paintball%202/Paintball%202.0%20Alpha%20build041/paintball2_build041_linux_full.tar.gz

then tar xzf paintball2_build041_linux_full.tar.gz

mRokita

  • Autococker
  • Posts: 598
Re: How to start a Linux Paintball Server (Build 40 / Nov 1 2013)
« Reply #18 on: December 24, 2015, 07:24:04 PM »
downloading maps - faster way thanks to ic3y's mappack

Pub maps:
Code: [Select]
cd /home/paintball/paintball2/pball/maps
wget https://dp.mrokita.pl/files/mappacks/pubmaps_20151103.tar.gz
tar -xvzf pubmaps_20151103.tar.gz

Beta maps:
Code: [Select]
cd /home/paintball/paintball2/pball/maps/beta
wget https://htmldp.com/files/mappacks/betamaps_20151103.tar.gz
tar -xvzf betamaps_20151103.tar.gz

Jump maps:
Code: [Select]
cd /home/paintball/paintball2/pball/maps/jump
wget https://htmldp.com/files/mappacks/jumpmaps_20151103.tar.gz
tar -xvzf jumpmaps_20151103.tar.gz

Davew_

  • PGP
  • Posts: 46
Re: How to start a Linux Paintball Server (Build 41 / Dec 25 2015)
« Reply #19 on: December 27, 2015, 07:30:00 AM »
Can Digital Paintball server run during boot?

Also, can I install and configure the server without a GUI? I like how little system resources CentOS and Debian use. I currently run a centOS VM and its using less than 200mb ram. I might just install a gui to install DP2 and then remove the gui when I am done.

Cheers!

mRokita
figured this out today
All 5 of my servers start on boot up
he made a script in the /root directory
r.sh
and runall.sh

r.sh
#cd /home/paintball/paintball2
#sudo -u paintball screen -A -m -d -S pub1 ./pub1.sh
#sudo -u paintball screen -A -m -d -S pub2 ./pub2.sh

cd /home/paintball2/paintball2
sudo -u paintball2 screen -A -m -d -S match1 ./match1.sh
#sudo -u paintball2 screen -A -m -d -S match2 ./match2.sh
#sudo -u paintball2 screen -A -m -d -S match3 ./match3.sh

runall.sh

cd /home/paintball/paintball2
sudo -u paintball screen -A -m -d -S pub1 ./pub1.sh
sudo -u paintball screen -A -m -d -S pub2 ./pub2.sh

cd /home/paintball2/paintball2
sudo -u paintball2 screen -A -m -d -S match1 ./match1.sh
sudo -u paintball2 screen -A -m -d -S match2 ./match2.sh
sudo -u paintball2 screen -A -m -d -S match3 ./match3.sh

all 5 servers now start on boot up of the linux box

thanks to mRokita and ic3y for this whole thread and the help