{"id":19492081,"url":"https://github.com/kylemclaren/qdrant-on-fly","last_synced_at":"2026-04-02T02:53:48.428Z","repository":{"id":170670024,"uuid":"645711309","full_name":"kylemclaren/qdrant-on-fly","owner":"kylemclaren","description":"Bootstrap a Qdrant vector database cluster on Fly.io","archived":false,"fork":false,"pushed_at":"2024-06-10T14:07:21.000Z","size":50,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T02:41:32.057Z","etag":null,"topics":["dockerfile","flyio","qdrant","qdrant-vector-database","vector-database"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylemclaren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-26T09:07:19.000Z","updated_at":"2025-03-29T16:40:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"380c676e-cee7-441d-8d3e-dddb7296e41b","html_url":"https://github.com/kylemclaren/qdrant-on-fly","commit_stats":null,"previous_names":["kylemclaren/qdrant-on-fly"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fqdrant-on-fly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fqdrant-on-fly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fqdrant-on-fly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fqdrant-on-fly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylemclaren","download_url":"https://codeload.github.com/kylemclaren/qdrant-on-fly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250882637,"owners_count":21502341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerfile","flyio","qdrant","qdrant-vector-database","vector-database"],"created_at":"2024-11-10T21:19:16.822Z","updated_at":"2026-04-02T02:53:48.414Z","avatar_url":"https://github.com/kylemclaren.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highly Available Qdrant Cluster on Fly.io\n\n[![Lint](https://github.com/kylemclaren/qdrant-on-fly/actions/workflows/lint.yml/badge.svg?branch=master)](https://github.com/kylemclaren/qdrant-on-fly/actions/workflows/lint.yml)\n\n[Qdrant](https://qdrant.tech/) is a search engine and database that specializes in finding similarities between vectors. It has an API that allows you to store, search, and manage vectors along with additional information. Qdrant is designed to support advanced filtering capabilities, making it useful for tasks like neural network matching, faceted search, and other applications.\n\nQdrant is built using the Rust programming language, which ensures [fast](https://qdrant.tech/benchmarks/) and reliable performance even when dealing with a large amount of data. You can use Qdrant to transform embeddings or neural network encoders into powerful applications for tasks such as matching, searching, recommending, and more. Notably, vector databases (Qdrant in particular) have seen a surge in popularity for their use as a vector store in combination with modern LLMs. See the [ChatGPT Retrieval Plugin](https://github.com/openai/chatgpt-retrieval-plugin/) for a good example of this.\n\nThis repository contains all the files and configuration necessary to run a Highly Available (HA) Qdrant cluster on a [Fly.io](https://fly.io/) organization's private network with peer-to-peer (P2P) communication and discovery.\n\n___\n\n## Prepare a New Fly.io Application and Deploy the First Peer\n\nBegin by creating a new Fly application in your preferred region. Execute the following commands within your fork or clone of this repository. But first, be sure to set your primary region (and app name) in the `fly.toml` file.\n\nUsing the [Fly CLI](https://fly.io/docs/flyctl/) run the following:\n\n```\nfly launch --no-public-ips --from https://github.com/kylemclaren/qdrant-on-fly\n````\n\nThis command creates a new Fly application with one runnning machine and an attached volume. When prompted, select `yes` to copy the existing configuration to the newly generated app. Do not create a PostgreSQL database or Upstash Redis instance.\n\n## Add a New Peer\n\nExpand the cluster by cloning the first machine. Currently, `fly scale count` does not support scaling Machines with persistent storage volumes. We'll use 'fly machine clone' to scale our cluster.\n\n1. `fly machine clone --region ord --select`\n2. `fly status`\n\n## Add a Peer in Another Region\n\nScale the setup to another region by cloning a machine there. Now you should have two peers in `ord` and another in `jnb`.\n\n1. `fly machine clone --region jnb --select`\n2. `fly status`\n\n## Connecting\n\n### Connecting from a Client Application\n\nFly applications within the same organization can connect to your Qdrant database using the following URI:\n\n```sh\nhttp://\u003cfly-app-name\u003e.flycast:6333\n```\n\nFirst, you'll need to allocate a private [Flycast](https://fly.io/docs/networking/private-networking/#flycast-private-fly-proxy-services) IP address to your app. You can do this by running the following command:\n\n```sh\nfly ips allocate-v6 --private\n```\n\n### Public IP\n\nIf you need your app to be publicly accessible outside of the Fly Private network, you can simply [allocate a public IP](https://fly.io/docs/reference/services/#shared-ipv4) to the Fly app and start using the Fly Proxy to connect as normal (ie. `https://\u003cfly-app-name\u003e.fly.dev`)\n\n\u003e **Warning**\n\u003e If you do this, be sure to set the `QDRANT__SERVICE__API_KEY` secret.\n\n### Connecting to Qdrant from Your Local Machine\n\n1. Forward the server port to your local system with [`fly proxy`](https://fly.io/docs/flyctl/proxy/):\n\n```sh\nfly proxy 6333:6333 -a \u003cfly-app-name\u003e\n```\n\n2. Use your favorite API testing tool (like Postman or `curl`) to connect to your Qdrant instance on the forwarded port. Refer to the [Fly documentation](https://fly.io/docs/reference/volumes/) on volumes for more details on how to safely handle the volumes that store your vector data.\n\n```sh\ncurl -H \"Content-Type: application/json\" http://localhost:6333/cluster | jq\n```\n\u003cdetails\u003e\n\u003csummary\u003eResult\u003c/summary\u003e\n\u003cbr\u003e\n\n```json\n{\n  \"result\": {\n    \"status\": \"enabled\",\n    \"peer_id\": 8961156852769025,\n    \"peers\": {\n      \"8961156852769025\": {\n        \"uri\": \"http://e286376be66286.vm.qdrant-6pn.internal:6335/\"\n      },\n      \"6238012613461344\": {\n        \"uri\": \"http://568370dc75418e.vm.qdrant-6pn.internal:6335/\"\n      },\n      \"2504460418660966\": {\n        \"uri\": \"http://148e722b75d789.vm.qdrant-6pn.internal:6335/\"\n      }\n    },\n    \"raft_info\": {\n      \"term\": 1314,\n      \"commit\": 3510,\n      \"pending_operations\": 0,\n      \"leader\": 8961156852769025,\n      \"role\": \"Leader\",\n      \"is_voter\": true\n    },\n    \"consensus_thread_status\": {\n      \"consensus_thread_status\": \"working\",\n      \"last_update\": \"2023-06-20T22:23:48.543413978Z\"\n    },\n    \"message_send_failures\": {}\n  },\n  \"status\": \"ok\",\n  \"time\": 4.125e-05\n}\n```\n\u003c/details\u003e\n\nHead over to http://localhost:6333/dashboard to see the new Qdrant dashbaord and interact with your data there.\n\n## Advanced Usage\n\n### Data Storage\n\nBy default, Qdrant data and snapshots are stored in `/data/qdrant/`. If you need to change the default storage location, you can adjust the `QDRANT__STORAGE__SNAPSHOTS_PATH` and `QDRANT__STORAGE__STORAGE_PATH` variables in the [fly.toml](./fly.toml)\n\n### Qdrant Sharding and Replication\n\n### Globally-distributed Clusters\n\nWIP\n\n### FAQ\n\n\u003eIs this a good idea?\n \nProbably not `¯\\_(ツ)_/¯`\n___\n\n## Having Trouble?\n\nIf you're facing difficulties or have any queries, feel free to create an issue [here](https://github.com/kylemclaren/qdrant-on-fly/issues).\n\nIt is recommended to enable DEBUG logging before filing an issue: `fly secrets set QDRANT__DEBUG=true QDRANT__LOG_LEVEL=DEBUG`\n\nAlternatively, you can ask questions at the community page [here](https://community.fly.io/).\n\n## Contributing\n\nIf you're looking to contribute to the project, fork it and feel free to send pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemclaren%2Fqdrant-on-fly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylemclaren%2Fqdrant-on-fly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemclaren%2Fqdrant-on-fly/lists"}