[{"data":1,"prerenderedAt":149},["ShallowReactive",2],{"seo-verification":3,"blog-hosting-clickhouse-on-a-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":29,"intro":32,"sections":33,"ctaTitle":79,"ctaBody":80,"ctaButton":81,"ctaUrl":82,"relatedPosts":83},64,"hosting-clickhouse-on-a-vps",{"fr":10,"en":8,"ar":11},"heberger-clickhouse-vps","استضافة-clickhouse-على-خادم-vps","Hosting ClickHouse on a VPS","Host ClickHouse on your VPS: a columnar analytical database for your logs, metrics, and dashboards. Docker, memory tuning, and SSL guide.",5,0,false,"2026-04-17T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-clickhouse-vps-poster.svg",{"categorySlug":30,"appSlug":31},"databases","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.",[34,38,48,51,73,76],{"type":35,"title":36,"body":37},"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":39,"title":40,"items":41},"ul","The concrete benefits of self-hosting ClickHouse",[42,43,44,45,46,47],"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":35,"title":49,"body":50},"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":52,"title":53,"steps":54},"steps","Deploying ClickHouse step by step",[55,58,61,64,67,70],{"title":56,"body":57},"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":59,"body":60},"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":62,"body":63},"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":65,"body":66},"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":68,"body":69},"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":71,"body":72},"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":35,"title":74,"body":75},"One-click install from the ServOrbit Marketplace","Everything above is done by hand, and it is worth knowing how. If you would rather not, ClickHouse is in the ServOrbit Marketplace and installs on your VPS in one click. The template deploys the pinned 26.3 LTS release, mounts persistent volumes for data and logs, raises the file-descriptor limit to 262144 as ClickHouse requires, and creates an `analytics` database on first boot. Above all it closes the most common trap of a manual deployment: the upstream image ships a `default` account with no password at all, and the installation removes it at startup, replacing it with an `admin` account whose password is generated for your server and shown in your client area. Only port 8123 is published, and only on the loopback interface: attach a domain and the built-in SQL console answers on `https:\u002F\u002F\u003Cyour-domain>\u002Fplay` with its TLS certificate; without a domain, go through an `ssh -L 8123:127.0.0.1:8123 root@\u003Cyour-vps-ip>` tunnel and then `http:\u002F\u002Flocalhost:8123\u002Fplay`.",{"type":77,"body":78},"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 ClickHouse in one click on a ServOrbit VPS","Pinned 26.3 LTS release, persistent volumes, generated administrator account: an analytics warehouse ready to take your events.","See the ClickHouse listing","\u002Fmarketplace\u002Fdatabases\u002Fclickhouse",[84,100,114,129],{"id":85,"slug":86,"slugs":87,"title":90,"excerpt":91,"readTime":92,"views":15,"isPinned":16,"publishedAt":93,"category":94,"categories":95,"featuredImage":26,"bgImage":27,"posterImage":97,"relatedSolution":98},56,"postgresql-on-a-vps-a-reliable-and-controlled-database",{"fr":88,"en":86,"ar":89},"heberger-postgresql-vps","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.",4,"2026-04-25T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[96],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":30,"appSlug":99},"postgresql-stack",{"id":101,"slug":102,"slugs":103,"title":106,"excerpt":107,"readTime":108,"views":15,"isPinned":16,"publishedAt":109,"category":110,"categories":111,"featuredImage":26,"bgImage":27,"posterImage":113,"relatedSolution":26},57,"hosting-mysql-on-a-vps",{"fr":104,"en":102,"ar":105},"heberger-mysql-vps","استضافة-mysql-على-خادم-vps","Hosting MySQL on a VPS","Host MySQL on your Cloud VPS: Docker deployment, hardening, InnoDB tuning, and automated backups, step by step.",3,"2026-04-24T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[112],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-mysql-vps-poster.svg",{"id":115,"slug":116,"slugs":117,"title":120,"excerpt":121,"readTime":92,"views":15,"isPinned":16,"publishedAt":122,"category":123,"categories":124,"featuredImage":26,"bgImage":27,"posterImage":126,"relatedSolution":127},58,"hosting-redis-on-a-vps",{"fr":118,"en":116,"ar":119},"heberger-redis-vps","استضافة-redis-على-خادم-vps","Hosting Redis on a VPS","Deploy Redis on your Cloud VPS: in-memory cache, sessions, and queues, with persistence, security, and tuning.","2026-04-23T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[125],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":30,"appSlug":128},"redis-stack",{"id":130,"slug":131,"slugs":132,"title":135,"excerpt":136,"readTime":14,"views":15,"isPinned":16,"publishedAt":137,"category":138,"categories":144,"featuredImage":26,"bgImage":27,"posterImage":146,"relatedSolution":147},168,"how-to-self-host-metabase-on-a-vps-open-source-bi-dashboards",{"fr":133,"en":131,"ar":134},"self-host-metabase-vps","استضافة-metabase-على-vps-لوحات-ذكاء-أعمال-مفتوحة-المصدر","How to Self-Host Metabase on a VPS: Open-Source BI Dashboards","Deploy Metabase on your VPS: connect any SQL database and build dashboards and charts in the browser, with a companion Postgres, on infrastructure you control.","2026-07-06T00:00:00+00:00",{"id":139,"name":140,"slug":141,"color":142,"icon":143},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[145],{"id":139,"name":140,"slug":141,"color":142,"icon":143},"\u002Fblog\u002Fcovers\u002Fself-host-metabase-vps-poster.svg",{"categorySlug":30,"appSlug":148},"metabase",1787581001098]