{"id":1766,"date":"2026-06-07T12:24:50","date_gmt":"2026-06-07T11:24:50","guid":{"rendered":"https:\/\/grimms3dworlds.ddns.net\/?page_id=1766"},"modified":"2026-06-07T12:26:49","modified_gmt":"2026-06-07T11:26:49","slug":"1766-2","status":"publish","type":"page","link":"https:\/\/grimms3dworlds.ddns.net\/index.php\/1766-2\/","title":{"rendered":"Call of Duty 2 server setup (linux)"},"content":{"rendered":"\n<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 900px; margin: 0 auto; padding: 20px; background: #ffffff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);\">\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">This guide walks you through setting up a Call of Duty 2 dedicated server on an Ubuntu Server. Follow the steps carefully to ensure a smooth setup. The guide supports version 1.3 only.<\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Requirements<\/h2>\n    <ul style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Ubuntu Server<\/li>\n        <li style=\"margin-bottom: 8px;\">Local IP of the server (e.g., 192.168.0.123)<\/li>\n        <li style=\"margin-bottom: 8px;\">A Copy of Call of Duty 2 patched to version 1.3<\/li>\n        <li style=\"margin-bottom: 8px;\">Access to your router to forward ports (default: 28960 UDP)<\/li>\n    <\/ul>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Optional: Create a User for the Server<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">We will use the username <code>gameservers<\/code> for this guide. You can change it to any name, but ensure consistency throughout.<\/p>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create the user:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo adduser --home \/home\/gameservers gameservers<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Grant sudo access (optional):<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo usermod -aG sudo gameservers<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Switch to the user:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>su - gameservers<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Setting Up the Files<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create a new directory:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>mkdir cod2<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Navigate to the directory:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>cd cod2<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create a main folder:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>mkdir main<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Copy all <strong>.iwd<\/strong> files from your Call of Duty 2 1.3 installation&#8217;s <code>main<\/code> folder into the server <code>main<\/code> folder. Use SFTP (FileZilla), Bitvise, or similar.<br>\n    <span style=\"color: red;\">Required files include:<\/span> <code>iw_00.iwd<\/code> \u2192 <code>iw_15.iwd<\/code> and the localized files (e.g. <code>localized_english_iw00.iwd<\/code> \u2192 <code>localized_english_iw11.iwd<\/code>).<\/p>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create a pb folder (optional \u2013 PunkBuster is defunct):<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>mkdir pb<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">With the <code>cod2<\/code> folder as your working directory, download the server binary:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>wget https:\/\/www.moddb.com\/downloads\/start\/110849 -O cod2-lnxded-1.3.tar.bz2<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Extract the files:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>tar -xvf cod2-lnxded-1.3.tar.bz2<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Remove the archive:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>rm cod2-lnxded-1.3.tar.bz2<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Make the binary executable:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>chmod +x cod2_lnxded<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">The Call of Duty 2 binaries are 32-bit. Enable 32-bit support:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo dpkg --add-architecture i386<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Update packages and install dependencies:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo apt update\nsudo apt install libc6-i386 libstdc++5:i386 lib32stdc++6<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Test the server:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>.\/cod2_lnxded<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Press <code>Ctrl+C<\/code> to stop the test.<\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">\u26a0\ufe0f Important Warning: Mod Files<\/h2>\n    <p style=\"background: #f8d7da; border: 1px solid #f5c6cb; padding: 15px; color: #721c24; border-radius: 5px;\">\n        <strong>Do not place mod files directly into the <code>main\/<\/code> folder.<\/strong><br>\n        Doing so can corrupt client downloads, cause version mismatches, and break the game for players who have a clean installation. Always place mods in their own folder under <code>cod2\/mods\/<\/code> (see Mod Setup section below).\n    <\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Server Configuration<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create <code>server.cfg<\/code> inside the <code>main<\/code> folder and paste the cleaned configuration below:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; max-height: 500px; overflow-y: auto; overflow-x: auto;\"><code>\/\/ Call of Duty 2 v1.3 Server Configuration\n\/\/ Save as main\/server.cfg\n\nset rcon_password \"your_strong_rcon_password\"   \/\/ Better to set via command line\nset sv_privatePassword \"\"\nset g_password \"\"                               \/\/ Leave empty for public server\n\nset sv_hostname \"My CoD2 Server\"\nset scr_motd \"Welcome to My CoD2 Server!\"\n\nset sv_maxclients \"32\"\nset sv_privateClients \"0\"\n\nset sv_pure \"1\"\nset sv_cheats \"0\"\nset sv_allowAnonymous \"0\"\nset sv_floodProtect \"1\"\n\nset g_log \"server_mp.log\"\nset g_logSync \"1\"\nset logfile \"2\"\n\nset sv_maxRate \"25000\"\nset sv_minPing \"0\"\nset sv_maxPing \"250\"\n\nset sv_allowdownload \"1\"\nset sv_wwwDownload \"1\"\nset sv_wwwBaseURL \"\"                    \/\/ e.g. http:\/\/yourdomain.com\/cod2redirect\nset sv_wwwDlDisconnected \"0\"\n\nset g_allowvote \"0\"\nset scr_teambalance \"1\"\nset scr_forcerespawn \"1\"\nset scr_killcam \"0\"\nset scr_spectatefree \"0\"\nset scr_spectateenemy \"0\"\n\nset g_gametype \"tdm\"                    \/\/ Change to dm, sd, ctf, hq as needed\n\n\/\/ Game Type Limits\n\/\/ TDM\nset scr_tdm_scorelimit \"300\"\nset scr_tdm_timelimit \"20\"\n\n\/\/ DM\nset scr_dm_scorelimit \"50\"\nset scr_dm_timelimit \"15\"\n\n\/\/ SD\nset scr_sd_scorelimit \"10\"\nset scr_sd_timelimit \"0\"\nset scr_sd_roundlimit \"0\"\nset scr_sd_graceperiod \"15\"\nset scr_sd_roundlength \"4\"\n\n\/\/ CTF \/ HQ (add your preferred values)\n\n\/\/ Weapon Restrictions (1 = enabled, 0 = disabled)\nset scr_allow_m1garand \"1\"\nset scr_allow_m1carbine \"1\"\nset scr_allow_thompson \"1\"\nset scr_allow_bar \"1\"\nset scr_allow_springfield \"1\"\nset scr_allow_enfield \"1\"\nset scr_allow_sten \"1\"\nset scr_allow_bren \"1\"\nset scr_allow_kar98k \"1\"\nset scr_allow_mp40 \"1\"\nset scr_allow_mp44 \"1\"\nset scr_allow_nagant \"1\"\nset scr_allow_ppsh \"1\"\nset scr_allow_kar98ksniper \"1\"\nset scr_allow_enfieldsniper \"1\"\nset scr_allow_nagantsniper \"1\"\nset scr_allow_svt40 \"1\"\nset scr_allow_g43 \"1\"\nset scr_allow_shotgun \"1\"\nset scr_allow_pps42 \"1\"\nset scr_allow_greasegun \"1\"\nset scr_allow_smokegrenades \"0\"\nset scr_allow_fraggrenades \"1\"\n\n\/\/ Map Rotation Example (TDM)\nset sv_mapRotation \"gametype tdm map mp_breakout gametype tdm map mp_burgundy gametype tdm map mp_carentan gametype tdm map mp_dawnville gametype tdm map mp_decoy gametype tdm map mp_matmata gametype tdm map mp_railyard gametype tdm map mp_toujane\"\n\nmap_rotate<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">HTTP Redirect Setup (Fast Downloads)<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">To reduce bandwidth usage on the game server and speed up player joins, set up an HTTP redirect:<\/p>\n    <ol style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Upload all <strong>client-needed<\/strong> files (mostly .iwd files from <code>main\/<\/code> and your mod folder) to a web server.<\/li>\n        <li style=\"margin-bottom: 8px;\">Do <strong>NOT<\/strong> upload files containing <code>svr<\/code> in the name (server-only files).<\/li>\n        <li style=\"margin-bottom: 8px;\">Set the URL in your config: <code>set sv_wwwBaseURL \"http:\/\/yourdomain.com\/cod2redirect\"<\/code><\/li>\n        <li style=\"margin-bottom: 8px;\">Enable with <code>set sv_wwwDownload \"1\"<\/code> and <code>set sv_allowdownload \"1\"<\/code>.<\/li>\n    <\/ol>\n    <p style=\"background: #fff3cd; border: 1px solid #ffeeba; padding: 15px; color: #856404; border-radius: 5px;\">\n        <strong>Tip:<\/strong> Use Apache\/Nginx with directory listing disabled. Keep filenames short and limit the total number of .iwd files.\n    <\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Mod Setup (Important)<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">To run a mod (e.g. Promod, custom maps, etc.):<\/p>\n    <ol style=\"color: #4a4a4a; padding-left: 20px;\">\n        <li style=\"margin-bottom: 8px;\">Create a folder inside <code>cod2\/mods\/<\/code> with your mod name (e.g. <code>mods\/promod<\/code>)<\/li>\n        <li style=\"margin-bottom: 8px;\">Place all mod files (<code>.iwd<\/code>, <code>mod.ff<\/code>, scripts, etc.) inside that folder.<\/li>\n        <li style=\"margin-bottom: 8px;\">Add to your startup line or config: <code>+set fs_game \"mods\/promod\"<\/code><\/li>\n    <\/ol>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Running the Server<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Start the server with (use <strong>dedicated 1<\/strong> for production\/internet servers):<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>.\/cod2_lnxded +set dedicated 1 +set sv_punkbuster 0 +set net_ip 192.168.0.123 +set net_port 28960 +set rcon_password \"your_strong_rcon_password\" +exec server.cfg +map mp_carentan<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"background: #fff3cd; border: 1px solid #ffeeba; padding: 15px; color: #856404; border-radius: 5px; margin-bottom: 20px;\">\n        <strong>Port Forwarding:<\/strong> Forward UDP port 28960 (and preferably 20500-20510) to your server&#8217;s local IP.<br>\n        <strong>dedicated 1<\/strong> = Internet \/ production server.\n    <\/p>\n\n    <h2 style=\"color: #1a3c5e; margin-bottom: 15px; border-bottom: 2px solid #e0e6ed; padding-bottom: 8px;\">Running as a Service (systemd + tmux)<\/h2>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Create the service files as root.<\/p>\n\n    <h3 style=\"color: #1a3c5e;\">Master TMUX Service<\/h3>\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">\n        <strong>Why do we need a master service?<\/strong> Without it, systemd may spawn multiple tmux instances when restarting services, leading to orphaned sessions and duplicate servers. The master session keeps everything under one controlled tmux environment.\n    <\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo nano \/etc\/systemd\/system\/master.service<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p>Paste:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>[Unit]\nDescription=tmux master service\nWants=network-online.target\n\n[Service]\nType=forking\nUser=gameservers\nExecStart=\/usr\/bin\/tmux new-session -s master -d\nExecStop=\/usr\/bin\/tmux kill-session -t master\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <h3 style=\"color: #1a3c5e;\">CoD2 Server Service<\/h3>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo nano \/etc\/systemd\/system\/cod2server.service<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n    <p>Paste (adjust paths and startup command as needed):<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>[Unit]\nDescription=Call of Duty 2 Server\nPartOf=master.service\nAfter=master.service\n\n[Service]\nType=forking\nUser=gameservers\nWorkingDirectory=\/home\/gameservers\/cod2\nExecStart=\/usr\/bin\/tmux new-session -s cod2server -d '.\/cod2_lnxded +set dedicated 1 +set sv_punkbuster 0 +set net_ip 192.168.0.123 +set net_port 28960 +set rcon_password \"your_strong_rcon_password\" +exec server.cfg +map mp_carentan'\nExecStop=\/usr\/bin\/tmux kill-session -t cod2server\nRestart=always\nRestartSec=5\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Enable and start:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo systemctl daemon-reload\nsudo systemctl enable master.service\nsudo systemctl enable cod2server.service\nsudo systemctl start master.service\nsudo systemctl start cod2server.service<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"color: #4a4a4a; line-height: 1.6;\">Check status and attach to console:<\/p>\n    <div style=\"position: relative; margin-bottom: 20px;\">\n        <pre style=\"background: #1e1e1e; color: #ffffff; padding: 15px; border-radius: 5px; font-size: 14px; line-height: 1.4; overflow-x: auto;\"><code>sudo systemctl status cod2server.service\ntmux attach-session -t cod2server<\/code><\/pre>\n        <button style=\"position: absolute; top: 10px; right: 10px; background: #007bff; color: #ffffff; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;\" onclick=\"copyCode(this)\">Copy<\/button>\n    <\/div>\n\n    <p style=\"background: #e7f3fe; border: 1px solid #b6d4fe; padding: 15px; color: #0c5460; border-radius: 5px; margin-bottom: 20px;\">\n        <strong>Note:<\/strong> The server will now run automatically and restart on crash. Detach from tmux with <code>Ctrl+B<\/code> then <code>D<\/code>.\n    <\/p>\n\n<\/div>\n\n<script>\nfunction copyCode(button) {\n    const pre = button.previousElementSibling;\n    const code = pre.querySelector('code') || pre;\n    const text = code.innerText || code.textContent;\n    navigator.clipboard.writeText(text).then(() => {\n        const original = button.textContent;\n        button.textContent = 'Copied!';\n        button.style.background = '#28a745';\n        setTimeout(() => {\n            button.textContent = original;\n            button.style.background = '#007bff';\n        }, 2000);\n    }).catch(err => console.error('Failed to copy: ', err));\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>This guide walks you through setting up a Call of Duty 2 dedicated server on an Ubuntu Server. Follow the steps carefully to ensure a smooth setup. The guide supports version 1.3 only. Requirements Ubuntu Server Local IP of the server (e.g., 192.168.0.123) A Copy of Call of Duty 2 patched to version 1.3 Access [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1766","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=1766"}],"version-history":[{"count":4,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1766\/revisions"}],"predecessor-version":[{"id":1771,"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/pages\/1766\/revisions\/1771"}],"wp:attachment":[{"href":"https:\/\/grimms3dworlds.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=1766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}