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

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.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
August 4, 2020
Accepted 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:

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.

- Bobby.

@teo2k80 @gurgenadiyan @evk02 we are running into the exact same situation. Could anybody share how they managed to make this work or what other solution you found for this?

Thank you.

Hit the same issue. I have tried to group my instances into subranges of the VPC, but then realized that while I can change the private IP in the OS, once I have done that, the network does not allow communication with other instances in the same VPC. So while the documentation ( make it sounds like it is possible, in reality changing the IP does NOT work.

I have raised an idea allowing changing / setting the private IP - please vote for it:

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel