Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
📡

Floating IPs

Updated 2026-11-20
On this page

Floating IPs

A floating IP is a public address you can attach to an instance to make it reachable from the internet, and move to another instance whenever you need to.

Instances live on private networks and, by default, cannot be reached inbound from the internet. A floating IP is a public address your project holds; associating it with an instance forwards inbound traffic through your router's external gateway to that instance's fixed IP.

Because the public address is decoupled from any one instance, you can move it. Rebuild a server, promote a standby, or swap to a new version, and simply move the floating IP so the public address stays the same while what sits behind it changes.

Screenshot — The Networking > Floating IPs list showing allocated addresses and their current associations
The Networking > Floating IPs list showing allocated addresses and their current associations

Key concepts

Floating IP — A public address your project owns, independent of any single instance.

Association — The current mapping of a floating IP to an instance's fixed IP.

Allocation — Reserving a floating IP into your project from the external network pool.

Before you start

  • A router with an external gateway serving the instance's subnet.
  • A security group that allows the inbound ports you want to expose.
  • Available floating IP quota in the project.

Step by step

  1. Open Floating IPs

    Go to Networking and open Floating IPs.

    Screenshot — The Floating IPs list with the Allocate button
    The Floating IPs list with the Allocate button
  2. Allocate an address

    Allocate a new floating IP to your project from the external network.

    Screenshot — The allocate dialog
    The allocate dialog
  3. Associate it

    Associate the floating IP with the instance you want to expose.

    Screenshot — The associate-to-instance dialog
    The associate-to-instance dialog
  4. Confirm reachability
    • Check that a security group on the instance allows the port you exposed.
    • Test the connection to the floating IP from outside.
  5. Move or release

    Disassociate and reassociate the address to move it, or release it back to the pool when you no longer need it.

Examples

Allocate and attach a floating IP
patrii floating-ip create --network public
patrii floating-ip attach web-1 --ip 203.0.113.42
Move it to another instance
patrii floating-ip detach web-1 --ip 203.0.113.42
patrii floating-ip attach web-2 --ip 203.0.113.42
Allocate and attach a floating IP with Terraform
data "patrii_network" "public" {
  name = "public"
}

resource "patrii_floating_ip" "web" {
  floating_network_id = data.patrii_network.public.id
}

resource "patrii_floating_ip_associate" "web" {
  floating_ip_id = patrii_floating_ip.web.id
  instance_id    = patrii_instance.web.id
}

Limits & specifications

Floating IP actions:

ActionWhat it does
AllocateReserves a public address into your project.
AssociatePoints the address at an instance's fixed IP.
DisassociateDetaches the address, leaving it allocated for reuse.
ReleaseReturns the address to the pool.

Best practices

  • Reuse one floating IP across deploys by moving it, rather than changing published addresses.
  • Pair every floating IP with a tight security group; a public address is only as safe as the ports you open.
  • Release addresses you no longer use so they do not sit idle against your quota.
  • For services behind many instances, point a load balancer at them and give the load balancer the floating IP instead of individual servers.

FAQ

I associated a floating IP but the instance is still unreachable.
Check three things: the instance's subnet is served by a router with an external gateway, a security group allows the inbound port, and the service is actually listening. The floating IP diagnostics can help pinpoint which link is missing.
Can I keep a floating IP while rebuilding a server?
Yes. Disassociate it before the rebuild and reassociate it afterward, or move it to a standby so the public address never changes.
Can two instances share one floating IP?
A floating IP associates with one instance at a time. To spread traffic across several instances, use a load balancer.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us