Where does appsettings.json go?

The documentation for configuring advanced settings with appsettings.json (https://docs.ironmansoftware.com/config/settings) doesn’t actually say where this file should go.
I’ve got a very simple config in appsettings.json to change the port to 5001, and I’ve moved this file to the following locations and none of them (after restarting the Universal service) change the port from 5000 to 5001:

  • $Env:ProgramData\Universal
  • $Env:ProgramData\Universal\Repository
  • $Env:ProgramData\Universal\Repository\.universal

Is appsettings.json supposed to go somewhere else, or is there an issue with this simple config file?

{
  "Kestrel": {
"Endpoints": {
  "HTTP": {
    "Url": "http://*:5001"
  }
}
  },
  "AllowedHosts": "*",
  "Data": {
"RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
"ConnectionString": "%ProgramData%\\UniversalAutomation\\database.db",
"GitRemote": "",
"GitUserName": "",
"GitPassword": ""
  }
}

C:\ProgramData\PowerShellUniversal\

If you place it here it’ll remain persistent throughout your upgrades.

Yes this is indeed correct, thank you.

There are two directories created by Powershell Universal in C:\ProgramData: PowerShellUniversal, and UniversalAutomation.

If I may suggest the dev team revise their documentation, which currently states “$Env:ProgramData\Universal” (a path that is not created by the installation, and which others like myself may manually create while trying to get this working).

I’ve fixed the docs. Sorry about that.