Question

Can I manually assign a private IP address to a droplet in a VPC?

Posted August 1, 2020 173 views
DigitalOcean

Is it possible to control which private IP address is assigned to a droplet within a VPC?

It seems the address is sequentially assigned from the VPC IP range, but I can’t find a way to control it.

For instance, I would like to assign a static IP to a DNS server within the VPC and make sure it will be the same if I have to later re-run my Terraform configuration from scratch.

1 comment
  • Same here.

    Wanted to make a HA setup with Pacemaker, but the Virtual IP does not work (also wanted to assign custom Private IPs, for which can’t find a way).

    Unfortunately if this is not possible we will have to switch to another cloud provider, we have pretty strict rules for our infrastructures.

    Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hey @teo2k80,

I don’t believe that this is possible as of the time being. Even if you manually change your network details to use a different IP address, as described in the official documentation here it would not work:

https://www.digitalocean.com/docs/networking/vpc/how-to/enable/

But this sounds like a great idea, sounds like it’d be super useful!

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

- Bobby.

Submit an Answer