How to assign a public ipv6 IP to a machine?

The title says it – How to assign a public ipv6 IP to a machine?

I’d just try flyctl ips allocate-v6 and not use the --private flag.

Incidentally, you can do --help on all parts of this command (flyctl, flyctl ips, flyctl ips allocate-v6) to get information on each subgroup.

This question was about how to assign a public ipv6 address to a machine.

Either way, I’ve moved away from this abstraction. (and didn’t find a solution to this)

Aha. Is this the curse of very short questions? :wink:

I can see flyctl machine egress-ip but I am not sure I understand it. Do describe your end goal though, maybe readers can advise on that.

There are a few threads about this in this community.

There is no way to assign an ingress ipv6 address to a specific machine.

I ended up abandoning the idea of multiple services behind a single app for this reason.

I’ve managed to PoC multiple distinct backends behind a single app, but using my own proxy for it. If you populate machine metadata, some DNS records will get created using that metadata, effectively allowing you to query individual machines over DNS. See: Private Networking · Fly Docs

Specifically, <value>.<key>.kv._metadata.<appname>.internal

So if I have an app awesome-multitenant, and in this app I deploy machines with metadata like tenant: joeblow, I can issue a DNS query for joeblow.tenant.kv._metadata.awesome-multitenant.internal and that will only bring up these specific machines.

If these machines are offline, the DNS record won’t be available, so this doesn’t help you auto-start them, but it does help you access them once they’re started.

I think for most cases, especially if the services are under your control and don’t need to be dynamically created (e.g. by a customer), probably using multiple apps is easier. The use case I’m testing is a bunch of individual pets created by users.

Honestly, refactoring away from this pattern (while very painful), was totally worth it.

Just setup a Fly app per every service.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.