-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Masterlist #8
Comments
Nice, many thanks! I'll definitely add it to the readme. Although it would be nice to somehow make it work in bridge mode, but it may be impossible. |
I'm not sure. I tried several approaches and this was the only one that worked for me in order to get the server to show up on the Activision Masterlist. |
I still can't register to cod4x master server 😢 version: "3"
services:
cod4-server:
image: qmcgaw/cod4:latest
container_name: cod4x-server-standard
volumes:
- /opt/cod4x/server/main:/home/user/cod4/main
- /opt/cod4x/server/zone:/home/user/cod4/zone:ro
- /opt/cod4x/server/mods:/home/user/cod4/mods
- /opt/cod4x/server/usermaps:/home/user/cod4/usermaps:ro
- /opt/cod4x/logs/standard:/home/user/.callofduty4
network_mode: host
stdin_open: true
tty: true
ports:
- 28960:28960/udp
command:
[
"+set dedicated 2",
"+sv_authtoken mytoken",
"+set sv_punkbuster 0",
"+set rcon_password mypassword",
"+set sv_maxclients 24",
"+set ui_maxclients 32",
"+set net_ip mypublicipv4",
"+set net_port 28960",
"+exec server.cfg",
"+map_rotate",
]
restart: unless-stopped |
Your docker-compose looks fine to me, but you can remove the following lines:
Ports are not used in network_mode host. Looking at the date of the image on Docker Hub, I suspect the image of @qdm12 has to be rebuild because it doesn't have the sv_authtoken variable incorporated yet, which is now enforced to be listed on the cod4x.me master. Judging from the announcement post on the cod4x.me forums, they incorporated that into their code just áfter the last build of the @qdm12 Docker image. |
I use Correct me if I'm wrong but it should work with Line 72 in 60362e0
|
I'm not sure how that relates to what I said above. The COD4x version in qdm12's Docker image needs to be updated in order to support the new token requirement by COD4x for their masterserver. This is done by updating the version number in the Dockerfile and rebuilding the image: Line 5 in 60362e0
For example, try the fork of skrtheboss, which uses an update COD4x version: https://github.com/skrtheboss/cod4-docker |
Oh sorry now I got it, @qdm12 is working on the new Dockerfile |
Hello all, sorry for not answering earlier. So I just created that issue in order to have releases, because the image is based on Alpine to keep a small size and so we need to build the binary from source. I just made a I will make another release using the latest commit available for now and name the Docker tag with the short commit. Both I'm still working on making that fancy entrypoint (udp proxy + http static file server + launch cod4x, eventually restart it etc.), but it's not done unfortunately (all in 6MB extra). I will comment here once I've setup more releases/docker tags for you to try. |
|
Nice! I will try soon! Here my working sketch FTP server (I had 15kb/s problem with HTTP) ftpd_server: # https://github.com/stilliard/docker-pure-ftpd
image: stilliard/pure-ftpd
container_name: cod4-ftpd
ports:
- "21:21"
- "30000-30009:30000-30009"
volumes: # mount only mods and usermaps
- /opt/cod4x/server/mods:/home/username/mods:ro
- /opt/cod4x/server/usermaps:/home/username/usermaps:ro
- /opt/cod4x/passwd:/etc/pure-ftpd/passwd
environment:
PUBLICHOST: "localhost"
FTP_USER_HOME: /home/username
FTP_USER_NAME: cod4fdl
FTP_USER_PASS: cod4fdl |
I'll send my config for http, I use Caddy instead of apache and it works well on a single port. The 15KB/s must be the default fallback method transferring data over udp. Are you using your 80 (or 443) port for anything? |
I used |
I meant that I use Caddy just to serve over http the files... to my other Caddy proxy (with https) haha. So it should work for you as Caddy > Traefik > clients instead of Apache > Traefik > clients. You could also bind mount and serve the files directly with Traefik though, and you would have to add a line in your cod4 server config file. I'll send you what I use. I haven't had time to test the master list, I'll do it this weekend together with the newer entrypoint/supervising program. |
@TheTrigger Are you running it on a VPS? If so, type |
My own docker-image is actually working (with port binding and bridge network), I tried bot your (freekers/docker-cod4x17a) and @qdm12 image, and wont register to master server for me. idk where I'm wrong FROM ubuntu:18.04
EXPOSE 28960/udp
RUN mkdir -p /home/user/cod4
WORKDIR /home/user/cod4
RUN dpkg --add-architecture i386
RUN apt update && apt upgrade -y
RUN apt install -yq wget net-tools unzip libc6:i386 libstdc++6:i386
RUN mkdir -p main
RUN mkdir -p zone
RUN mkdir -p mods
RUN mkdir -p usermaps
COPY . .
RUN chmod +x cod4x18_dedrun
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/home/user/cod4/entrypoint.sh"]
VOLUME ["/home/user/cod4/main"]
VOLUME ["/home/user/cod4/zone"]
VOLUME ["/home/user/cod4/mods"]
VOLUME ["/home/user/cod4/usermaps"] |
The only thing I can think of is a firewall issue, but that doesn't make any sense since you stated your own image seems to be working fine, assuming you're deploying it on the same Docker host.... Sorry, I'm out of ideas for now... |
Ok there are several differences with my image and this Dockerfile
I will dig into it now/tomorrow, maybe after I finish that newer entrypoint though. |
Content of #!/usr/bin/env bash
./cod4x18_dedrun +set dedicated 2+set sv_punkbuster 0+set rcon_password "password"+sv_authtoken token+set sv_maxclients 24+set ui_maxclients 32+set net_port "28960"+exec server.cfg+map_rotate |
What are the steam_api.so and steamclient.so files used for? xbase_00.iwd is obsolete and can be removed: https://cod4x.me/index.php?/forums/topic/1013-xiceops_00iwd/&tab=comments#comment-5217 |
Are you sure he doesn't indent |
Ah yes, I see. That seems more likely indeed. A bit confusing the way it's written down. |
I'll add the two steam library files (hopefully they work on Alpine's musl though, otherwise I'll switch to a debian slim I guess), but these seem to be the only files missing. Maybe xbase_00.iwd changed although its size is the same as before, I didn't check with a hash if it changed though. Otherwise there are:
|
So the steam files are closed source, non statically built files as I discussed in this issue ages ago (sorry forgot!) so they won't work on Alpine. What I'll do is have a Debian version with Steam (although it will likely be like 10 times bigger), but at least you can test it out see if this masterlist works |
It should work now with docker pull qmcgaw/cod4:steam And add the Docker tag Although, @Freekers did the master list even worked initially with the older Docker image? That |
It works thank you! |
@qdm12 I honestly don't remember. I tried many different combinations/configurations, including my own Docker image... Sorry! Regarding those steam .DLL files; aren't these only for Windows? Does Linux actually use them? |
Linux uses the same files but built for Linux using the I am still a bit confused where these steam library files are from and if they would be a way to use them without the 300MB of C++ libraries. There may be a way to handpick libraries needed by them (check with |
Ok i think the issue is fixed. Note that I added this morning a built in HTTP server listening on port 8000 for mods and usermaps (iwd and ff files only, the rest are blocked). Instructions are here. Feel free to open another issue if you need help setting it up with your reverse proxy / port forwarding. |
Sorry, I got confused by this #8 (comment) of TheTrigger, where he is referring to .DLL files, which don't work on Linux, but I now see there's a Linux version available of those as well. It looks like they are used for authentication indeed. Quote: 'This library is required for receiving screenshots, everything related to Steam and getting of players the playerid. It is required to auth players.' https://cod4x.me/index.php?/forums/topic/148-library-doing-playerauthentication-for-version-159/ BTW. Do you know how to find out which COD4x subversion is running? |
Yes indeed. Although I'm starting to wonder, I've seen an error message on the statically compiled program about invalid certificates for https access (and it cannot resolve hostnames), that might be a reason why the masterlist doesn't work. I'll reopen, maybe I can fix that so it works on the tinier image. You can find the cod4x subversion running at the top of your logs if I'm not mistaken. |
Regarding the invalid certificates; try adding the 'ca-certificates' package. |
Yes I already tried, even placed ca/ca-bundle.crt next to the binary but it doesn't see it somehow. I think the statically compiled program is a bit messed up somehow, I'll try digging into it this week. |
Hey guys, just before closing this issue:
|
In order for the server to show up on the Activision Masterlist, you need to use
host
network mode for the container so that it can bind to the WAN/Internet IP address of your server. Additionally, you need to set+set net_ip 123.123.123.123 +set net_port 28961
asARGS
environment variable.If using
bridge
network mode, the container will bind to the IP address of the Docker network and therefore won't show up on the Activision Masterlist, as the heartbeat will send a 'local' IP-address to the Masterserver (e.g. 172.16.X.X.).Perhaps you can add this to the README :)
The text was updated successfully, but these errors were encountered: