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 Model | Setup Effort | Latency & Stability | Isolation & Compliance | Best Fit |
|---|---|---|---|---|
| Shared Relay (Free) | Zero (enabled by default) | Good for general remote access | Shared multi-tenant relay pool | Individual users, PoCs, fast onboarding |
| Dedicated Relay (VIP) | Low (select in console) | Lower jitter, reserved bandwidth | Dedicated platform relay capacity | Paid teams, frequent RDP/WebRTC/SSH workloads |
| User-Managed Relay | Moderate (deploy own DERP node) | Fully controlled by your region & ISP | Traffic stays on your own relay hosts | Strict compliance, custom regions, China/global edge tuning |
Recommended Rollout Progression
- Start on the default shared relay to validate device login, ACLs, and subnet routing in minutes.
- Upgrade to a dedicated relay if daily remote desktop (RDP/WebRTC), large file transfers, or cross-ISP sessions need more predictable throughput.
- 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
- Tenant partitioning: Split distinct customers, business units, or production vs. staging environments into separate tenants so device inventories and ACL blast radius never mix.
- Overlay CIDR planning: Larktun uses
100.64.0.0/16by default; customize it (for example192.168.6.0/24) if your enterprise environment already allocates100.64.0.0/10internally. - Client onboarding mix: Pick the right client per endpoint type:
- Desktops: Desktop Client Operations
- Linux servers & containers: Install on Linux · Docker Login
- Home / office gateways: Install on NAS · Synology NAS · OpenWrt Routers
- Mobile & big screens: iOS App Overview · Android TV
- Least-privilege ACL baseline: Start with explicit user/group rules and port-scoped destinations (
:22,:443,:3389,:5001) instead of permanent wildcard access. - 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:
- 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). - Add the node configuration in Derper using the visual form or JSON editor.
- Keep
omitDefaultRegions: falseduring initial testing so clients can fall back to platform relays if your custom node goes down; only switch totrueafter 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
regionIDbetween900and999to 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.