Normally, when you host a Minecraft server at home, the server is private.
This is a script that allows you to publish your server for your friends.
npm install friendjoin
npx friendjoin
Once the script is ran, you'll get a menu of commands:
/host
Will generate a /join ID for you.
/join <friend's id here>
Note: You'll need Node.js downloaded and installed on your computer in order for the "npm" and "npx" commands to exist.
You can get Node.js TLS here: