TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate

adding rcon-cli

Floppy82 opened this issue · 3 comments

Hey,
at first, thank you for this docker image, great work!

there is something i am currently missing and have enjoyed using in another minecraft docker image. There it was possible to use rcon directly from the image with the command "docker exec -i image-name rcon-cli".
When I try this here I get the message:
"unable to start container process: exec: "rcon-cli": executable file not found in $PATH: unknown"
so i assume that this function is not implemented.

if you have an idea how i could add this function, or if you could even add this to the image in a later update, that would be great!

Hello,

So the rcon-cli is custom software. That's not a part of Minecraft or official. It's probably this one you're talking about: https://github.com/gorcon/rcon-cli

However I'm not positive. This isn't official so there's more than one of these out there. I don't know if that's the version you are using.

To turn on rcon on this version you would go into server.properties and set it to:

rcon.port=25575

Then you would just add that port to your Docker launch line to open that port:

-p 25575:25575

Actually I can guess which container you were using. It's the itzg one. I see they have a custom rcon CLI here:

https://pkg.go.dev/github.com/itzg/rcon-cli

This is purely their package. I definitely won't be adding it to this. It will probably work with my version just fine though if you enable rcon.

In other words rcon is a part of minecraft but rcon-cli is not. That's just completely their own creation. You should be able to connect to my server with their rcon client (or any server) unless they've taken steps to make that not work (which would be evil, I doubt that's the case).

It looks to me like it will though. From their documentation:

rcon-cli --host mc1 --port 25575
rcon-cli --port 25575 stop

Yep, that will work. If you open your rcon port you should be able to do the exact same thing. You can use their rcon-cli program with my server if you want to. It shouldn't know or care as the rcon port is a part of Minecraft.

The only difference is use your exact same command with the port and IP put in. It should just work as is if you open the rcon port.

Hopefully that helps!

thank you for your quick response and I fully understand.
I can live perfectly fine with using it the way you said. Thank you for your time!

No problem at all! It's actually a pretty good design. I would keep using it exact as you have since yes it's a non-official utility but the rcon port is very real. This is just a convenience wrapper to let you access it this way and I think that's totally fine and actually a pretty awesome use case.

Enjoy and take care!