You can specify external ports in the services.ports section.
You’ll want to modify your config like this:
internal_port = 8080
protocol = "tcp"
handlers = ["tcp"]
port = "22"
This config says accept TCP traffic at the fly.io edge on port 22 and send it to my VM at port 8080.
Unfortunately we do not currently allow exposing port 22. There’s a bit of complexity there with how our networking is setup.
We do plan on letting people bind to any port sooner than later though!
That’s a shame but makes sense - thanks.
I’ve been using 10022 for my SSH based apps.
Yikes! I’d been up and down the docs recently and figured I’d notice something this big. Any other ports to watch out for?
These TCP ports work today:
25, 53, 80, 443, 5000, 8443, 25565, and ports 10000 - 10100
This detail is a little buried in our docs, though, we should make a bigger deal of it: App Configuration (fly.toml) · Fly
@jerome Have you added support to bind any port?