Keycloak Start-dev vs Start
The choice in keycloak start dev vs start separates local testing from live production runs. Teams pick the dev mode for quick laptop builds and the start mode for real user traffic. Keycloak is an open-source identity tool that manages user logins and role tokens. How you boot the server changes its security rules, data storage, and speed. Picking the wrong mode in a live setup exposes user accounts to big risks. How keycloak start dev vs start shapes your stack The dev mode optimizes for f
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
The choice in keycloak start dev vs start separates local testing from live production runs. Teams pick the dev mode for quick laptop builds and the start mode for real user traffic.
Keycloak is an open-source identity tool that manages user logins and role tokens. How you boot the server changes its security rules, data storage, and speed. Picking the wrong mode in a live setup exposes user accounts to big risks.
How keycloak start dev vs start shapes your stack
The dev mode optimizes for fast local work on a single laptop. It boots the identity server without asking for certs or external database links. It uses a local file or memory store to hold test accounts. It also allows plain web traffic over standard local ports for easy app testing. Developers can change login themes and reload pages right away without a full rebuild. This makes it ideal when you build a new app or test login flows.
The production start mode locks down the identity server for real network traffic. It refuses to boot unless you set up safe transport certs and host names. It also requires a real external database to store user records and realm data. The server caches themes and settings in memory to handle high login loads fast. Platform teams run this mode in staging and live clusters to protect user keys.
Data storage and build steps in each mode
How the server handles data and startup checks also sets these modes apart. In dev mode, the server skips the pre-boot build step to save time. It loads providers and themes on the fly while you test your app. If the container stops, any test users stored in memory will vanish right away. Some teams mount a local folder to keep test realms between laptop reboots.
In start mode, the server can run a build step before it opens ports. This step bundles database drivers and network settings into a fast server image. The server then links to an external SQL store to keep user data safe. Multiple server nodes can share this database to handle node crashes and load spikes. This setup keeps login tokens active even if one identity server goes down.
Keycloak + K8s RBAC Role vs ClusterRole: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Security trade-offs and where identity servers stop
Running dev mode on a public network is a common and dangerous mistake. Because it accepts plain web traffic, attackers can read login tokens on the wire. Local data stores also corrupt under heavy load and lack safe backup tools. Teams must enforce strict build rules so dev mode stays on local laptops only.
Even a strict production start mode only handles the initial user login step. Keycloak checks who a person is and hands back a signed role token. It does not watch what an engineer does inside a database after logging in. Once a user connects to a live server, the identity tool steps out. It cannot inspect individual SQL queries or block a bad command in real time. It also cannot rewrite sensitive fields like emails, phone numbers, or card numbers. To control live database queries and mask results, teams need runtime session controls.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Can I use the development mode for a staging server?
No, you should only run the dev mode on a private local laptop. Staging servers sit on shared networks and need the real start mode with certs.
What happens to my realms when I switch to production mode?
Local test data does not move over on its own when you change modes. You must export your realm settings and import them into your production database.
Does Keycloak log the database queries a user runs after login?
No, the identity server only logs login events and token grants for apps. It cannot see or log the queries a user runs inside a database.
Related guides
In this post