I came here to comment basically this. Except I did it last year and accidentally broke that system. Was trying to do the working directory and mistyped and did the root dir.
For those that don’t know, so many elevated permissions commands fail if permissions are too open. And even ssh breaks because your certs and authorized_keys need to be only readable by you.
I luckily was able to wipe and just restore an older image backup.
My setup is this:
So me, my partner, parnets, and friends when outside my network can go to jellyfin.domain.whatever and login to my jellyfin. No ports open to the internet except 80/443 on the reverse proxy, and no ips to remember. That will give you some things to google to get started to replicate a similar setup for your needs.