Skip to content

viduwaa/cod4-linux-server-w-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

Call of Duty 4 Server Setup with Docker

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.

Prerequisites

Ensure Docker is installed on your system. If not, download it

sudo apt get-update && sudo apt get-install docker.io

1. Pull the Docker Image

docker pull viduwa/cod4-linux-server:latest

2. Run the Docker Container

docker run -d -t --name cod4server -p 28960:28960/tcp -p 28960:28960/udp viduwa/cod4-linux-server:latest

3. Connect to the Docker Container

docker exec -it cod4server /bin/bash

4. Edit server.cfg

  • Inside the container, edit main/server.cfg using vim:
vim main/server.cfg
  • add the token obtained from cod4master.cod4x.ovh to line 15.
  • then configure the server.cfg as you wish.

6. Attach to tmux Session to start the server

tmux attach-session -t cod4server

7. Start the Server

Normal

./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

Promod

  • 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

Why tmux ?

  • 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

Other Ways ?

  • Use rcon pw to control server using set rcon_password “Password”
  • Login to rcon in client using rcon login "Password"

🔗 Links

portfolio linkedin

About

Call of duty 4 linux server with docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published