Giter VIP home page Giter VIP logo

aio-plutonium-t6's Introduction

AIO-Plutonium-T6 [An all-in-one plutonium server, Easier]

Docker Image Build Docker Build and Publish

Files Used to Build and run a Plutonium Server and a IW4Admin Panel in docker

This is intended to make hosting a lan server easier and faster, removing the worry of making your own full installation from scratch.

Trust me bro, I've been there. 😎

This Repository is a work in progress state, so if you think there's an improvement to be made please contribute in the Issues Tab

  • Currently this repository is only tested in Linux and Windows, but it should work in any system able to run Docker.

  • It's also only tested in a LAN environment (which can be accessed externally, for example, with a reverse proxy), but it should work in a WAN environment as well.

  • And it's only tested with the Zombie mode, but it should work with the Multiplayer mode as well (hopefully).

Don't quote me on the statements above 😅

Setup

Requirements:

  • Docker

    Works in any system able to run Docker.

  • Joy, lots of joy

    Yeah, as simple as that, no need to worry about anything else really 😄

Installation

1. Docker volume creation

First we need to create a docker volume to store our server files, this will make it easier to manage the server files and keep them persistent between restarts.

For this we use the following command:

docker volume create <volume_name>

Note: You can use any name you want for the volume, but it's recommended to use a name that is easy to remember and identify.

For easier setup, we use the name aio-plutonium-t6 for the volume:

docker volume remove aio-plutonium-t6 || true && \
docker volume create aio-plutonium-t6

Note: We first remove the volume if it exists, to avoid any errors. Be careful when using this command, as it will remove any data stored in the volume.

2. Launching the server

Now that we have our volume created, we can launch the server.

We can launch the server online or in LAN mode.

To launch the server in online mode, we use the following command:

docker run -d --name <container_name> \
              -p <game_server_host_port>:4976/udp \
              -p <admin_panel_host_port>:1624/tcp \
              -v <volume_name>:/t6server \
              -e SERVER_KEY="<your_plutonium_server_key>" \
              -e SERVER_RCON_PASSWORD="<rcon_password>" \
              -e SERVER_MAX_CLIENTS="<max_clients>" \
              -e SERVER_MODE="<server_mode>" \
              -e SERVER_PASSWORD="<server_password>"

An example of a full command to launch the Zombies server in online mode is:

docker run -d --name aio-plutonium-t6-server \
              -p 4976:4976/udp \
              -p 1624:1624/tcp \
              -v aio-plutonium-t6:/t6server \
              -e SERVER_KEY="aFb57Hkbe" \
              -e SERVER_RCON_PASSWORD="admin" \
              -e SERVER_MAX_CLIENTS="7" \
              -e SERVER_PASSWORD="1234"

Note: The key is completely random on this example, you should use your own key from Plutonium.

To launch the server in LAN mode, we use the following command:

docker run -d --name <container_name> \
              -p <game_server_host_port>:4976/udp \
              -p <admin_panel_host_port>:1624/tcp \
              -v <volume_name>:/t6server \
              -e LAN_MODE="true" \
              -e SERVER_RCON_PASSWORD="<rcon_password>" \
              -e SERVER_MAX_CLIENTS="<max_clients>" \
              -e SERVER_MAP_ROTATION='<map_rotation_string>' \
              -e SERVER_MODE="<server_mode>" \
              -e SERVER_PASSWORD="<server_password>"

An example of a full command to launch the Zombies server in LAN mode is:

docker run -d --name aio-plutonium-t6-server \
              -p 4976:4976/udp \
              -p 1624:1624/tcp \
              -v aio-plutonium-t6:/t6server \
              -e LAN_MODE="true" \
              -e SERVER_RCON_PASSWORD="admin" \
              -e SERVER_MAX_CLIENTS="8" \
              -e SERVER_MAP_ROTATION='sv_maprotation "exec zm_classic_transit.cfg map zm_transit"' \
              -e SERVER_PASSWORD="1234"

Breakdown of the parameters used in the docker run command:

Parameter Function
--name <container_name> Set container name.
-v <volume_name>:/t6server Map docker volume <volume_name> to directory /t6server keep the files persistent between restarts.
-p <game_server_host_port>:4976/udp Map game server port (host:guest/protocol). Game server protocol must be UDP. Don't change guest port unless you change SERVER_PORT environment variable.
-p <admin_panel_host_port>:1624/tcp Map admin panel port (host:guest/protocol). Admin panel protocol must be TCP. Don't change guest port unless you change ADMIN_PORT environment variable.
-e LAN_MODE="true" Set to true to enable LAN mode (Any other value will disable LAN mode).
-e SERVER_MAX_CLIENTS="<max_clients>" The maximum number of clients allowed on your server. Between 1-8 (Leave blank for default, which is 4).
-e SERVER_RCON_PASSWORD="<rcon_password>" The password for your server's RCON. (Leave blank for default, which is admin).
-e SERVER_MAP_ROTATION='<map_rotation_string>' String to set the map rotation. (Leave blank for default).
-e SERVER_PASSWORD="<server_password>" The password for your server.

3. Setup IW4MAdmin

Now that we have our container up and running, if everything went well, we have 2 screen processes running in the background, one with the game server (named plutonium-server) and another with the admin panel (admin-panel).

We still need to run the initial setup for the admin panel, so we can access it in our browser afterwards.

To do this, we need to attach to the admin-panel screen process inside the container, and run the initial setup:

docker exec -it <container_name> /bin/bash -c "screen -r admin-panel"

An example of a full command to attach to the admin-panel screen process is:

docker exec -it aio-plutonium-t6-server /bin/bash -c "screen -r admin-panel"

Now we are inside the admin-panel screen process, and we shall follow IW4Admin's initial configuration.

Any issues Regarding IW4Admin should be directed to the IW4Admin's repository, and check the IW4Admin's wiki for more information.

After you finish the initial configuration, you can detach from the screen process by pressing Ctrl+A and then Ctrl+D.

Now you should be able to visit IW4Admin in your browser via http://hostname:1624 with your server configured (hostname is the IP address of the host you´re running the container in).

Environment Variables

Fixed Environment Variables

The following is a list of all the environment variables that will break your server if you change them.

⚠️ PROCEED WITH CAUTION ⚠️

Directories Environment Variables:

Environment Variable Default Value
PLUTONIUM_DIRECTORY /t6server/plutonium
SERVER_DIRECTORY /t6server/server
IW4ADMIN_DIRECTORY /t6server/admin
UPDATER_DIRECTORY /t6server/updater
DOWNLOAD_DIRECTORY /t6server/downloaded_files
STATUS_DIRECTORY /t6server/status

Wine Environment Variables

Environment Variable Default Value
WINEPREFIX /root/.wine
WINEDEBUG fixme-all
WINEARCH win64

Changeable Environment Variables

The following is a list of all the environment variables that you can change.

Environment Variable Default Value Description
SERVER_KEY your_plutonium_server_key_here Your server key from Plutonium.
SERVER_PORT 4976 The port your game server will run on (game server protocol must be UDP).
SERVER_MODE Zombie The mode your game server will run on. Either Zombie or Multiplayer (any other value defaults to Zombie).
LAN_MODE false Set to true to enable LAN mode (Any other value will disable LAN mode).
SERVER_MAX_CLIENTS The maximum number of clients allowed on your server. Between 1-8 (Leave blank for default, which is 4).
SERVER_MAP_ROTATION String to set the map rotation. (Leave blank for default).
SERVER_RCON_PASSWORD admin The password for your server's RCON. (Leave blank for default, which is admin).
SERVER_PASSWORD The password for your server. (No password is the default value).
ADMIN_PORT 1624 The port your admin panel will run on (admin panel protocol must be TCP).
  • SERVER_MAP_ROTATION

The string to be passed will replace the default sv_maprotation configuration on the server dedicated configuration file. You can change it to whatever you want, but it must be a valid string of commands.

Bellow is an example of a valid string of commands:

'sv_maprotation "exec zm_classic_transit.cfg map zm_transit exec zm_classic_tomb.cfg map zm_tomb exec zm_classic_prison.cfg map zm_prison"'
  • SERVER_PORT

This value must be the same as the port you mapped in the -p <game_server_host_port>:4976/udp parameter. Here the default value is 4976, but you can change it to whatever you want, as long as it's the same as the port you mapped.

So if you mapped the port 4977 in the -p <game_server_host_port>:4977/udp parameter, you must change the SERVER_PORT environment variable to 4977 as well.

  • ADMIN_PORT

This value must be the same as the port you mapped in the -p <admin_panel_host_port>:1624/tcp parameter. Here the default value is 1624, but you can change it to whatever you want, as long as it's the same as the port you mapped.

So if you mapped the port 1625 in the -p <admin_panel_host_port>:1625/tcp parameter, you must change the ADMIN_PORT environment variable to 1625 as well.

Credits

Projects used in this repository:

🎆 The true heroes of this repository: 🎆

Without their repositories, this repository would not exist. So thank you very much for your work. ❤️

TODO List

  • Add env to shell script for the server password
  • Fix README.md/Documentation with more links and useful information
  • Reduce clutter on dockerfile (apt update, ...)
  • Isolate installation scripts into separate files (like the updater and the wine installation)

aio-plutonium-t6's People

Contributors

thejcpalma avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

aio-plutonium-t6's Issues

Client joining Multiplayer server fails with "Server is a different version: COD_T6_S MP"

I'm not sure if this is an issue with this repository or my end but have you ever tested running Multiplayer server using this docker image? I've tried it and client fails to join with error "Server is a different version: COD_T6_S MP"/ "EXE_SERVER_IS_DIFFERENT_VER§COD_T6_S MP"

I've rechecked and retried everything and even crosschecked the start script inside the image which with a native windows installation and couldn't find anything wrong with it.

Please help. Your docker image saved me so much time and made it super easy for multiserver installations

Short snippet of logs:

Loading fastfile code_pre_gfx_mp
Built adjacency info for IPaks 0ms
[STEAM] 1 calls ready, running...
[STEAM] running call 1
----- FS_Startup -----
Searching for iwds in Z:\t6server\server\Multiplayer/players
Searching for iwds in Z:\t6server\server\Multiplayer/main_shared
Searching for iwds in Z:\t6server\server\Multiplayer/main
Searching for iwds in Z:\t6server\plutonium\storage\t6/main
Searching for iwds in Z:\t6server\server\Multiplayer/t6r/data
Searching for iwds in Z:\t6server\plutonium\storage\t6/players
Searching for iwds in Z:\t6server\plutonium\storage\t6//
Current language: english
Current search path:
Z:\t6server\plutonium\storage\t6//
Z:\t6server\plutonium\storage\t6/players
Z:\t6server\server\Multiplayer/t6r/data
Z:\t6server\plutonium\storage\t6/main
Z:\t6server\server\Multiplayer/main
Z:\t6server\server\Multiplayer/main_shared
Z:\t6server\server\Multiplayer/players
Loading fastfile patch_mp
Loading fastfile code_post_gfx_mp
Built adjacency info for IPaks 0ms
^3Unknown command: "resetCustomGametype"
Setting net_port to "4976" from command line.
bound socket to localhost:4976
^3Unknown command: "t6mp"
^3Unknown command: "start_map_rotate"
Loading fastfile patch_ui_mp
Loading fastfile ui_mp
Loading fastfile plutonium_ui_common
Loading fastfile plutonium_ui_mp
Built adjacency info for IPaks 1ms
Loading fastfile ffotd_tu13_mp_147
Loading fastfile common_mp
Loading fastfile plutonium_common
Loading fastfile plutonium_mp
Loading fastfile common_patch_mp
scanning for plugins...
^3Unknown command: "limit"
^3Unknown command: "range"
^3Unknown command: "value"
Added 127.0.0.1 to the RCon whitelist
Added 192.168.0.7 to the RCon whitelist
Added 10.0.0.12 to the RCon whitelist
Added 172.16.8.7 to the RCon whitelist
Rotating to map "mp_la"!
^3Unknown command: "resetCustomGametype"
Built adjacency info for IPaks 2ms
server is changing maps, resetting stored team states...
Unloading fastfile ui_mp
Unloading fastfile patch_ui_mp
Loaded menu file: ui/t6/dvarleftrightselector.lua
Loaded menu file: ui_mp/t6/hud/team_marinesopfor.lua
Loaded menu file: ui_mp/t6/hud/class.lua
Loaded menu file: ui/t6/menus/optionscontrols.lua
Loaded menu file: ui/t6/menus/optionssettings.lua
Loaded menu file: ui/t6/menus/safeareamenu.lua
Loaded menu file: ui_mp/t6/hud/scoreboard.lua
Loaded menu file: ui_mp/t6/hud/spectateplayercard.lua
Loaded menu file: ui_mp/t6/hud/loading.lua
----- FS_Startup -----
Searching for iwds in Z:\t6server\server\Multiplayer/players
Searching for iwds in Z:\t6server\server\Multiplayer/main_shared
Searching for iwds in Z:\t6server\server\Multiplayer/main
Searching for iwds in Z:\t6server\plutonium\storage\t6/main
Searching for iwds in Z:\t6server\server\Multiplayer/t6r/data
Searching for iwds in Z:\t6server\plutonium\storage\t6/players
Searching for iwds in Z:\t6server\plutonium\storage\t6//
Current language: english
Current search path:
Z:\t6server\plutonium\storage\t6//
Z:\t6server\plutonium\storage\t6/players
Z:\t6server\server\Multiplayer/t6r/data
Z:\t6server\plutonium\storage\t6/main
Z:\t6server\server\Multiplayer/main
Z:\t6server\server\Multiplayer/main_shared
Z:\t6server\server\Multiplayer/players
Loading fastfile dlc0_load_mp
Loading fastfile dlc1_load_mp
Loading fastfile dlc2_load_mp
Loading fastfile dlc3_load_mp
Loading fastfile dlc4_load_mp
Loading fastfile dlc0dd_load_mp
Loading fastfile seasonpass_load_mp
Built adjacency info for IPaks 2ms
Loading fastfile mp_la
Loading fastfile faction_fbi_mp
Loading fastfile faction_pmc_mp
Initializing game at 05/05/24 06:01:52 +0000
Current uptime: 00:00:17
------- Game Initialization -------
gamename: PT6MP
gamedate: May 4 2024
Built adjacency info for IPaks 2ms
Script "scripts/mp/ranked.gsc" loaded successfully
GSC Executed "scripts/mp/ranked::main()"
GSC Executed "scripts/mp/ranked::init()"
Rotating to map "mp_dockside"!
server is changing maps, resetting stored team states...
----- FS_Startup -----
Searching for iwds in Z:\t6server\server\Multiplayer/players
Searching for iwds in Z:\t6server\server\Multiplayer/main_shared
Searching for iwds in Z:\t6server\server\Multiplayer/main
Searching for iwds in Z:\t6server\plutonium\storage\t6/main
Searching for iwds in Z:\t6server\server\Multiplayer/t6r/data
Searching for iwds in Z:\t6server\plutonium\storage\t6/players
Searching for iwds in Z:\t6server\plutonium\storage\t6//
Current language: english
Current search path:
Z:\t6server\plutonium\storage\t6//
Z:\t6server\plutonium\storage\t6/players
Z:\t6server\server\Multiplayer/t6r/data
Z:\t6server\plutonium\storage\t6/main
Z:\t6server\server\Multiplayer/main
Z:\t6server\server\Multiplayer/main_shared
Z:\t6server\server\Multiplayer/players
Unloading fastfile faction_pmc_mp
Unloading fastfile faction_fbi_mp
Unloading fastfile mp_la
Unloading fastfile faction_pmc_mp
Unloading fastfile faction_fbi_mp
Unloading fastfile mp_la
Unloading fastfile faction_pmc_mp
Unloading fastfile faction_fbi_mp
Unloading fastfile mp_la
Unloading fastfile faction_pmc_mp
Unloading fastfile faction_fbi_mp
Unloading fastfile mp_la
Loading fastfile mp_dockside
Loading fastfile faction_seals_mp
Loading fastfile faction_pla_mp
Initializing game at 05/05/24 06:03:58 +0000
Current uptime: 00:02:23
------- Game Initialization -------
gamename: PT6MP
gamedate: May 4 2024
Built adjacency info for IPaks 4ms
Script "scripts/mp/ranked.gsc" loaded successfully
GSC Executed "scripts/mp/ranked::main()"
GSC Executed "scripts/mp/ranked::init()"
^3Hitch warning: 8106 msec frame time on main thread
^3Hitch warning: 8113 msec frame time on server thread
Rotating to map "mp_carrier"!
server is changing maps, resetting stored team states...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.