That depends. For most people, your modem/router has a public IP (though it may change at any time). In this case, you can set up port forwarding on your router to forward traffic to given port...
That depends. For most people, your modem/router has a public IP (though it may change at any time). In this case, you can set up port forwarding on your router to forward traffic to given port back to your server. But you want to be really careful with this unless/until you know what you're doing.
An even better option would be to set up some kind of VPN into your network (eg. Wireguard).
Either of those can be combined with a dynamic DNS service (eg. no-ip.com) that can get updated when your public IP changes.
If you're dealing with a carrier grade NAT, where even your modem doesn't have a public IP, it's a bit trickier. You'd probably have to figure out some kind of reverse tunnel to some external endpoint that you can then connect in through.
That depends. For most people, your modem/router has a public IP (though it may change at any time). In this case, you can set up port forwarding on your router to forward traffic to given port back to your server. But you want to be really careful with this unless/until you know what you're doing.
An even better option would be to set up some kind of VPN into your network (eg. Wireguard).
Either of those can be combined with a dynamic DNS service (eg. no-ip.com) that can get updated when your public IP changes.
If you're dealing with a carrier grade NAT, where even your modem doesn't have a public IP, it's a bit trickier. You'd probably have to figure out some kind of reverse tunnel to some external endpoint that you can then connect in through.