Hey there! I have not logged into the discourse for a while. Sorry for a late response. I guess it depends on what functionality you really need.
I did not look too long at what ngrok offered, but from what I could see you could fairly easily do this as long as you have a publicly accessible server you could just use SSH or any other encrypted tunneling tool, such as stunnel. Those would require some initial manual setup, but once the initial setup is done you could automate the process and write scripts to handle the details.
Essentially you would host your server on your local device then you can use ssh to forward that service on it’s normal port up to the public server using whatever port you want to access it on.
Here is an example using SSH:
ssh -R <REMOTE PORT>:<LOCAL ADDRESS>:<LOCAL PORT> USER@SERVER
ssh -R 8080:localhost:80 firstname.lastname@example.org
This would create a tunnel that pushes your local port 80 web server to the digitalocean.example.com server. You could then have someone connect to http://digitalocean.example.com:8080 and it would forward all traffic to your local machine port 80.
The only negatives to this is bandwidth limitations of SSH. You’ll max out around 2MBps. If you need a faster method you can use stunnel it uses regular SSL, it is essentially the same thing that your normal web page uses. So it can go full speed.
More on SSH tunnels:
More on stunnel: