How do I deploy this self-hosted Ngrok alternative on Fly.io?
How do I set those “–” arguments in the Dockerfile? And how I open all ports of the fly.io app? I mean how should my fly.toml look like if I want to open all ports?
Thanks in advance!
How do I deploy this self-hosted Ngrok alternative on Fly.io?
How do I set those “–” arguments in the Dockerfile? And how I open all ports of the fly.io app? I mean how should my fly.toml look like if I want to open all ports?
Thanks in advance!
Hey there!
You can set them in the CMD
directive of the Dockerfile.
Example:
FROM antoniomika/sish:latest
CMD ["--ssh-address=:22", "--http-address=:80", "--https-address=:443", "--https=true", "--https-certificate-directory=/ssl", "--authentication-keys-directory=/pubkeys", "--private-keys-directory=/keys", "--bind-random-ports=false"]
You will need to expose these ports via the [services]
configuration blocks in your fly.toml
if you want to access these from the internet.
@jerome Thanks.
But how do I open a range of ports?
You can’t currently open a range of port, you’d have to manually specify each port in the range.
What are you trying to do? If you can access it via the private network, this might save you a lot of headaches. “Opening” ports is only useful for exposing things via the Internet. If you only need access yourself to certain ports (like 22
), you can/should use the private network.
@jerome Will there be bandwidth charges if I access ports through private network?
Yes, that bandwidth still ends up going through the Internet even if it’s not Internet-routable.
Ok. Thanks.
Ok, I guess this is in flux and I was a bit wrong. We don’t charge for bandwidth via the private network if you don’t have a public IP set on your app.
Ok. How do I create a private network?
You have one already:
Apart from the documentation Greg shared,
fly-local-6pn
or ::
on a port of your choosing (say, 1337
serving http1.1
)global.<appname>.internal
http1.1
to one or all of those resolved 6pn IPs on 1337
.