diff --git a/BTCPayServer/Configuration/BTCPayServerOptions.cs b/BTCPayServer/Configuration/BTCPayServerOptions.cs index 8ad9f365f..5887a35a3 100644 --- a/BTCPayServer/Configuration/BTCPayServerOptions.cs +++ b/BTCPayServer/Configuration/BTCPayServerOptions.cs @@ -72,6 +72,9 @@ namespace BTCPayServer.Configuration DataDir = conf.GetDataDir(NetworkType); Logs.Configuration.LogInformation("Network: " + NetworkType.ToString()); + if (conf.GetOrDefault("launchsettings", false) && NetworkType != NetworkType.Regtest) + throw new ConfigException($"You need to run BTCPayServer with the run.sh or run.ps1 script"); + var supportedChains = conf.GetOrDefault("chains", "btc") .Split(',', StringSplitOptions.RemoveEmptyEntries) .Select(t => t.ToUpperInvariant()); diff --git a/BTCPayServer/Properties/launchSettings.json b/BTCPayServer/Properties/launchSettings.json index f069e89ee..ec1458aca 100644 --- a/BTCPayServer/Properties/launchSettings.json +++ b/BTCPayServer/Properties/launchSettings.json @@ -5,6 +5,7 @@ "launchBrowser": true, "environmentVariables": { "BTCPAY_NETWORK": "regtest", + "BTCPAY_LAUNCHSETTINGS": "true", "BTCPAY_BUNDLEJSCSS": "false", "BTCPAY_LTCEXPLORERURL": "http://127.0.0.1:32838/", "BTCPAY_BTCLIGHTNING": "type=charge;server=http://127.0.0.1:54938/;api-token=foiewnccewuify", @@ -24,6 +25,7 @@ "launchBrowser": true, "environmentVariables": { "BTCPAY_NETWORK": "regtest", + "BTCPAY_LAUNCHSETTINGS": "true", "BTCPAY_PORT": "14142", "BTCPAY_HttpsUseDefaultCertificate": "true", "BTCPAY_BUNDLEJSCSS": "false",