Meteor and ipv6

Hello,

I’m trying to run meteor on ipv6 but it doesn’t want to work.

Starting with:
meteor run --port [xxxx:…:xxxx]:3000

However, when opening http://[xxxx:…:xxxx]:3000/ I get 404 with “Unknown host”.
I searched through meteor sources for that “Unknown host” error but couldn’t find anything that would cause this thing.

Is anyone running meteor on ipv6 and knows how to resolve this issue?

Thanks

1 Like

You should probably run meteor behind a load balancer such as nginx for protocol handling. Meteor runs a vanilla node server to facilitate to get things going. SSL, IP6, Ratelimiting etc and other things should be done by tools suited for the network layer.

Internally you would simply route from I.e. nginx to localhost:3000 as usual.

I know it can be done with a proxy server. But if you want to run multiple instances of meteor it gets pain to setup all the ports and proxy config. With IPv6 you have millions of IPs for each instance with all ports free to use.

IPv6 is the future of internet and it’s a pity that meteor does not support it.

1 Like

I opened github issue on this topic: https://github.com/meteor/meteor/issues/7155

There is a temporary fix for this with ROOT_URL env variable

I’m just going to speak off the cuff and without precise numbers, and I’m not saying that Meteor shouldn’t support IPv6, but your argument is completely unfair.

The private IPv4 block 10.0.0.0/24 also has “millions of IPs” (16,777,216, to be precise), and you still have to configure ports exactly the same. You also have to actually keep track of what you’re using either way and you can’t just rambo through using up millions of IPs. You can run (max) 65535 TCP ports on a single IP address (6 or 4) and have even more connections per host (based on your available file descriptors).

So basically, way more applications than you’re ever going to build and way more apps than you’re ever going to have on one machine. With IPv4.

1 Like

I probably should’ve been more precise.

With IPv6 you can just run meteor on random IP, add it to cloudflare and have a fully functional website that is both accessible from IPv4 and IPv6. You don’t have to mess with local proxy servers as you would do with IPv4.

Fair, however you also shouldn’t run the dev build of Meteor for your fully functional website. It’s simply less efficient.

You should use meteor build and run it with ROOT_URL=... node index.js.

Also, Meteor was never built to be a proxy server, so probably don’t do that. :slight_smile: