# Router DNS setup — give SyncTide a friendly URL

By default SyncTide is reachable on the host's IP, e.g. `http://192.168.1.119`. That works on every device on the LAN, but it's hard to remember and breaks if DHCP hands the host a new IP.

The cleanest fix is a **router DNS entry**: every browser on the LAN — Android included — resolves `http://synctide` directly with no IP and no port. About 5 minutes for any router admin.

This guide covers the most common router stacks. Pick yours and follow the four steps in the matching section.

---

## Step 0 — pin the IP first (required for all options)

Whichever option you pick below, **reserve the DHCP lease for the SyncTide host so the IP never changes**. Otherwise a power outage or DHCP renewal hands the host a new IP and breaks every bookmark on the LAN.

To find the SyncTide host's MAC address:

```powershell
# Run on the SyncTide host:
Get-NetAdapter | Where-Object { $_.Status -eq "Up" } | Select-Object Name, MacAddress
```

The MAC will look like `00-1A-2B-3C-4D-5E`. Use that in the router's "DHCP reservation" or "static lease" section.

---

## Option A — UniFi (Dream Machine, UDM-Pro, UDR, UCG, USG)

1. Open the UniFi Network Application → **Settings → Networks** → click your LAN → **Advanced**.
2. Reserve the DHCP lease: **Settings → Client Devices** → click the SyncTide host → **Fixed IP**.
3. **Settings → Routing & Firewall → DNS** → **Add DNS Record**:
   - Hostname: `synctide`
   - IP Address: the reserved IP
   - Type: A
4. Save. New entries propagate at the next DHCP renewal — reboot Wi-Fi on phones to force it.

**Test from a phone:** open `http://synctide` in Chrome.

---

## Option B — MikroTik / RouterOS

1. Winbox or web UI → **IP → DHCP Server → Leases** → click the host → **Make Static**.
2. **IP → DNS** → tick **Allow Remote Requests** → Apply.
3. **IP → DNS → Static** → **+** (Add):
   - Name: `synctide`
   - Address: the reserved IP
   - Type: A
4. **IP → DHCP Server → Networks** → ensure the **DNS Servers** field includes the router's own LAN IP so clients use it for name resolution.

**Test:**
```bash
ping synctide       # from any LAN device
```

---

## Option C — pfSense / OPNsense

1. **Services → DHCPv4 → [your LAN] → Static Mappings → Add**:
   - MAC: SyncTide host's MAC
   - IP: pick a free IP outside the dynamic range
   - Hostname: `synctide` (optional but nice)
2. **Services → DNS Resolver → General Settings**:
   - Ensure **Enable DNS Resolver** is on
   - Tick **Register DHCP static mappings in the DNS Resolver** (this alone may already give you `synctide.<your-domain>` — try it before step 3)
3. If that didn't take or you want a bare `synctide` name, add **Services → DNS Resolver → Host Overrides → Add**:
   - Host: `synctide`
   - Domain: leave blank (or your LAN domain like `lan`)
   - IP: the reserved IP
4. **Apply Changes**.

**Test:** `nslookup synctide` from a wired client.

---

## Option D — ASUS routers (stock firmware)

ASUS stock firmware doesn't expose static DNS in the GUI, so the cleanest path is:

1. **LAN → DHCP Server → Manually Assigned IP**:
   - Add the SyncTide host's MAC → fixed IP.
2. **LAN → DHCP Server → Domain Name** field — set it to e.g. `local`.
3. Bookmark the URL with the host's name and your local domain — most ASUS routers run dnsmasq and answer `<hostname>.<domain>`. Test `http://<HOSTNAME>.local` first; if that fails you'll need either Merlin firmware (next option) or stick with the IP URL.

### ASUS with AsusWRT-Merlin firmware (full control)

1. SSH into the router.
2. Edit (or create) `/jffs/configs/dnsmasq.conf.add`:
   ```
   address=/synctide/192.168.1.50
   ```
3. Restart dnsmasq:
   ```
   service restart_dnsmasq
   ```

**Test:** `http://synctide` from any LAN device.

---

## Option E — TP-Link / Generic consumer routers

Most consumer routers don't expose static DNS at all. Use the IP-pinning fallback:

1. **DHCP → Address Reservation** (or "DHCP Reservation", "Static IP", varies by vendor):
   - MAC: SyncTide host's MAC
   - IP: pick a free IP outside the dynamic pool
2. Bookmark `http://<reserved-ip>` on every device — Chrome → ⋮ → **Add to Home screen** gives you an app-like icon on Android, same on iOS via Safari.

That's the fallback every customer can do without router quirks.

---

## Option F — Pi-hole / AdGuard Home

If your LAN already runs Pi-hole or AdGuard Home as DNS, this is the easiest setup of all.

### Pi-hole

1. Web UI → **Local DNS → DNS Records → Add**:
   - Domain: `synctide`
   - IP: the SyncTide host's IP
2. Save.

### AdGuard Home

1. **Filters → DNS rewrites → Add DNS rewrite**:
   - Domain: `synctide`
   - Answer: the SyncTide host's IP
2. Save.

Both apply instantly — no DHCP renewal needed.

**Make sure** all LAN devices are using Pi-hole / AdGuard as their primary DNS — push it via the router's DHCP option 6 (DNS Servers).

---

## Option G — Windows DNS Server (corporate AD environment)

For sites with an Active Directory domain controller:

1. Open **DNS Manager** on the DC.
2. Forward Lookup Zones → your AD-integrated zone (e.g. `corp.example.com`) → right-click → **New Host (A)**:
   - Name: `synctide`
   - IP: the SyncTide host's IP
3. Save. Replication takes a minute across DCs.

Users will reach SyncTide at `http://synctide.corp.example.com` (or just `synctide` if their search suffix list includes the zone).

---

## Verifying it works

After any of the options above, test from a wired Windows machine first (most likely to work):

```powershell
nslookup synctide
ping synctide
```

If those resolve correctly, then test from a phone. Phones may need to **disconnect and reconnect to the Wi-Fi** to pick up new DHCP options or DNS — they cache aggressively.

If DNS still doesn't resolve on a phone but works on PC: the phone is using its mobile carrier's DNS (some Android phones default to private DNS like Cloudflare 1.1.1.1). Settings → Connections → More → Private DNS → set to **Off** or **Automatic**.

---

## When none of this is possible

If you can't touch the router (managed by a third party, or no admin access):

- Use the **IP URL** (`http://<host-ip>`).
- On every phone, open the URL once, then ⋮ → **Add to Home Screen** to bookmark it as an app-like icon.
- Ask the customer to **never let DHCP renew the host's lease** — i.e. leave the host on. Or buy a 5-minute slot of router admin time once and pin the IP.

That's the realistic baseline. SyncTide will work indefinitely on an IP URL; a hostname is just a convenience layer on top.
