This mini-program/script helps you to creating self-hosted minecraft servers. Just open 25565 port on your router or use Hamachi and run this script. Then follow the instructions in terminal correctly and don't forget to edit server.properties. This python3 script for linux works correctly and windows.
https://github.com/emirhangunec/minecraftservermanagement -- https://mail.python.org/mailman/listinfo/python-list