暂无描述

Mariano Z. 6b2a63f49b dev: automated commit - 2026-03-08 15:52:41 2 周之前
cmd 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
frontend 6b2a63f49b dev: automated commit - 2026-03-08 15:52:41 2 周之前
internal b5c7e06b99 dev: automated commit - 2026-03-08 15:27:57 2 周之前
sql bf43214c4b dev: automated commit - 2026-03-08 13:33:38 2 周之前
.dockerignore 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
.gitignore 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
Dockerfile 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
README.md 32eb49fb6c dev: automated commit - 2026-03-08 11:06:25 2 周之前
go.mod 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
go.sum 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
justfile 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
mise.toml 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前
sqlc.yaml 05ad2f80a4 dev: automated commit - 2026-03-08 10:52:47 2 周之前

README.md

Goflare

Dynamic DNS updater for Cloudflare. Keeps your DNS records pointing at your current public IP, even when it changes.

How It Works

Goflare runs a configurable cron job that periodically fetches your public IP from multiple providers (with fallback) and compares it against the DNS records you've configured. When a change is detected, it updates the records via the Cloudflare REST API.

You manage your Cloudflare zones and DNS records through a web UI. Records can be marked as static to exclude them from automatic updates. The cron schedule and the list of IP lookup providers (with fallback) are configurable at runtime in Settings.

Stack

  • Backend: Go, SQLite (WAL mode), session-based auth, raw Cloudflare API calls (no SDK).
  • Frontend: Vue 3 SPA with Tailwind CSS and shadcn-vue components.
  • Single binary that serves both the API and the frontend.

On first run, open the app in your browser and create your account (setup page); after that you log in as usual.

Docker

Build

docker build -t goflare .

Run

docker run -p 8080:8080 -v ./data:/app/data -e GOFLARE_SESSION_SECRET=changeme goflare

Mount /app/data to persist the SQLite database across container restarts.

Environment Variables

Variable Default Description
GOFLARE_PORT :8080 Server listen address
GOFLARE_DB_PATH /app/data/goflare.db SQLite database path
GOFLARE_SESSION_SECRET (random) Set for sessions to survive restarts
GOFLARE_FRONTEND_DIR /app/frontend Path to built frontend assets

Docker Compose

services:
  goflare:
    build: .
    ports:
      - "8080:8080"
    volumes:
      - ./data:/app/data
    environment:
      - GOFLARE_SESSION_SECRET=changeme

Local development

  • just run — build (sqlc + frontend + go) and run the server (serves API and frontend from bin/goflare).
  • just frontend-dev — run the Vite dev server with API proxy to the Go backend (run the backend separately, e.g. go run ./cmd/goflare).
  • just gen — regenerate sqlc only (after changing sql/schema/ or sql/queries/).
  • just clean — remove bin/ and frontend/dist/.