I am trying to install Discourse on Ubuntu BUT it's not working

Yeah it doesn’t matter what port it runs on internally but you’d surely need it to be exposed on 80 and preferably 443 to the outside world for browsers to be able to communicate with it.