Skip to content
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

Can't change default port? #6

Closed
mschindl opened this issue Sep 2, 2019 · 2 comments
Closed

Can't change default port? #6

mschindl opened this issue Sep 2, 2019 · 2 comments

Comments

@mschindl
Copy link

mschindl commented Sep 2, 2019

Hello,
how can I change the default port?
"-e server-port" doesn't work.


root@ubuntu# docker run -d -it -e EULA=TRUE -p 19135:19135/udp -e server-port=19135 -e online-mode=false -e max-players=50 -v $locpath:/data -e LEVEL_TYPE=DEFAULT -e GAMEMODE=creative -e DIFFICULT=peaceful --restart unless-stopped --name minecraft-crea itzg/minecraft-bedrock-server
e4b26d87c3476c6d98f2cb45bccf3a988e5453cae5ed78ad0e11baa0974b3ae0

root@ubuntu# docker logs minecraft-crea
DEBU[0000] Using /data to match uid and gid
DEBU[0000] Resolved UID=0 from match path
DEBU[0000] Resolved GID=0 from match path
Starting Bedrock server...
NO LOG FILE! - setting up server logging...
[2019-09-02 20:43:52 INFO] Starting Server
[2019-09-02 20:43:52 INFO] Version 1.12.0.28
[2019-09-02 20:43:52 INFO] Session ID 895eafb5-2fd5-4adc-b975-151282c3dcd7
[2019-09-02 20:43:52 INFO] Level Name: Bedrock level
[2019-09-02 20:43:52 INFO] Game mode: 1 Creative
[2019-09-02 20:43:52 INFO] Difficulty: 1 EASY
[2019-09-02 20:43:54 INFO] IPv4 supported, port: 19132
[2019-09-02 20:43:54 INFO] IPv6 not supported
[2019-09-02 20:43:54 INFO] IPv4 supported, port: 58977
[2019-09-02 20:43:54 INFO] IPv6 not supported
[2019-09-02 20:43:55 INFO] Server started.

@itzg
Copy link
Owner

itzg commented Sep 2, 2019

Since Docker containers allow port mapping to arbitrary external ports, I purposely left out the server-port configuration option.

Your docker run usage was very close...use a -p of -p 19135:19132/udp to expose that particular container on port 19135.

BTW, you'll need to use upper snakecase for the -e's, so you'll need ONLINE_MODE and MAX_PLAYERS. (It's easy to mix up the two, so I'll work on enhancing the property setter to accommodate either.)

@itzg itzg added the status/waiting on feedback Waiting on feedback from author of issue label Sep 2, 2019
@mschindl
Copy link
Author

mschindl commented Sep 5, 2019

Good point, thank you!

@mschindl mschindl closed this as completed Sep 5, 2019
@no-response no-response bot removed the status/waiting on feedback Waiting on feedback from author of issue label Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants