Urban Terror Forums: [HowTo] Start your First 4.2 Server - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2

[HowTo] Start your First 4.2 Server Rate Topic: -----

A detailed walkthrough.

#1 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 26 March 2013 - 11:43 PM

How to Install Urban Terror Server on Linux.

For the purpose of this walk through we'll have to make some assumptions.

1. We are using Ubuntu Server Edition.
2. Username is Nitro.
3. Users Home Dir is /home/nitro.
4. User has access either to Sudo/Root.
5. Server has an External IP of 85.140.33.17.
6. You are talented enough to understand the basics such as console editors or atleast competent enough to read a manual.
7. You have already downloaded the server files from the download section of this website.


Step 1: Prepare Server files.

Quote

nitro@phoenix:$ cd home/nitro/
nitro@phoenix:$ tar -xvf UrbanTerror42_ded-2.tar.gz
nitro@phoenix:$ cd UrbanTerror42/
nitro@phoenix:$ ./UrTUpdater_Ded.i386

## At this point follow the onscreen instructions to download the remaining server files, this may take a few minutes.
## 64bit server users may wish to install ia32libs for compatibility reasons
## You can also use the 64 bit binary instead (Quake3-UrT-Ded.x86_64) however it is not recommended.

nitro@phoenix:/$ sudo apt-get install ia32libs


Step 2: Creating a Server Start Script.
Lets create a start script using our favourite editor (mines is "vi" but you can substitute nano or others if you wish)
VI Manual

Quote

nitro@phoenix:$ vi start.sh


Inside this new file add:

Quote

#!/bin/bash

# change to the script's directory
cd $(dirname $0)

# start the server in the background
./Quake3-UrT-Ded.i386 +set fs_game q3ut4 +set fs_basepath /home/nitro/UrbanTerror42/ +set fs_homepath /home/nitro/UrbanTerror42/ +set dedicated 2 +set net_ip 85.140.33.17 +set net_port 27960 +set com_hunkmegs 128 +exec server.cfg &

# write the pid file
echo $! > urt.pid

Save the file: :wq!


Step 3: Creating a Stop Script.
Lets create a stop script using our favourite editor (mines is "vi" but you can substitute nano or others if you wish)

Quote

nitro@phoenix:$ vi stop.sh


Inside this file add:

Quote

#!/bin/bash

# change to the script's directory
cd $(dirname $0)

# kill, using the pid file
kill $(cat urt.pid)

# tidy up
rm urt.pid

Save Again: :wq!


Step 4: Configuring your Server
lets open the configuration file to edit the server settings and customise it with our on personal server details and then followed by picking our map cycle.

Quote

nitro@phoenix:$ vi q3ut4/server.cfg
nitro@phoenix:$ vi q3ut4/mapcycle.txt


Step 5: Adding Custom Maps to the server.
To add custom maps simply download the map.pk3 file into your /q3ut4/ directory then add its name minus the ".pk3" part to your mapcycle list.

Quote

nitro@phoenix:$ cd /q3ut4/
nitro@phoenix:$ wget ftp://ftp.snt.utwent...4/ut4_baeza.pk3
nitro@phoenix:$ vi mapcycle.txt
nitro@phoenix:$ cd ../


Step 6: Testing out your Server.
First we need to make our scripts and server binary executable and then take ownership of all files to prevent any unnecessary errors.

Quote

nitro@phoenix:$ sudo chmod a+x start.sh stop.sh Quake3-UrT-Ded.i386
nitro@phoenix:$ sudo chown -R nitro:nitro *
nitro@phoenix:$ ./start.sh

##Stopping your server to make changes:
nitro@phoenix:$ ./stop.sh



Step 7: Running your server under "Screen"
This step is for those of you that like to use the screen app to manage your servers.

Quote

nitro@phoenix:~$ sudo apt-get install screen
nitro@phoenix:~$ cd UrbanTerror42/
nitro@phoenix:~$ screen -S UrbanTerror
nitro@phoenix:~$ ./start.sh

To detach from the screen then logout use CTRL + A + D

To reattach once logged back in use:

Quote

nitro@phoenix:~$ screen -r UrbanTerror

Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#2 User is offline   darkswat96 Icon

  • Account: darkswat96
  • Joined: 23-February 14
  • Posts: 1

Posted 23 February 2014 - 06:44 PM

when i done all,where can i see my server in game?

#3 User is offline   Courgette Icon

  •   community dev   
    B3 bot developer
  • Account: courgette
  • Main tag: [B3]
  • Country:
  • Joined: 09-June 09
  • Posts: 204

Posted 23 February 2014 - 09:34 PM

Quote

+set com_hunkmegs 128

Can you explain this bit ?

#4 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 26 February 2014 - 12:16 AM

what exactly would you like me to explain Courgette? I know you have been round the game a long time so I assume that you know what com_hunkmegs is for. I set it to 128 because that is all the dedicated server requires in my experience. Some custom maps like IcyJumps have been known to require more, so setting the number higher would simply allocate more memory to the server at launch without the need to reallocate additional memory if the preallocated memory becomes full later.
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#5 User is offline   Fenix Icon

  •   former FS member   
  • Account: fenix
  • Country:
  • Joined: 06-December 10
  • Posts: 425

Posted 26 February 2014 - 08:12 PM

View PostNitro, on 26 February 2014 - 12:16 AM, said:

what exactly would you like me to explain Courgette? I know you have been round the game a long time so I assume that you know what com_hunkmegs is for. I set it to 128 because that is all the dedicated server requires in my experience. Some custom maps like IcyJumps have been known to require more, so setting the number higher would simply allocate more memory to the server at launch without the need to reallocate additional memory if the preallocated memory becomes full later.


com_hunkmegs is the upper limit. Usually UrT servers don't take more than 128mb, but in some cases servers may crash (also if there is still free memory) if using values < 384 (that's why it's adviced not to go below this value

bullet_loaderAdvertisement

#6 User is offline   Courgette Icon

  •   community dev   
    B3 bot developer
  • Account: courgette
  • Main tag: [B3]
  • Country:
  • Joined: 09-June 09
  • Posts: 204

Posted 26 February 2014 - 10:49 PM

Thanks guys, actually I did not know exactly what com_hunkmegs was about :) I knew it was about memory, but I know nothing about best practices with it.

#7 User is offline   aeromatic Icon

  • Account: aeromatic
  • Main tag: [#]
  • Country:
  • Joined: 04-February 14
  • Posts: 9

Posted 27 February 2014 - 08:29 PM

By the way, I've noticed in the past a few people would get confused when editing the server.cfg/mapcycle.txt. In 4.2 they are actually named server_example.cfg or mapcycle_example.txt. Just thought I'd point that out. :)

#8 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 27 February 2014 - 08:33 PM

just to point that out.(xD) editing the *_example.* files wont setup anything.
they have to be called server.cfg or mapcycle.txt
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#9 User is offline   aeromatic Icon

  • Account: aeromatic
  • Main tag: [#]
  • Country:
  • Joined: 04-February 14
  • Posts: 9

Posted 27 February 2014 - 08:44 PM

Yes, they have to rename them to that or in the start.sh add the _example to the server.cfg and in the server.cfg they have to rename the mapcycle filename with the _example.(Should have also said that in my first post) =P

This post has been edited by aeromatic: 27 February 2014 - 08:47 PM


#10 User is offline   Phn420stoner Icon

Posted 13 August 2014 - 09:11 PM

So we set up a server last night and three of us cant see the server in the master list but people are seeing it and joining how do we fix that ?

  • (2 Pages)
  • +
  • 1
  • 2


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942