2023-01-22 03:08:12 +09:00
@using BTCPayServer.Abstractions.Models
2022-07-15 05:38:33 +02:00
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel[]
2019-07-25 18:29:18 +09:00
@{
2021-12-16 11:17:02 +01:00
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Settings");
2019-07-25 18:29:18 +09:00
}
<div class="row">
<div class="col-md-8">
2021-09-07 04:55:53 +02:00
<div class="d-sm-flex align-items-center justify-content-between mb-3">
2022-01-17 17:19:27 -08:00
<h3 class="mb-0">
2021-12-16 11:17:02 +01:00
@ViewData["Title"]
2021-09-07 04:55:53 +02:00
<small>
2023-02-13 00:25:24 -08:00
<a href="https://docs.btcpayserver.org/Apps/" target="_blank" rel="noreferrer noopener" title="More information...">
<vc:icon symbol="info" />
2021-09-07 04:55:53 +02:00
</a>
</small>
2022-01-17 17:19:27 -08:00
</h3>
2021-09-07 04:55:53 +02:00
<form method="post" asp-action="DynamicDnsService">
2022-01-17 17:19:27 -08:00
<button id="AddDynamicDNS" class="btn btn-primary mt-2" type="submit"><span class="fa fa-plus"></span> Add service</button>
2021-09-07 04:55:53 +02:00
</form>
</div>
2019-07-25 18:29:18 +09:00
<div class="form-group">
<p>
2021-09-07 04:55:53 +02:00
Dynamic DNS allows you to have a stable DNS name pointing to your server, even if your IP address changes regulary.
This is recommended if you are hosting BTCPay Server at home and wish to have a clearnet domain to access your server.
</p>
<p>
Note that you need to properly configure your NAT and BTCPay Server installation to get the HTTPS certificate.
2021-10-01 18:18:54 +02:00
See the documentation for <a href="https://docs.btcpayserver.org/Deployment/DynamicDNS/" target="_blank" rel="noreferrer noopener">more information</a>.
2019-07-25 18:29:18 +09:00
</p>
</div>
2021-09-07 04:55:53 +02:00
@if (Model.Any())
{
<table class="table table-sm table-responsive-md">
<thead>
2019-07-25 18:29:18 +09:00
<tr>
<th>Hostname</th>
<th>Last updated</th>
2021-09-07 04:55:53 +02:00
<th class="text-center">Enabled</th>
<th class="text-end">Actions</th>
2019-07-25 18:29:18 +09:00
</tr>
2021-09-07 04:55:53 +02:00
</thead>
<tbody>
2019-07-25 18:29:18 +09:00
@foreach (var service in Model)
{
<tr>
<td>@service.Settings.Hostname</td>
<td>@service.LastUpdated</td>
2021-09-07 04:55:53 +02:00
<td class="text-center">
@if (service.Settings.Enabled)
{
<span class="text-success fa fa-check"></span>
}
else
{
<span class="text-danger fa fa-times"></span>
}
</td>
<td class="text-end">
<a asp-action="DynamicDnsService" asp-route-hostname="@service.Settings.Hostname">Edit</a>
<span> - </span>
2023-01-22 03:08:12 +09:00
<a asp-action="DeleteDynamicDnsService" asp-route-hostname="@service.Settings.Hostname" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="Deleting the dynamic DNS service for <strong>@Html.Encode(service.Settings.Hostname)</strong> means your BTCPay Server will stop updating the associated DNS record periodically." data-confirm-input="DELETE">Delete</a>
2019-07-25 18:29:18 +09:00
</td>
</tr>
}
2021-09-07 04:55:53 +02:00
</tbody>
</table>
}
else
{
<p class="text-secondary mt-3">
There are no dynamic DNS services yet.
</p>
}
2019-07-25 18:29:18 +09:00
</div>
</div>
2021-09-07 04:55:53 +02:00
<partial name="_Confirm" model="@(new ConfirmModel("Delete dynamic DNS service", "Deleting the dynamic DNS service means your BTCPay Server will stop updating the associated DNS record periodically.", "Delete"))" />