@plins as sean said, just read that port from environ's env and pass it to ring adapter, e.g. ring-jetty-adapter: https://github.com/ring-clojure/ring/blob/master/ring-jetty-adapter/src/ring/adapter/jetty.clj#L134
ring-jetty-adapter