Question

Auto assign floating IP

I sometimes run a game server for my friends and I to use, but it’s not on most of the time so I usually snapshot it and destroy it, and restore the snapshot a few days later when we play again. I was wondering if there’s a way to automatically assign my floating IP to the one server I have when it’s created.


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi,

As of right now, there isn’t a simple way to do it through the control panel, other than manually attaching the IP after the Droplet is created. However, you can use the API to do that. Here’s a rough outline of how it would work:

  1. create a new Droplet and store its ID
  2. check its status every few seconds and wait until it’s Active
  3. finally, attach your Floating IP to the Droplet.