Port 8123 is the ClickHouse column-oriented database HTTP interface for queries and data ingestion. ClickHouse serves SQL queries over HTTP on port 8123 and native binary protocol on port 9000. Default installations allow unauthenticated queries. Enable authentication and restrict to analytics networks.
Port Number
8123
Protocol
TCP
Service
ClickHouse HTTP Interface
Range
IANA Registered (1024–49151)
Check if unauthenticated access works (should return 401 or 403)
curl -s 'http://localhost:8123/?query=SELECT+currentUser()'Get ClickHouse version (check for CVE patches)
curl -s 'http://localhost:8123/?query=SELECT+version()'List databases with authentication
curl -s 'http://localhost:8123/?query=SHOW+DATABASES' -u default:passwordAudit user authentication methods (look for no_password entries)
curl -s 'http://localhost:8123/?query=SELECT+name,auth_type+FROM+system.users' -u admin:passcurl 'http://localhost:8123/?query=SELECT+1'
echo 'SELECT count() FROM events' | curl http://localhost:8123/ -d @-
clickhouse-client -h host --port 9000ClickHouse was developed at Yandex for web analytics (Yandex.Metrica) and open-sourced in 2016. Port 8123 was chosen for the HTTP interface alongside port 9000 for the native binary protocol. ClickHouse became the fastest open-source analytical database, processing billions of rows per second on commodity hardware. ClickHouse Inc. was founded in 2021 (spun out of Yandex) and launched ClickHouse Cloud. Authentication was optional by design for internal use at Yandex; it remains opt-in in open-source deployments.
How do I enable authentication in ClickHouse?
In users.xml: change <password></password> to <password_sha256_hex>SHA256_HASH</password_sha256_hex> for the default user. Or use: CREATE USER admin IDENTIFIED BY 'strong_password'; GRANT ALL ON *.* TO admin; then set <access_management>1</access_management> in users.xml to enable SQL-driven user management. Restart ClickHouse. Test: curl http://localhost:8123/ should now return 401.
ClickHouse port 8123 (HTTP) vs 9000 (native) – which should applications use?
Native protocol (9000): binary format, 30-40% faster for large result sets, supports query progress callbacks, compression by default. Better for applications. HTTP (8123): simpler integration (any HTTP client works), better for dashboards (Grafana), supports output formats (JSON, CSV), easier to proxy/load-balance. Use 9000 for application backends; 8123 for dashboards, ad-hoc queries, and systems that only speak HTTP.