[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"seo-verification":3,"blog-heberger-clickhouse-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":28,"sections":29,"ctaTitle":72,"ctaBody":73,"ctaButton":74,"ctaUrl":75,"relatedPosts":76},64,"heberger-clickhouse-vps","Hosting ClickHouse on a VPS","Host ClickHouse on your VPS: an ultra-fast columnar analytical database for your logs, metrics, and dashboards. Docker, memory tuning, and SSL guide.",8,768,false,"2026-04-17T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-clickhouse-vps-poster.svg",{"categorySlug":18,"appSlug":27},"clickhouse","ClickHouse is a column-oriented analytical database capable of aggregating billions of rows in a few milliseconds. It's the reference tool for reporting, log analysis, and real-time dashboards, and it self-hosts very well on a properly sized VPS. Here's how to deploy it with Docker, secure it, and configure it for optimal performance.",[30,34,44,47,69],{"type":31,"title":32,"body":33},"h2","Why self-host ClickHouse on a VPS","ClickHouse excels at analytical (OLAP) queries: thanks to its columnar storage and aggressive compression, it can scan terabytes on modest hardware where a classic relational database would collapse. Self-hosting it on a VPS spares you the per-query-volume costs of managed offerings (ClickHouse Cloud, BigQuery) and gives you full control over the schema, table engines, and retention. It's particularly relevant for ingesting your own application logs, product metrics, or analytics events without sending your data to a third party. Since ClickHouse often compresses data by a factor of 5 to 10, a VPS with a reasonable SSD disk can store hundreds of millions of events. You also keep control over latency: your dashboards query an instance close to your users rather than a remote service.",{"type":35,"title":36,"items":37},"ul","The concrete benefits of self-hosting ClickHouse",[38,39,40,41,42,43],"Extremely fast analytical queries: aggregations over hundreds of millions of rows in under a second.","Columnar compression of 5x to 10x that drastically reduces the storage cost of your logs and events.","Massive ingestion: hundreds of thousands of rows per second on a single well-tuned node.","SQL-compatible and compatible with many connectors (Grafana, Metabase, HTTP and native clients).","Analytical sovereignty: your logs and product metrics stay on your infrastructure.","No per-query billing: a fixed VPS cost for a high analytical volume.",{"type":31,"title":45,"body":46},"Hardware and software prerequisites","ClickHouse loves RAM and fast disk. For serious analytical use, aim for 4 GB of RAM minimum, but 8 GB offer a much healthier margin for large aggregations and marks (`mark cache`). On the CPU side, 2 to 4 vCPU allow queries to be parallelized. The disk is critical: favor NVMe SSD with at least 50 to 100 GB depending on your volume and retention, knowing that compression reduces the actual footprint. You'll need Docker, a domain if you expose the HTTP interface, and particular attention to the `max_memory_usage` parameter to prevent a query from bringing down the server. Avoid exposing the native `9000` port directly on the Internet.",{"type":48,"title":49,"steps":50},"steps","Deploying ClickHouse step by step",[51,54,57,60,63,66],{"title":52,"body":53},"Prepare the VPS","Install Docker, increase the system limits (`ulimit -n` to 262144) because ClickHouse opens many file descriptors. Disable excessive swap and check that the disk is indeed NVMe SSD.",{"title":55,"body":56},"Launch ClickHouse via Docker","Use the official `clickhouse\u002Fclickhouse-server` image. Mount three persistent volumes: `\u002Fvar\u002Flib\u002Fclickhouse` (data), `\u002Fvar\u002Flog\u002Fclickhouse-server` (logs), and a configuration folder `\u002Fetc\u002Fclickhouse-server\u002Fconfig.d`. Add `ulimits: nofile: 262144` in the compose.",{"title":58,"body":59},"Create a user and a password","Never leave the `default` user without a password. Create a `users.d\u002Fcustom.xml` file with a dedicated user, a hashed password (`echo -n motdepasse | sha256sum`), and quotas. Restrict `\u003Cnetworks>` to the authorized IPs.",{"title":61,"body":62},"Tune the memory and the profile","In `config.d`, set `max_server_memory_usage_to_ram_ratio` to 0.8 and define a per-query `max_memory_usage` suited to your VPS to avoid OOMs. Enable partition retention with a TTL on your tables (`TTL date + INTERVAL 90 DAY`).",{"title":64,"body":65},"Expose the HTTP interface behind a reverse proxy","ClickHouse exposes an HTTP API on port `8123`. Put Nginx or Caddy in front for TLS and additional authentication, and don't open the native `9000` port to the public. Reserve native access to the internal network or via an SSH tunnel.",{"title":67,"body":68},"Connect a visualization tool","Connect Grafana or Metabase to the HTTPS endpoint to build your dashboards. Create your tables with the `MergeTree` engine, choose a relevant `ORDER BY`, and partition by month for efficient queries and purging.",{"type":70,"body":71},"tip","The choice of the MergeTree engine's sort key (`ORDER BY`) is the decisive performance factor: put first the columns most filtered in your queries (often a date and an identifier). Use `Buffer` tables or batch inserts of several thousand rows rather than row-by-row insertions, which create a multitude of small partitions and trigger expensive merges. Monitor `system.merges` and `system.parts` to detect excessive fragmentation.","Deploy your ClickHouse analytical warehouse","The ServOrbit Cloud VPS provides the RAM and NVMe disks that ClickHouse needs to analyze your logs and metrics at high speed, in a Docker environment you control end to end.","Deploy on Cloud VPS","\u002Fvps-cloud",[77,90,104],{"id":78,"slug":79,"title":80,"excerpt":81,"readTime":11,"views":82,"isPinned":13,"publishedAt":83,"category":84,"categories":85,"featuredImage":23,"bgImage":24,"posterImage":87,"relatedSolution":88},56,"heberger-postgresql-vps","PostgreSQL on a VPS: a reliable and controlled database","Host PostgreSQL on a VPS: volumes, backups, restricted network access and sound configuration for your applications.",2240,"2026-04-25T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[86],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":18,"appSlug":89},"postgresql",{"id":91,"slug":92,"title":93,"excerpt":94,"readTime":95,"views":96,"isPinned":13,"publishedAt":97,"category":98,"categories":99,"featuredImage":23,"bgImage":24,"posterImage":101,"relatedSolution":102},57,"heberger-mysql-vps","Hosting MySQL on a VPS","Host MySQL on your Cloud VPS: Docker deployment, hardening, InnoDB tuning, and automated backups, step by step.",7,509,"2026-04-24T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[100],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-mysql-vps-poster.svg",{"categorySlug":18,"appSlug":103},"mysql",{"id":105,"slug":106,"title":107,"excerpt":108,"readTime":95,"views":109,"isPinned":13,"publishedAt":110,"category":111,"categories":112,"featuredImage":23,"bgImage":24,"posterImage":114,"relatedSolution":115},58,"heberger-redis-vps","Hosting Redis on a VPS","Deploy Redis on your Cloud VPS: ultra-fast cache, sessions, and queues, with persistence, security, and memory tuning.",546,"2026-04-23T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[113],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":18,"appSlug":116},"redis",1785628434697]