import type { Metadata } from "next"; import { Server, ArrowRight, Terminal, Package, Cloud } from "lucide-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; export const metadata: Metadata = { title: "Self-Hosting", }; function CodeBlock({ code }: { code: string }) { return (
      {code.trim()}
    
); } function Step({ n, title, children, }: { n: number; title: string; children: React.ReactNode; }) { return (
{n}

{title}

{children}
); } export default function SelfHostingPage() { return (
{/* Header */}
Deployment Self-Hosting

Self-Hosting

Run the VectorDNS Go server on your own VPS or infrastructure. The DNS API is a single stateless binary — no database required.

{/* Prerequisites */} Prerequisites
  • Docker Recommended — no Go toolchain required on the host.
  • Go 1.22+ Required only if building from source.
  • Port 8080 Default port (configurable via{" "} PORT env var).
{/* Docker (recommended) */}

Docker (Recommended)

Recommended

At minimum, set{" "} API_KEY {" "} and{" "} CORS_ORIGINS . See{" "} Configuration {" "} for all options.

The server will be available at{" "} http://localhost:8080 .

Should return{" "} {`{"status":"ok","version":"0.1.0"}`} .

{/* From source */}

From Source

If you prefer to build and run without Docker (requires Go 1.22+):

{/* VPS Deployment */}

VPS Deployment

Deploying to a VPS (e.g. DigitalOcean, Hetzner, Linode)? Here is a recommended setup.

Reverse proxy with nginx Serve the Go server behind nginx so you can add TLS and a clean domain path. systemd service (non-Docker) Keep the server running across reboots without Docker.
docker-compose (with Redis — near-term) Future: once Redis caching is added, a docker-compose setup will be provided.

Redis caching is on the roadmap. This configuration will be provided when the caching layer ships.

{/* Security note */} Security Checklist
  • • Set a strong{" "} API_KEY {" "} — do not leave auth disabled in production.
  • • Set{" "} CORS_ORIGINS {" "} to your exact frontend domain, not{" "} *.
  • • Always run behind TLS (use Let`'`s Encrypt via Certbot with nginx).
  • • Rate limiting is enabled by default — keep it on.
); }