This is the 1st time I worked with docker there might be some errors, but currently I did not find any
If you are using a VPS, make sure to open port 28960 (both TCP and UDP) in your VPS firewall using iptables or ufw, and in your VPS provider's control panel.
Ensure Docker is installed on your system. If not, download it
sudo apt get-update && sudo apt get-install docker.io
docker pull viduwa/cod4-linux-server:latest
docker run -d -t --name cod4server -p 28960:28960/tcp -p 28960:28960/udp viduwa/cod4-linux-server:latest
docker exec -it cod4server /bin/bash
- Inside the container, edit
main/server.cfg
usingvim
:
vim main/server.cfg
- add the token obtained from cod4master.cod4x.ovh to line 15.
- then configure the server.cfg as you wish.
tmux attach-session -t cod4server
./cod4x18_dedrun +set dedicated 2 +set net_ip 000.000.000.000 +set net_port 28960 +set modstats 0 +set rcon_password “Password” +set sv_maxclients 16 +exec server.cfg
- Start a promod server
./cod4x18_dedrun +set dedicated 2 +set fs_game "Mods/pml220" +set net_ip 000.000.000.000 +set net_port 28960 +set modstats 0 +set rcon_password “Password” +set sv_maxclients 16 +exec server.cfg
- Cod4 Promod Commands
- Start 5v5 match with 24 rounds and knife round:
promod_mode mr12_match_knife_pb
- Start 5v5 match with 24 rounds and knife round:
- It's easy to connect back into console while server is running.
- while server run on tmux you can use container bash for edit server.cfg
- Use rcon pw to control server using
set rcon_password “Password”
- Login to rcon in client using
rcon login "Password"