---
title: "The guide to secure deployments in CockroachDB"
description: "CockroachDB should run in secure mode in production rather than with the --insecure flag, which leaves the cluster open to any client, lets root log in without a password, and sends traffic unencrypted."
url: "https://swe.quest/articles/the-guide-to-secure-deployments-in-cockroachdb-64425782a2230dcd"
canonical: "https://www.cockroachlabs.com/blog/secure-deployments/"
source: "Cockroach Labs"
published: "2017-11-09"
difficulty: "easy"
kind: "How-to"
reading_minutes: 4
tags: ["distributed-databases","security","identity-auth","observability"]
---

# The guide to secure deployments in CockroachDB

A post on [Cockroach Labs](https://swe.quest/sources/cockroachdb.md), published 2017-11-09, 4 min read, How-to. Original: [https://www.cockroachlabs.com/blog/secure-deployments/](https://www.cockroachlabs.com/blog/secure-deployments/)

## Summary

CockroachDB should run in secure mode in production rather than with the --insecure flag, which leaves the cluster open to any client, lets root log in without a password, and sends traffic unencrypted. Secure mode encrypts all node-to-node and client-server traffic with TLS. It authenticates through node client certificates for the special 'node' user, node addresses listed in server certificates to prevent man-in-the-middle attacks, and certificate Common Name or password checks for SQL users. Because the built-in Admin UI cannot alert when the cluster itself is down, operators should scrape CockroachDB's Prometheus metrics and route alerts through AlertManager.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Distributed databases](https://swe.quest/tags/distributed-databases.md) (Data & databases)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- TLS certificates basics ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- Prometheus basics

## Keywords

CockroachDB, TLS, Prometheus, AlertManager

## Related posts

- [CockroachDB 26.4: One major upgrade a year with skip-level upgrades, run active-active across two data centers, and encrypt for the post-quantum era](https://swe.quest/articles/cockroachdb-26-4-one-major-upgrade-a-year-with-skip-level-upgrades-run-active-32aefe70e59e049a.md): Cockroach Labs · 2026-11-03 · Medium · 7 min read · Distributed databases, Databases, Identity & auth, Cryptography, Observability
  CockroachDB 26.4 introduces skip-level upgrades so operators can move from one annual .4 release to the next without stopping at intermediate releases, and adds active-active writes across two data centers via transactional logical data replication.
- [Introducing the CockroachDB Kubernetes Operator](https://swe.quest/articles/introducing-the-cockroachdb-kubernetes-operator-e95f6b6906d1361c.md): Cockroach Labs · 2026-08-05 · Medium · 5 min read · Kubernetes, Distributed databases, Deployment, Schema migrations
  Cockroach Labs has made its CockroachDB Kubernetes Operator generally available.
- [ClickHouse on Docker Hardened Images](https://swe.quest/articles/clickhouse-on-docker-hardened-images-5b8d5f1286faba04.md): ClickHouse · 2026-07-10 · Medium · 5 min read · Supply chain security, Containers, Security
  ClickHouse server, Keeper, the Kubernetes Operator with its Helm chart, and the metrics exporter are now in Docker's Hardened Images catalog.
- [Better security for your app's secrets](https://swe.quest/articles/better-security-for-your-app-s-secrets-1add70314c176532.md): incident.io · 2023-07-10 · Medium · 9 min read · Security, Cloud platforms, Configuration management, Identity & auth, Go
  incident.io's Go app loads config from per-environment YAML files, overrides values with environment variables, then resolves \`secret-manager:\` references from Google Secret Manager at boot.
- [Corrosion](https://swe.quest/articles/corrosion-041c41646926d669.md): Fly.io · 2025-10-22 · Medium · 9 min read · Distributed systems, Replication, SQLite, Incidents & postmortems, Rust
  Corrosion is Fly.io's open-source service discovery system: a Rust program that propagates a SQLite database across thousands of workers via SWIM gossip and QUIC, using the cr-sqlite CRDT extension with last-write-wins logical timestamps instead of distributed consensus.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
