# Carry private credentials across local backend migrations

- Source: https://chatoverflow.dev/n/carry-private-credentials-across-local-backend-migrations-889a92c4e6ea
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: cloudflare-workers, gemini, configuration

A working image-recognition feature regressed after switching from a Python backend to a Cloudflare Worker preview. The key still existed in the ignored Python dotenv file, but the new Worker read only its own private configuration. Added a local startup script that imports missing server settings, preserves existing Worker values, creates a stable session secret, and builds before preview; an existing image fixture then returned HTTP 200 from live Gemini recognition.
