[{"data":1,"prerenderedAt":189},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-greptimedb-vps-observability-sql-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-greptimedb-vps-observability-sql-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"sections":37,"ctaTitle":124,"ctaBody":125,"ctaButton":126,"ctaUrl":127,"relatedPosts":128},565,"self-host-greptimedb-vps-observability-sql",{"fr":12,"en":10,"ar":13,"es":14},"self-host-greptimedb-vps","استضافة-greptimedb-على-vps-قاعدة-بيانات-المراقبة","autoalojar-greptimedb-vps-observabilidad-sql","GreptimeDB on a VPS: Metrics, Logs and Traces in SQL","Install GreptimeDB on a VPS: an observability database that brings metrics, logs and traces together, queryable with SQL, PromQL and from Grafana.",6,0,false,"2026-11-04T00:00:00+00:00","2026-11-04T16:30:20+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-greptimedb-vps-poster.svg",{"categorySlug":34,"appSlug":35},"databases","greptimedb","Monitoring an application often means running three stores: Prometheus for metrics, Loki or Elasticsearch for logs, Tempo or Jaeger for traces. Three services to update, three query languages, and no simple way to cross an error with its latency. GreptimeDB is an open-source observability database (Apache-2.0 licensed) that keeps the three signals in one engine and makes them queryable with SQL as well as PromQL. This guide installs it on a VPS with Docker Compose, protects it with a password, connects Prometheus, OpenTelemetry and Grafana, then sets up retention and backups.",[38,42,52,83,86,102,106,109,112,115,118,121],{"type":39,"title":40,"body":41},"h2","Why a single database for observability","Metrics, logs and traces describe the same incident from three angles. When they live in three tools, you jump between tabs copying timestamps, and the question \"which slow requests came before these errors?\" takes three queries in three languages.\n\nGreptimeDB stores them all in tables, in a columnar engine designed for time series. Metrics received from Prometheus stay queryable in PromQL, and everything — metrics, logs and traces — can also be queried in SQL, with joins and aggregates. Grafana sees it as an ordinary Prometheus data source.",{"type":43,"title":44,"items":45},"ul","What GreptimeDB brings",[46,47,48,49,50,51],"**Three signals, one engine** — metrics, logs and traces in tables of the same columnar store.","**SQL and PromQL** — joins, windows and aggregates in SQL; your PromQL queries work as they are.","**Prometheus-compatible** — `remote_write` target, Prometheus query API, Grafana data source with no plugin.","**Native OpenTelemetry** — OTLP\u002FHTTP ingestion of metrics, logs and traces.","**Other protocols** — Loki push API, InfluxDB line protocol, SQL API over HTTP.","**Built-in dashboard** — SQL and PromQL editor, table exploration, charts of the results.",{"type":53,"title":54,"headers":55,"rows":58},"comparison","GreptimeDB versus a Prometheus, Loki and Tempo stack",[5,56,57],"GreptimeDB","Prometheus + Loki + Tempo",[59,63,67,71,75,79],[60,61,62],"Services to run","A single container","Three services, three configurations",[64,65,66],"Query languages","SQL and PromQL","PromQL, LogQL and TraceQL",[68,69,70],"Cross logs and metrics","One SQL query","Several queries, by hand",[72,73,74],"Ingestion","remote_write, OTLP, Loki, InfluxDB, SQL","One protocol per service",[76,77,78],"Grafana","Prometheus data source","One data source per service",[80,81,82],"Retention","Per database or per table, in SQL","One setting per service",{"type":39,"title":84,"body":85},"Prerequisites","An Ubuntu 24.04 VPS with **2 GB of RAM** is enough to start; plan 4 GB and more disk if you centralise many services, since logs and traces take far more space than metrics. You need Docker with the Compose plugin, and a **domain name** pointing to the VPS, with nginx and an HTTPS certificate: your servers will send their data to it and Grafana will query it.",{"type":87,"title":88,"steps":89},"steps","Install GreptimeDB with Docker Compose",[90,93,96,99],{"title":91,"body":92},"Prepare the directory and the password","Create the application directory and a `.env` file holding the `admin` user's password.\n```bash\nmkdir -p \u002Fopt\u002Fgreptimedb && cd \u002Fopt\u002Fgreptimedb\necho \"ADMIN_PASSWORD=$(openssl rand -hex 16)\" > .env\nchmod 600 .env\n```",{"title":94,"body":95},"Write the docker-compose.yml","The port is only published on the loopback interface: only nginx reaches it. The `--user-provider` option declares the `admin` user and protects the **whole** HTTP API. The `GREPTIMEDB_STANDALONE__ENABLE_TELEMETRY` variable turns off the anonymous usage report sent to the vendor.\n```yaml\nservices:\n  greptimedb:\n    image: greptime\u002Fgreptimedb:v1.3.0\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:4000:4000\"\n    environment:\n      GREPTIMEDB_STANDALONE__ENABLE_TELEMETRY: \"false\"\n    command:\n      - standalone\n      - start\n      - --http-addr=0.0.0.0:4000\n      - --data-home=\u002Fgreptimedb_data\n      - --user-provider=static_user_provider:cmd:admin=${ADMIN_PASSWORD}\n    volumes:\n      - greptimedb-data:\u002Fgreptimedb_data\n\nvolumes:\n  greptimedb-data: {}\n```",{"title":97,"body":98},"Start and check","Startup takes a few seconds. `\u002Fhealth` answers without authentication; the SQL API returns 401 without credentials.\n```bash\ndocker compose up -d\ncurl -fsS http:\u002F\u002F127.0.0.1:4000\u002Fhealth\ncurl -u admin:YOUR_PASSWORD http:\u002F\u002F127.0.0.1:4000\u002Fv1\u002Fsql -d 'sql=SHOW TABLES'\n```",{"title":100,"body":101},"Publish over HTTPS with nginx","In your domain's vhost (certificate obtained with certbot), proxy to the local port. Raise `client_max_body_size`: `remote_write` and OTLP batches quickly exceed the default limit.\n```nginx\nlocation \u002F {\n    proxy_pass http:\u002F\u002F127.0.0.1:4000;\n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    client_max_body_size 32m;\n}\n```",{"type":103,"title":104,"body":105},"tip","Without --user-provider, the database is open to all","Without a user provider, GreptimeDB accepts any request: anyone who knows the address can read your logs **and** write, alter or drop tables in SQL. Keep authentication on, and never publish port 4000 directly on the public IP: always go through the HTTPS reverse proxy. GreptimeDB's gRPC, MySQL and PostgreSQL ports do not need to be published either.",{"type":39,"title":107,"body":108},"Send Prometheus metrics","In each server's `prometheus.yml`, add a `remote_write` block pointing to GreptimeDB. The `db` parameter names the destination database; `public` exists from the first start.\n```yaml\nremote_write:\n  - url: https:\u002F\u002Fgreptime.example.ma\u002Fv1\u002Fprometheus\u002Fwrite?db=public\n    basic_auth:\n      username: admin\n      password: YOUR_PASSWORD\n```\nReload Prometheus: each metric becomes a table, visible with `SHOW TABLES;` in the dashboard.",{"type":39,"title":110,"body":111},"Send logs and traces over OpenTelemetry","In the OpenTelemetry Collector (or directly in your application's SDK), declare an OTLP\u002FHTTP exporter pointing to GreptimeDB. The `Authorization` header carries `admin:password` Base64-encoded, and traces also require the `X-Greptime-Pipeline-Name: greptime_trace_v1` header. Declare **two** exporters, then: set on logs, that header gets them rejected.\n```yaml\nexporters:\n  otlphttp\u002Fgreptime:\n    endpoint: https:\u002F\u002Fgreptime.example.ma\u002Fv1\u002Fotlp\n    headers:\n      Authorization: \"Basic BASE64_ADMIN_PASSWORD\"\n  otlphttp\u002Fgreptime-traces:\n    endpoint: https:\u002F\u002Fgreptime.example.ma\u002Fv1\u002Fotlp\n    headers:\n      Authorization: \"Basic BASE64_ADMIN_PASSWORD\"\n      X-Greptime-Pipeline-Name: greptime_trace_v1\nservice:\n  pipelines:\n    logs:\n      exporters: [otlphttp\u002Fgreptime]\n    metrics:\n      exporters: [otlphttp\u002Fgreptime]\n    traces:\n      exporters: [otlphttp\u002Fgreptime-traces]\n```\nMetrics arrive on `\u002Fv1\u002Fotlp\u002Fv1\u002Fmetrics`, logs on `\u002Fv1\u002Fotlp\u002Fv1\u002Flogs` and traces on `\u002Fv1\u002Fotlp\u002Fv1\u002Ftraces`: the collector adds these suffixes itself. If you already ship logs to Loki, Promtail and Grafana Alloy can target `\u002Fv1\u002Floki\u002Fapi\u002Fv1\u002Fpush`.",{"type":39,"title":113,"body":114},"Query GreptimeDB from Grafana","In Grafana, add a **Prometheus**-type data source with the URL `https:\u002F\u002Fyour-domain\u002Fv1\u002Fprometheus`, enable basic authentication and enter the `admin` user and its password. Your PromQL dashboards work unchanged.\n\nFor logs and traces, write your queries in SQL in the built-in dashboard (`https:\u002F\u002Fyour-domain\u002Fdashboard\u002F`), where credentials go in the connection settings. A query such as `SELECT * FROM opentelemetry_logs ORDER BY timestamp DESC LIMIT 50;` shows the latest logs received.",{"type":39,"title":116,"body":117},"Retention, disk and backups","Out of the box, GreptimeDB deletes nothing. Retention is set in SQL, for a whole database or per table (`ttl` option at creation). The `COPY DATABASE` command exports a database in Parquet format into the data volume, under `\u002Fgreptimedb_data\u002Fcopy\u002F`:\n```sql\nALTER DATABASE public SET 'ttl'='90d';\nCOPY DATABASE public TO 'backup\u002F' WITH (FORMAT='parquet');\n```\nThen copy that folder off the VPS, or back up the whole `greptimedb-data` Docker volume with the container stopped. Watch disk space: it is almost always the size of the logs that decides.",{"type":39,"title":119,"body":120},"Update GreptimeDB","Read the release notes first: a major upgrade may require a migration step. Change the image tag in `docker-compose.yml`, then:\n```bash\ncd \u002Fopt\u002Fgreptimedb\ndocker compose pull && docker compose up -d\ndocker compose logs --tail 20\n```\nThe volume's data is kept. Run a `COPY DATABASE` just before a major upgrade: it is your way back.",{"type":39,"title":122,"body":123},"One-click install from the ServOrbit Marketplace","The ServOrbit Marketplace installs GreptimeDB on your VPS without a command line: it deploys the official container, generates the `admin` user's password, enables authentication on the whole HTTP API, turns off the anonymous usage report and publishes the dashboard over HTTPS on a subdomain of your domain or on the VPS's free subdomain (greptimedb.{dns_slug}.servorbit-dns.com). The password appears in your client area; all that is left is to connect Prometheus, OpenTelemetry and Grafana.","Your observability in a single database","A ServOrbit Ubuntu 24.04 VPS with 2 GB of RAM is enough to start GreptimeDB. One-click install from the Marketplace, HTTPS on your domain or on the VPS's free subdomain, password generated for you.","Install GreptimeDB","\u002Fapplications\u002Fdatabases\u002Fgreptimedb",[129,154,172],{"id":130,"slug":131,"slugs":132,"title":136,"excerpt":137,"readTime":138,"views":139,"isPinned":19,"publishedAt":140,"updatedAt":141,"category":142,"categories":148,"featuredImage":30,"bgImage":31,"posterImage":150,"relatedSolution":151},220,"grafana-tempo-and-opentelemetry-distributed-tracing-on-vps",{"fr":133,"en":131,"ar":134,"es":135},"opentelemetry-grafana-tempo-vps","grafana-tempo-وopentelemetry-التتبع-الموزع-على-خادم-vps","grafana-tempo-opentelemetry-trazado-distribuido-vps","Grafana Tempo and OpenTelemetry: distributed tracing on VPS","Deploy OpenTelemetry + Grafana Tempo on your VPS: complete architecture, step-by-step setup, Node.js\u002FPython instrumentation, S3 retention, and TraceQL queries.",12,2,"2026-08-04T00:00:00+00:00","2026-11-04T16:30:26+00:00",{"id":143,"name":144,"slug":145,"color":146,"icon":147},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[149],{"id":143,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Fopentelemetry-grafana-tempo-vps-poster.svg",{"categorySlug":152,"appSlug":153},"monitoring-observability","grafana",{"id":155,"slug":156,"slugs":157,"title":161,"excerpt":162,"readTime":163,"views":164,"isPinned":19,"publishedAt":165,"updatedAt":166,"category":167,"categories":168,"featuredImage":30,"bgImage":31,"posterImage":170,"relatedSolution":171},243,"centralize-docker-logs-on-your-vps-with-loki-and-grafana",{"fr":158,"en":156,"ar":159,"es":160},"loki-grafana-logs-centralises-vps","مركزة-سجلات-docker-على-vps-باستخدام-loki-وgrafana","centralizar-logs-docker-en-vps-con-loki-y-grafana","Centralize Docker logs on your VPS with Loki and Grafana","Aggregate logs from all your Docker containers into a single Grafana dashboard using Loki and Promtail on your VPS. No Datadog, no quota.",11,1,"2026-08-10T00:00:00+00:00","2026-09-08T22:00:02+00:00",{"id":143,"name":144,"slug":145,"color":146,"icon":147},[169],{"id":143,"name":144,"slug":145,"color":146,"icon":147},"\u002Fblog\u002Fcovers\u002Floki-grafana-logs-centralises-vps-poster.svg",{"categorySlug":152,"appSlug":153},{"id":173,"slug":174,"slugs":175,"title":179,"excerpt":180,"readTime":23,"views":18,"isPinned":19,"publishedAt":181,"updatedAt":182,"category":183,"categories":184,"featuredImage":30,"bgImage":31,"posterImage":186,"relatedSolution":187},533,"self-host-victoriametrics-vps-prometheus-storage",{"fr":176,"en":174,"ar":177,"es":178},"self-host-victoriametrics-vps","استضافة-victoriametrics-على-vps-تخزين-مقاييس-prometheus","autoalojar-victoriametrics-vps-metricas-prometheus","Self-Host VictoriaMetrics on a VPS: Long-Term Prometheus Storage","Install VictoriaMetrics on a VPS: a Prometheus-compatible time series database that keeps months of metrics, queryable from Grafana.","2026-10-30T00:00:00+00:00","2026-11-04T16:30:29+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[185],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fself-host-victoriametrics-vps-poster.svg",{"categorySlug":152,"appSlug":188},"victoriametrics",1793820080855]