Skip to main content

Deployment Modes and Configuration

Larktun is delivered as a managed SaaS control plane designed for both individual power users and multi-team organizations. Rather than forcing a rigid network topology, a clean deployment combines four modular decisions: tenant boundaries, overlay IP planning, client onboarding paths, and relay (DERP) strategy.

Who Uses Which Deployment Pattern​

  • Individual users & home labs: One personal tenant connecting home PCs, NAS appliances, OpenWrt routers, cloud VMs, and mobile devices (iOS/Android/TV) with zero control-plane maintenance.
  • Engineering & IT operations teams: Department- or project-scoped tenants with centralized ACL templates, subnet routers for internal data-center/office ranges, and per-tenant audit logs.
  • Compliance-sensitive or multi-region enterprises: Managed SaaS control plane paired with dedicated or customer-hosted DERP relays to keep relayed traffic inside approved regions or private infrastructure.

Comparing the Three Relay Strategies​

Direct peer-to-peer WireGuard paths are always preferred automatically. When symmetric NAT, strict corporate firewalls, or cross-ISP routing blocks direct UDP, Larktun falls back seamlessly to DERP relays:

Relay ModelSetup EffortLatency & StabilityIsolation & ComplianceBest Fit
Shared Relay (Free)Zero (enabled by default)Good for general remote accessShared multi-tenant relay poolIndividual users, PoCs, fast onboarding
Dedicated Relay (VIP)Low (select in console)Lower jitter, reserved bandwidthDedicated platform relay capacityPaid teams, frequent RDP/WebRTC/SSH workloads
User-Managed RelayModerate (deploy own DERP node)Fully controlled by your region & ISPTraffic stays on your own relay hostsStrict compliance, custom regions, China/global edge tuning
  1. Start on the default shared relay to validate device login, ACLs, and subnet routing in minutes.
  2. Upgrade to a dedicated relay if daily remote desktop (RDP/WebRTC), large file transfers, or cross-ISP sessions need more predictable throughput.
  3. Add a user-managed DERP relay when data-residency policies, specialized corporate networks, or custom regional POPs require relay infrastructure under your direct control.

Planning Checklist Before Scaling Up​

  1. Tenant partitioning: Split distinct customers, business units, or production vs. staging environments into separate tenants so device inventories and ACL blast radius never mix.
  2. Overlay CIDR planning: Larktun uses 100.64.0.0/16 by default; customize it (for example 192.168.6.0/24) if your enterprise environment already allocates 100.64.0.0/10 internally.
  3. Client onboarding mix: Pick the right client per endpoint type:
  4. Least-privilege ACL baseline: Start with explicit user/group rules and port-scoped destinations (:22, :443, :3389, :5001) instead of permanent wildcard access.
  5. Subnet routers for agentless devices: Place one always-on Linux host or OpenWrt router on the LAN to reach cameras, PLCs, printers, or legacy NAS boxes via Approve Subnet Routes.

User-Managed DERP Relay Configuration​

To attach your own DERP server in the console's Derper page:

  1. Deploy a DERP node on a host with a public IP close to your users and open its HTTPS/DERP port (TCP) and STUN port (UDP, default 3478).
  2. Add the node configuration in Derper using the visual form or JSON editor.
  3. Keep omitDefaultRegions: false during initial testing so clients can fall back to platform relays if your custom node goes down; only switch to true after verifying redundancy and failover.

Example DERP JSON Configuration​

Below is an example custom region definition for tenant t01:

{
"omitDefaultRegions": false,
"regions": {
"903": {
"regionID": 903,
"avoid": false,
"regionCode": "t01",
"regionName": "Tenant t01 DERP",
"nodes": [
{
"ipv4": "18.138.241.18",
"name": "t01-903a",
"hostName": "derper.example.com",
"regionID": 903,
"derpport": 8088,
"stunport": 3478
}
]
}
}
}

Relay Hardening and Operations Tips​

  • Use a unique regionID between 900 and 999 to avoid colliding with default region IDs.
  • Monitor TLS certificate expiry, TCP port reachability, and UDP STUN responsiveness on your custom DERP host.
  • For production teams, deploy at least two relay nodes in separate availability zones or regions and test failover before relying exclusively on custom relays.

Continue Reading​