GithubHelp home page GithubHelp logo

Comments (18)

itzg avatar itzg commented on August 16, 2024 1

Actually that's a great question...but unfortunately they haven't implemented rcon in the bedrock edition so including the cli wouldn't help.

Over here #8 (comment) I show a work around where you can docker attach to the bedrock container and issue commands.

from docker-minecraft-bedrock-server.

jlucktay avatar jlucktay commented on August 16, 2024 1

There was a ticket logged in September 2018 on Mojang's bug-tracker Jira about the lack of RCON in BDS, but it was invalidated as it was a feature request, not a bug.

Feature requests should go to the suggestions subreddit.

I have made such a request here.

Off the back of the Reddit request, it has now been added to the feature parity list on the official wiki.

from docker-minecraft-bedrock-server.

esticle avatar esticle commented on August 16, 2024

I guessed that was the case with rcon-cli thanks @itzg

Appreciate the pointer - just a quick one for yourself (or Nitrosito really) - what would the docker-compose equivalent look like? Not having much luck with:

...snip...
    ports:
      - 19132:19132/udp
    restart: unless-stopped
    command: run --rm -i  -e EULA=TRUE

Then,

# docker attach minecraft-bedrock
[2019-11-11 22:07:22 INFO] Server started.
/help
^P/help
help
^Ztime="2019-11-11T22:07:32Z" level=debug msg="Forwarding signal" signal=stopped

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

Here is a compose file that allows for using docker attach where it's the last two lines that are relevant:

version: '3.3'

services:
  bedrock:
    image: itzg/minecraft-bedrock-server
    environment: 
      EULA: "TRUE"
    ports:
      - 19132:19132/udp
    stdin_open: true
    tty: true

BTW, the command field is tempting, but it's typically for specifying the command arguments to run within the container.

from docker-minecraft-bedrock-server.

esticle avatar esticle commented on August 16, 2024

@itzg That works perfectly, nice trick indeed, quite correct in my assumption about the command field - noted.

Tab-completion would be nice if it worked but this is way better than nothing at all, thanks!

from docker-minecraft-bedrock-server.

macchie avatar macchie commented on August 16, 2024

Check this out!

https://github.com/macchie/minecraft-bedrock-server-bridge

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

Awesome @macchie ! I can add that to the community solutions section if you're interested.

from docker-minecraft-bedrock-server.

macchie avatar macchie commented on August 16, 2024

Awesome @macchie ! I can add that to the community solutions section if you're interested.

Of course! :)
I'll make sure to make it better and more useful!

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

Added: https://github.com/itzg/docker-minecraft-bedrock-server/#community-solutions

from docker-minecraft-bedrock-server.

macchie avatar macchie commented on August 16, 2024

Added: https://github.com/itzg/docker-minecraft-bedrock-server/#community-solutions

Thank you very much! I'm currently working on server commands feedback on Telgram and the HTTP API to execute commands.

from docker-minecraft-bedrock-server.

SayaAEP avatar SayaAEP commented on August 16, 2024

how download?

from docker-minecraft-bedrock-server.

Bass-03 avatar Bass-03 commented on August 16, 2024

Hello, I found a way to send commands to the server, when it was not started with the -it flags.

The docker image used is very simple so it lacks a few basic linux commands, lis ps.
Anyway, this is what you have to do:

  1. get bash on the container with docker exec -it <bedrock id> /bin/bash
  2. send your command to the server process' STDIN echo "<your command>" > /proc/10/fd/0

That is it.
The process that has the console running is /data/bedrock_server-1.19.11.01, you can find the correct id with
find /proc -mindepth 2 -maxdepth 2 -name exe -exec ls -lh {} \; 2>/dev/null

Since we have the same image, I would guess we get the same PID for that process: 10

so you can just send commands like
echo "gamerule showcoordinates true" > /proc/10/fd/0
echo "op myuser_please" > /proc/10/fd/0

from docker-minecraft-bedrock-server.

Emilgoo avatar Emilgoo commented on August 16, 2024

And you can be a little more clear? For the little ones in this topic. And how to do it on windows?

from docker-minecraft-bedrock-server.

mattholy avatar mattholy commented on August 16, 2024

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

@mattholy can you clarify that? The previous suggestion made sense to me adapt into a script that can be exec'ed in the container.

from docker-minecraft-bedrock-server.

mattholy avatar mattholy commented on August 16, 2024

@mattholy can you clarify that? The previous suggestion made sense to me adapt into a script that can be exec'ed in the container.

please read this https://docs.docker.com/engine/api/v1.41/#tag/Container/operation/ContainerAttach
if still a question, fell free to ask me

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

Now I understand. Doesn't need to be an API call though

https://github.com/itzg/docker-minecraft-bedrock-server#executing-server-commands

from docker-minecraft-bedrock-server.

itzg avatar itzg commented on August 16, 2024

The suggestion from @Bass-03 has now been bundled into the image as send-command and documentation has been updated:

https://github.com/itzg/docker-minecraft-bedrock-server#executing-server-commands

from docker-minecraft-bedrock-server.

Related Issues (20)

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.