My son was asking me to help him set up a server so that he can play with his friends – and i found this , easy to do.
https://www.astralinternet.com/blog/en/build-minecraft-pocket-edition-server-ubuntu/
I turns out that this version does not work well with latest minecraft , i download the version from Minecraft official website, it works pretty well
https://www.minecraft.net/en-us/download/server/bedrock/
After you download the server, just run this command:
LD_LIBRARY_PATH=. ./bedrock_server