How to access my self hosted software installed on DO?

I wanted to try out so I decided to spin up a droplet to selfhost it using docker. I have it installed via docker and it works with localhost, but i don’t know how to access it from outside the host server. This is my first experience in networking, so the answer may be obvious, but assistance would be appreciated.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You will likely want to set up nginx with a proxy_pass configuration to route traffic from port 80 on your public interface to the port your app is running on on localhost. You can install nginx with:

apt-get update;
apt-get install nginx

And then set up a proxy pass configuration to point to your app on localhost.