[{"data":1,"prerenderedAt":196},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-victorialogs-vps-log-database-ma-en":6,"promo-bar-likely":195},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-victorialogs-vps-log-database-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"keyPoints":37,"sections":38,"ctaTitle":127,"ctaBody":128,"ctaButton":129,"ctaUrl":130,"relatedPosts":131},599,"self-host-victorialogs-vps-log-database",{"fr":12,"en":10,"ar":13,"es":14},"self-host-victorialogs-vps","استضافة-victorialogs-على-vps-قاعدة-سجلات","autoalojar-victorialogs-vps-base-de-logs","Self-Host VictoriaLogs on a VPS: Centralise and Search Logs","Install VictoriaLogs on a VPS: a lightweight log database that receives logs from Vector, Fluent Bit or Alloy and finds them with LogsQL.",6,0,false,"2026-12-01T00:00:00+00:00","2026-12-03T00:37:53+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},"\u002Fblog\u002Fcovers\u002Fself-host-victorialogs-vps-cover.webp","\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-victorialogs-vps-poster.svg",{"categorySlug":34,"appSlug":35},"monitoring-observability","victorialogs","When an application runs on several servers, finding an error quickly turns into opening SSH sessions one by one and chaining `grep` commands. Classic centralisation stacks solve the problem, but Elasticsearch needs gigabytes of memory and Loki struggles as soon as you search the text. VictoriaLogs is an open-source log database (Apache-2.0 licensed) from the VictoriaMetrics team: one binary, a few megabytes of RAM at rest, fast full-text search. This guide installs it on a VPS with Docker Compose, publishes it over HTTPS behind nginx, and connects your first servers.",[],[39,43,53,89,92,108,112,115,118,121,124],{"type":40,"title":41,"body":42},"h2","Why centralise your logs","Every server writes its logs in its own corner: journald for the system, `\u002Fvar\u002Flog\u002Fnginx` for the web server, standard output for your containers. With a single machine, `journalctl` and `docker logs` are enough. With three, the question \"when did this customer's payment fail, and on which server?\" costs a quarter of an hour.\n\nCentralising means shipping every line to a single database as it is written, then querying it from one place. VictoriaLogs plays that database role: an agent on each server — Vector, Fluent Bit, Grafana Alloy or Promtail — sends it the lines, and you find them with a query, from its web interface or from Grafana.",{"type":44,"title":45,"items":46},"ul","What VictoriaLogs brings",[47,48,49,50,51,52],"**LogsQL** — full-text search, field and time filters, statistics and grouping in a single query.","**Works with your agents** — Elasticsearch and Loki ingestion APIs, OpenTelemetry and JSON lines.","**vmui interface** — log exploration, filters, hit histogram and result export.","**Lightweight** — one Go binary, a few megabytes of RAM at rest, strong compression on disk.","**Controlled retention** — adjustable retention period and disk usage cap.","**Grafana** — an official data source plugin for your dashboards and alerts.",{"type":54,"title":55,"headers":56,"rows":60},"comparison","VictoriaLogs compared with Loki and Elasticsearch",[5,57,58,59],"VictoriaLogs","Loki","Elasticsearch",[61,65,70,75,80,84],[62,63,64,63],"Text search","Fast, full-text","Slow without a targeted label",[66,67,68,69],"Memory at rest","A few megabytes","A few hundred megabytes","Several gigabytes",[71,72,73,74],"Components to deploy","One binary","One binary or several services","A JVM cluster",[76,77,78,79],"Query language","LogsQL","LogQL","Query DSL, KQL",[81,82,83,59],"Compatible agents","Elasticsearch, Loki, OpenTelemetry","Loki, OpenTelemetry",[85,86,87,88],"Built-in interface","vmui","No, goes through Grafana","No, goes through Kibana",{"type":40,"title":90,"body":91},"Prerequisites","An Ubuntu 24.04 VPS with **1 GB of RAM** is enough to start; it is the **disk** you need to size, according to your log volume and the retention you want. You need Docker with the Compose plugin, nginx with an HTTPS certificate, and a stable name — for example `logs.example.com` — since your servers and Grafana will connect to it.",{"type":93,"title":94,"steps":95},"steps","Install VictoriaLogs with Docker Compose",[96,99,102,105],{"title":97,"body":98},"Prepare the folder and the password","Create the application folder and a `.env` file holding the password of the `admin` user.\n```bash\nmkdir -p \u002Fopt\u002Fvictorialogs && cd \u002Fopt\u002Fvictorialogs\necho \"ADMIN_PASSWORD=$(openssl rand -hex 16)\" > .env\nchmod 600 .env\n```",{"title":100,"body":101},"Write the docker-compose.yml file","The port is only published on the loopback interface: only nginx reaches it. The two `-httpAuth` options protect **every** endpoint — interface, queries and ingestion. `-retentionPeriod=30d` keeps thirty days, and `-retention.maxDiskUsagePercent=80` drops the oldest logs before the disk is full.\n```yaml\nservices:\n  victorialogs:\n    image: victoriametrics\u002Fvictoria-logs:v1.55.0\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:9428:9428\"\n    command:\n      - -storageDataPath=\u002Fvlogs\n      - -retentionPeriod=30d\n      - -retention.maxDiskUsagePercent=80\n      - -httpAuth.username=admin\n      - -httpAuth.password=${ADMIN_PASSWORD}\n    volumes:\n      - victorialogs-data:\u002Fvlogs\n\nvolumes:\n  victorialogs-data: {}\n```",{"title":103,"body":104},"Start the container","Startup takes less than a second. The log should show \"started VictoriaLogs\".\n```bash\ndocker compose up -d\ndocker compose logs --tail 20\n```",{"title":106,"body":107},"Publish over HTTPS with nginx","In your domain's vhost (certificate obtained with certbot), proxy to the local port. Raise `client_max_body_size`: batches sent by agents quickly exceed the default limit.\n```nginx\nlocation \u002F {\n    proxy_pass http:\u002F\u002F127.0.0.1:9428;\n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    client_max_body_size 64m;\n}\n```",{"type":109,"title":110,"body":111},"tip","Without a password, your logs are public","Without the `-httpAuth` options, anyone who knows the address can read all your logs — e-mail addresses, IP addresses, sometimes tokens slipped into a message by mistake — **and** inject fake ones. Keep authentication enabled, and never publish port 9428 directly on the public IP: always go through the HTTPS reverse proxy.",{"type":40,"title":113,"body":114},"Ship your servers' logs with Vector","On each server, Vector reads journald and nginx's files, then sends them through VictoriaLogs' Elasticsearch API. The `query` parameters tell VictoriaLogs which field carries the message, which one carries the timestamp, and which fields identify a stream.\n```yaml\nsources:\n  journald:\n    type: journald\n  nginx:\n    type: file\n    include: [\"\u002Fvar\u002Flog\u002Fnginx\u002F*.log\"]\n\nsinks:\n  victorialogs:\n    type: elasticsearch\n    inputs: [journald, nginx]\n    endpoints: [\"https:\u002F\u002Flogs.example.com\u002Finsert\u002Felasticsearch\u002F\"]\n    mode: bulk\n    api_version: v8\n    healthcheck:\n      enabled: false\n    auth:\n      strategy: basic\n      user: admin\n      password: \"\u003CADMIN_PASSWORD>\"\n    query:\n      _msg_field: message\n      _time_field: timestamp\n      _stream_fields: host,file\n```\n\nRestart Vector, then open `https:\u002F\u002Flogs.example.com\u002Fselect\u002Fvmui\u002F`: the first lines appear within seconds. Fluent Bit, Filebeat and Logstash connect the same way, through their Elasticsearch output to `\u002Finsert\u002Felasticsearch\u002F`.",{"type":40,"title":116,"body":117},"Collect Docker logs with Grafana Alloy or Promtail","If your servers already send their logs to Loki, you only need to change the address: VictoriaLogs accepts Loki's push API. With Grafana Alloy, the `loki.write` component becomes:\n```hcl\nloki.write \"victorialogs\" {\n  endpoint {\n    url = \"https:\u002F\u002Flogs.example.com\u002Finsert\u002Floki\u002Fapi\u002Fv1\u002Fpush\"\n    basic_auth {\n      username = \"admin\"\n      password = \"\u003CADMIN_PASSWORD>\"\n    }\n  }\n}\n```\n\nWith Promtail, the same address goes into `clients[].url`, with a `basic_auth` block. Labels — container name, service, host — arrive as fields, and can then be filtered in LogsQL.",{"type":40,"title":119,"body":120},"Search with LogsQL","LogsQL reads from left to right: filter first, compute next. A single word searches the message, `field:value` filters a field, `_time:` bounds the period, and a pipe chains a computation.\n```text\n_time:1h error\n_time:1h level:error\n_time:24h \"commande-42\"\n_time:1h error | stats by (host) count() errors\n```\n\nThe last query counts the last hour's errors per server. The same queries can be sent from the command line, handy in a script or a scheduled task:\n```bash\ncurl -u admin:\u003CADMIN_PASSWORD> \\\n  https:\u002F\u002Flogs.example.com\u002Fselect\u002Flogsql\u002Fquery \\\n  -d 'query=_time:5m error'\n```",{"type":40,"title":122,"body":123},"Retention, disk and backup","VictoriaLogs stores logs per day, and drops a whole day once it falls outside the retention period. `-retentionPeriod` accepts days (`30d`), weeks or years; `-retention.maxDiskUsagePercent` adds a disk safeguard, dropping the oldest days first. Measure the space actually used after a week (`du -sh` on the volume) rather than estimating it.\n\nTo back up, stop the container while you copy the volume, or copy the folders of past days with `rsync`, since they no longer change. To upgrade, change the image tag in `docker-compose.yml`, then `docker compose pull && docker compose up -d`: the data in the volume is kept.",{"type":40,"title":125,"body":126},"VictoriaLogs in one click on ServOrbit","On a ServOrbit VPS, the Marketplace does all of the above for you: official container, port on the loopback interface, `admin` user password generated and shown in your client area, authentication enabled on every endpoint, nginx reverse proxy over HTTPS. You choose the address — a subdomain of one of your domains, or the VPS's free subdomain — and all that is left is configuring your agents. For metrics, pair it with VictoriaMetrics, and with Grafana for dashboards.","All your logs in one place, on your VPS","A ServOrbit Ubuntu 24.04 VPS with 1 GB of RAM is enough to start VictoriaLogs. One-click install from the Marketplace, HTTPS on your domain or on the VPS's free subdomain, generated password and authentication enabled on every endpoint.","Install VictoriaLogs","\u002Fapplications\u002Fmonitoring-observability\u002Fvictorialogs",[132,157,175],{"id":133,"slug":134,"slugs":135,"title":139,"excerpt":140,"readTime":141,"views":142,"isPinned":19,"noindex":19,"publishedAt":143,"updatedAt":144,"category":145,"categories":151,"featuredImage":153,"bgImage":31,"posterImage":154,"relatedSolution":155},243,"centralize-docker-logs-on-your-vps-with-loki-and-grafana",{"fr":136,"en":134,"ar":137,"es":138},"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-11-10T14:39:01+00:00",{"id":146,"name":147,"slug":148,"color":149,"icon":150},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[152],{"id":146,"name":147,"slug":148,"color":149,"icon":150},"\u002Fblog\u002Fcovers\u002Floki-grafana-logs-centralises-vps-cover.webp","\u002Fblog\u002Fcovers\u002Floki-grafana-logs-centralises-vps-poster.svg",{"categorySlug":34,"appSlug":156},"grafana",{"id":158,"slug":159,"slugs":160,"title":164,"excerpt":165,"readTime":23,"views":18,"isPinned":19,"noindex":19,"publishedAt":166,"updatedAt":167,"category":168,"categories":169,"featuredImage":171,"bgImage":31,"posterImage":172,"relatedSolution":173},533,"self-host-victoriametrics-vps-prometheus-storage",{"fr":161,"en":159,"ar":162,"es":163},"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},[170],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fself-host-victoriametrics-vps-cover.webp","\u002Fblog\u002Fcovers\u002Fself-host-victoriametrics-vps-poster.svg",{"categorySlug":34,"appSlug":174},"victoriametrics",{"id":176,"slug":177,"slugs":178,"title":182,"excerpt":183,"readTime":184,"views":185,"isPinned":19,"noindex":19,"publishedAt":186,"updatedAt":187,"category":188,"categories":189,"featuredImage":191,"bgImage":31,"posterImage":192,"relatedSolution":193},167,"how-to-self-host-dozzle-on-a-vps-real-time-docker-log-viewer",{"fr":179,"en":177,"ar":180,"es":181},"self-host-dozzle-vps","استضافة-dozzle-على-vps-عارض-سجلات-docker-لحظيا","alojar-dozzle-en-un-vps","How to Self-Host Dozzle on a VPS: Real-Time Docker Log Viewer","Deploy Dozzle on your VPS — a stateless, open-source Docker log viewer. Stream, search and tail logs from all your containers in the browser, without SSH or log storage.",4,2,"2026-07-06T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[190],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fself-host-dozzle-vps-cover.webp","\u002Fblog\u002Fcovers\u002Fself-host-dozzle-vps-poster.svg",{"categorySlug":34,"appSlug":194},"dozzle",true,1796258729679]