I can successfully connect to the Telegram API server when exposing it to the public internet using [[services.ports]] port = 8081 and a dedicated IPv4 address. However, I want to keep this service private and access it internally using http://telegram-api-server.internal:8081 for my bot’s API connection. How can I achieve this?
Is there something special I need to configure for internal port 8081 access?
Delete your public IP address and add a private ipv6 one and it should be able to communicate. You should use .flycast so it hits the proxy to wake up the instances.
And I forgot to mention that this warning also pops up when deploying telegram api server with the [[services]] section but without [[services.ports]] section:
Service must expose at least one port. Add a [[services.ports]] section to fly.toml; Check docs at https://fly.io/docs/reference/configuration/#services-ports Validation for _services without ports_ will hard fail after February 15, 2024.
I’m also curious why should we use .flycast instead of .internal?
I’ve resolved the main issue and got rid of the annoying warning by following your advice + adding back [[services.ports]] port = 8081. Thanks again for your reply!
However I still don’t get why we should use .flycast instead of .internal
.flycast will go through the fly proxy while .internal does directly to your app. If you have a suspended/sleeping machine, you have to go through the proxy to wake it up.