Preserving IP address on full droplet resize

March 3, 2013 12.6k views
As I understand, the only way to make a full resize of a droplet (including disk space) is to create a new one using a custom snapshot image. Is it possible to guarantee preserving of original IP address in this case? Or is there any alternative way to make full resize?
13 Answers
I don't believe there is a guaranteed way to do it. They do their best to give you back the same ip -- to help the process they expect you to use the same exact same hostname as before, but sometimes it's still not possible.

I understand the annoyance of the process, but you might want to look at creating a script to call up the API, grab the IP address and then reconfigure all your apps for you.
We are updating the resize code which preserves the IP, if there is a particular resize that isn't available it is true that you would be required to take a snapshot and then create a new droplet from the snapshot with the droplet size you like.

We do attempt to return a previously used IP to you so if you destroy a droplet and create a new one often the same IP is returned if the interval between the destroy and create is small.
  • Hey @moisey, you mentioned back in March 2013 that you were updating the code which preserves the IP. Any update on that? Or is it still the same situation as before - most likely will be preserved if interval between destroy and create is small?

If I have a droplet in production, then what would you say is the best way to migrate to a larger droplet with limited downtime? I understand that a resize requires a reboot, but the IP switch could easily cause tons of issues. How do I know if it will switch, and if it does, the DNS takes time to update, leaving my site potentially down for many users.
I am curious to know if there was a solution posted for this issue?
@alex: Please open up a support ticket, we'll try our best to make sure you keep your droplet's IP address.
@phillip: You should usually get the same IP address.
I'm interested in this as well - the "..should usually get the same IP address" answer scares me a bit as when I upsize if the IP changed my DNS upstream would break. Is there anway to guarantee getting the same IP on upsize?
@gwilymgj: Yes. Please open up a support ticket so we can sort this out. :]
Warning to those who come across this thread in the future: If you shut down your droplet and spin up a new one, you are NOT guaranteed to get the same IP. Tech support will NOT help you with this, as according to them they "do not have any functionality such as this in our backend controls".
One possible solution would be to not destroy your droplet. Create a new droplet with the resized space. Deploy your application to it and then modify DNS records. Once DNS conversion is complete destroy old droplet. This causes very little to no downtime and might be the best solution, plus Digital Ocean charges by the hour so it wouldn't be very expensive.
What about sowtware that was bought and tied to an IP? Like control panels?
There should be Guaranteed way to keep an IP when resizing droplet.

I just wanted to provide an update to this question in case anyone still stumbles across it. Since this was asked, we introduced some new features around resizing. In addition to the existing "flexible" resizing option, we now offer permanent resizing which allows you to resize your disk space as well as CPU and RAM. This makes the old snapshot and redeploy method of resizing unnecessary, and as you are not destroying your Droplet you don't run the risk of losing your IP address.

For more info, check out this article:

Resizing your servers can be an effective way of increasing their capacity, by allowing them to utilize more memory (RAM), CPU, and disk storage. The ability to resize a server, also known as vertical scaling, can be useful in a variety of situations that prompt the need for a more powerful server, such as if your concurrent user base increases or if you need to store more data. In this tutorial, we will show you how to resize your server, also known as a droplet, on DigitalOcean.
Have another answer? Share your knowledge.