{
  "manifest_version": "1",
  "slug": "clickhouse",
  "title": "ClickHouse",
  "headline": "Self-host ClickHouse",
  "description": "Run ClickHouse 26.8 LTS on an exe.dev VM: the HTTP API and Play UI behind exe.dev login, VM tokens for clients, a 20M-row demo, and tested backups.",
  "category": "databases",
  "tags": [
    "clickhouse",
    "clickhouse self-host",
    "olap",
    "analytics database",
    "event analytics",
    "log analytics",
    "clickhouse backup",
    "clickhouse docker"
  ],
  "url": "https://exe.dev/deploy/clickhouse",
  "markdown_url": "https://exe.dev/deploy/clickhouse.md",
  "upstream": {
    "website": "https://clickhouse.com",
    "source": "https://github.com/ClickHouse/ClickHouse",
    "docs": "https://clickhouse.com/docs",
    "license": "Apache-2.0"
  },
  "example_vm_name": "my-clickhouse",
  "time": "10 minutes",
  "stack": [
    {
      "name": "ClickHouse 26.8 LTS",
      "detail": "From ClickHouse's apt repository, held at 26.8, on localhost only",
      "port": 8123,
      "data": "/var/lib/clickhouse"
    },
    {
      "name": "Play UI and HTTP API",
      "detail": "ClickHouse's own SQL console and API, through the exe.dev proxy",
      "port": 8123
    },
    {
      "name": "Native protocol",
      "detail": "For clickhouse-client and drivers, on the VM, over SSH or Tailscale",
      "port": 9000
    },
    {
      "name": "Nightly backups",
      "detail": "ClickHouse's BACKUP of every database and user, 14 nights kept",
      "data": "/var/lib/clickhouse-backups"
    }
  ],
  "access": [
    {
      "url": "https://my-clickhouse.exe.xyz:8123/play",
      "who": "private",
      "what": "The Play UI, behind exe.dev login and a ClickHouse password"
    },
    {
      "url": "https://my-clickhouse.exe.xyz:8123/",
      "who": "private",
      "what": "The HTTP API, for programs that send an exe.dev VM token"
    },
    {
      "url": "http://localhost:8123/",
      "who": "private",
      "what": "The HTTP API for apps on the VM"
    }
  ],
  "delivers": [
    "ClickHouse 26.8 LTS from ClickHouse's apt repository, held at 26.8, started at boot, listening on localhost only.",
    "A password on the `default` user, and an `app` database and user whose settings are in `~/clickhouse/app.env`.",
    "Memory limits and system log retention sized for a small VM.",
    "An `app.events` table ready for events and logs.",
    "The Play UI at `https://\u003cvm\u003e.exe.xyz:8123/play`, private behind exe.dev login.",
    "Nightly backups with ClickHouse's BACKUP, one restored and checked."
  ],
  "owner_runs_after": [
    "ssh my-clickhouse.exe.xyz cat clickhouse/admin.env",
    "ssh exe.dev ssh-key generate-api-key --vm=my-clickhouse --label=clickhouse"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=Set%20up%20ClickHouse%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Fclickhouse.md%3Fvia%3Ddeploy%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-clickhouse.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-clickhouse.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20ClickHouse%2026.8%20LTS%20from%20ClickHouse%27s%20apt%20repository%2C%20held%20at%2026.8%2C%20started%20at%20boot%2C%20listening%20on%20localhost%20only.%0A-%20A%20password%20on%20the%20%60default%60%20user%2C%20and%20an%20%60app%60%20database%20and%20user%20whose%20settings%20are%20in%20%60~%2Fclickhouse%2Fapp.env%60.%0A-%20Memory%20limits%20and%20system%20log%20retention%20sized%20for%20a%20small%20VM.%0A-%20An%20%60app.events%60%20table%20ready%20for%20events%20and%20logs.%0A-%20The%20Play%20UI%20at%20%60https%3A%2F%2F%3Cvm%3E.exe.xyz%3A8123%2Fplay%60%2C%20private%20behind%20exe.dev%20login.%0A-%20Nightly%20backups%20with%20ClickHouse%27s%20BACKUP%2C%20one%20restored%20and%20checked.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20For%20initial%20setup%2C%0Afollow%20%22Install%20by%20hand%22%20from%20top%20to%20bottom%2C%20skipping%20VM%20creation%3A%20the%0Arepository%20and%20packages%2C%20passwords%2C%20the%20config%20files%2C%20starting%0AClickHouse%2C%20the%20app%20user%20and%20events%20table%2C%20the%20backup%20timer%2C%20and%20the%0Arestore%20test.%20The%20walkthrough%20sections%20are%20for%20the%20owner%20afterwards%3A%0Adon%27t%20load%20the%20taxi%20demo%2C%20set%20up%20Tailscale%2C%20S3%2C%20Grafana%20or%20Docker%0Aaccess%2C%20or%20run%20the%20Restore%20or%20Update%20instructions%20during%20initial%20setup.%0ANever%20overwrite%20an%20existing%20~%2Fclickhouse%2F%2A.env%20file.%20Drop%20only%20the%0Aapp_restored%20database%20the%20restore%20test%20creates.%0ALeave%20the%20VM%20private%20and%20do%20not%20reboot.%20Don%27t%20paste%20passwords%20into%20the%0Achat%3B%20say%20they%20are%20in%20~%2Fclickhouse%2Fadmin.env%20and%20~%2Fclickhouse%2Fapp.env.%0AFinish%20with%20https%3A%2F%2F%3Cvm%3E.exe.xyz%3A8123%2Fplay%20and%20the%20steps%20in%20%22Open%20the%0APlay%20UI%22.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open%20and%20these%20commands%2C%20which%20only%20I%20can%20run%2C%20from%20my%20own%20computer%20%28with%20this%20VM%27s%20name%20in%20them%29%3A%0A%20%20ssh%20my-clickhouse.exe.xyz%20cat%20clickhouse%2Fadmin.env%0A%20%20ssh%20exe.dev%20ssh-key%20generate-api-key%20--vm%3Dmy-clickhouse%20--label%3Dclickhouse%0A",
    "terminal": "curl -fsSL https://exe.dev/deploy/clickhouse/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "Set up ClickHouse on this VM by following the exe.dev recipe at https://exe.dev/deploy/clickhouse.md?via=deploy from top to bottom.\n\nThe recipe's example VM name is my-clickhouse. This VM's name is the output of `hostname`: use it wherever the recipe writes my-clickhouse. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- ClickHouse 26.8 LTS from ClickHouse's apt repository, held at 26.8, started at boot, listening on localhost only.\n- A password on the `default` user, and an `app` database and user whose settings are in `~/clickhouse/app.env`.\n- Memory limits and system log retention sized for a small VM.\n- An `app.events` table ready for events and logs.\n- The Play UI at `https://\u003cvm\u003e.exe.xyz:8123/play`, private behind exe.dev login.\n- Nightly backups with ClickHouse's BACKUP, one restored and checked.\n\nRead the whole recipe, including the closed details. For initial setup,\nfollow \"Install by hand\" from top to bottom, skipping VM creation: the\nrepository and packages, passwords, the config files, starting\nClickHouse, the app user and events table, the backup timer, and the\nrestore test. The walkthrough sections are for the owner afterwards:\ndon't load the taxi demo, set up Tailscale, S3, Grafana or Docker\naccess, or run the Restore or Update instructions during initial setup.\nNever overwrite an existing ~/clickhouse/*.env file. Drop only the\napp_restored database the restore test creates.\nLeave the VM private and do not reboot. Don't paste passwords into the\nchat; say they are in ~/clickhouse/admin.env and ~/clickhouse/app.env.\nFinish with https://\u003cvm\u003e.exe.xyz:8123/play and the steps in \"Open the\nPlay UI\".\n\nFinish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):\n  ssh my-clickhouse.exe.xyz cat clickhouse/admin.env\n  ssh exe.dev ssh-key generate-api-key --vm=my-clickhouse --label=clickhouse\n",
    "prompt_url": "https://exe.dev/deploy/clickhouse/prompt.txt"
  },
  "published": "2026-11-21",
  "updated": "2026-11-21",
  "verified": "2026-11-21",
  "related": [
    "postgres",
    "grafana",
    "s3-storage",
    "redis",
    "mysql",
    "docker-compose"
  ],
  "alternatives": [
    "ClickHouse Cloud",
    "BigQuery",
    "Snowflake",
    "Tinybird"
  ]
}
