How to set the hostname in discourse running native

I am running a dev version of discourse on Ubuntu. This is not in a docker, it’s running native on the machine. But all emails containing with urls to connect to my discourse have “localhost” as the hostname. I want to connect to it from another machine, so I would like to use the proper hostname.

I did see instructions on editing app.yml or app.yaml, but I think they only apply to docker containers - I certainly haven’t got a file with either of those names.