Search code examples
azureazure-storageazure-storage-emulator

Change running IP of Azure Storage emulator


I'm using the "new" Azure storage emulator command-line edition. In the previous version it was possible to change IP like 127.0.0.1 -> 192.168.41.123 when running .

I can not locate the same file anymore and have looked into the other config files, but so far with no luck. Anyone knows how to change it?


Solution

  • You can change the IP address in AzureStorageEmulator.exe.config file in C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator directory.

    For example, below I have changed the port from 10000 to 20000.

    <services>
      <service name="Blob" url="http://127.0.0.1:20000/"/>
      <service name="Queue" url="http://127.0.0.1:20001/"/>
      <service name="Table" url="http://127.0.0.1:20002/"/>
    </services>
    

    You would need to restart the storage emulator for this change to take effect.

    Also, please note that you can't use standard UseDevelopmentStorage=true connection string. You must specify custom endpoints in your connection string:

    <appSettings>
      <add key="StorageConnectionString" value="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:20000/devstoreaccount1;TableEndpoint=http://127.0.0.1:20002/devstoreaccount1;QueueEndpoint=http://127.0.0.1:20001/devstoreaccount1;/>
    </appSettings>