Persistent Fix IP for Azure Container Instances in VNet

Mahdi Barkhordari 0 Reputation points
2025-08-10T14:11:33.6633333+00:00

Hello Azure Support Team,

We are currently running two Azure Container Instances inside the same VNet and Subnet:

One container runs our backend service.

The other container runs Nginx.

These containers communicate with each other and with external systems. However, the issue is that every time the containers are restarted or redeployed, they receive new private IP addresses. This breaks our configuration and requires us to manually update the IP addresses each time. Like Nginx location configuration.

We need a solution that allows us to:

Assign static private IP addresses or private DNS to each container instance inside the VNet/Subnet so they remain the same even after restart.

Optionally assign a persistent public IP if needed for external access.

Our goal is to keep using Azure Container Instances (not switching to a VM) and maintain the existing VNet/Subnet setup without reconfiguring everything after a restart.

Could you please advise the recommended Azure-native approach for ensuring static IP addresses for Azure Container Instances in this scenario?

Thank you,Hello Azure Support Team,

We are currently running two Azure Container Instances inside the same VNet and Subnet:

One container runs our backend service.

The other container runs Nginx.

These containers communicate with each other and with external systems. However, the issue is that every time the containers are restarted or redeployed, they receive new private IP addresses. This breaks our configuration and requires us to manually update the IP addresses each time. Like Nginx location configuration.

We need a solution that allows us to:

Assign static private IP addresses or private DNS to each container instance inside the VNet/Subnet so they remain the same even after restart.

Optionally assign a persistent public IP if needed for external access.

Our goal is to keep using Azure Container Instances (not switching to a VM) and maintain the existing VNet/Subnet setup without reconfiguring everything after a restart.

Could you please advise the recommended Azure-native approach for ensuring static IP addresses for Azure Container Instances in this scenario?

Thank you,

Azure Container Instances
{count} votes

1 answer

Sort by: Most helpful
  1. Anusree Nashetty 6,470 Reputation points Microsoft External Staff Moderator
    2025-08-11T02:53:46.1+00:00

    Hi Mahdi Barkhordari,

    Azure Container Instances do not natively support assigning a persistent static private IP address that survives restarts or redeployments. Each time you restart or redeploy an ACI, it is allocated a new private IP which breaks direct IP-based configuration.

    Rather than static private IP assignment (not possible for ACI), use Azure Private DNS or Load Balancer with a static frontend IP for reliable service discovery. For public access, use Application Gateway or Load Balancer with a static public IP. All solutions are Azure-native and require some automation for updates after container restarts.

    For your reference: https://dori-uw-1.kuma-moon.com/en-us/answers/questions/1569694/static-private-ip-for-azure-container-instance

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.