Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. @qdrant/js-client-rest on cloudron + Qdrant

@qdrant/js-client-rest on cloudron + Qdrant

Scheduled Pinned Locked Moved Discuss
8 Posts 3 Posters 143 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hpalmier
    wrote last edited by
    #1

    Hi,
    I'm looking for a solution to easily install the @qdrant/js-client-rest API on my Cloudron server, which has Qdrant installed in Docker.
    Thank you for your help.

    1 Reply Last reply
    0
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by
      #2

      Hello @hpalmier
      Since this is out of scope of the normal Cloudron support maybe a partner could help you with that.

      1 Reply Last reply
      0
      • BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote last edited by
        #3

        ๐Ÿ‘‹
        Contact me if you'd like some help.

        Like my work? Consider donating a drink. Cheers!

        H 1 Reply Last reply
        0
        • BrutalBirdieB BrutalBirdie

          ๐Ÿ‘‹
          Contact me if you'd like some help.

          H Offline
          H Offline
          hpalmier
          wrote last edited by
          #4

          @BrutalBirdie What do you need to help me with this?

          1 Reply Last reply
          0
          • BrutalBirdieB Offline
            BrutalBirdieB Offline
            BrutalBirdie
            Partner
            wrote last edited by
            #5

            A good description on what you are trying to get working.

            a solution to easily install the @qdrant/js-client-rest API on my Cloudron server

            To do what exactly? Run this js-client-rest as a service to react to stuff or just to code some stuff?

            Like my work? Consider donating a drink. Cheers!

            1 Reply Last reply
            1
            • BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote last edited by BrutalBirdie
              #6

              โš  WARNING โš 

              Since this is outside the normal Cloudron use-case no support can be guaranteed if something goes wrong.
              Make sure your backup is working.


              I looked into it, even though I have no idea what Qdrant is or how I use it ๐Ÿ˜„
              If you want to use the Qdrant Container with a Cloudron app e.g. N8N you need to run the container with the cloudron network.

              Running the Qdrant container temporary with --rm.
              Use -itd to run in daemon mode and remove --rm if you want this container to be persistent.
              Don't run the container with -p 6333:6333 this exposed the port to 0.0.0.0 aka. the whole internet!

              docker run -it --network=cloudron --rm --name "qdrant-server" qdrant/qdrant
              

              Getting the IP of this container:

              docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qdrant-server
              

              got me:

              172.18.0.2
              

              I can run curl and get:

              curl -k 172.18.0.2:6333
              {"title":"qdrant - vector search engine","version":"1.15.1","commit":"af7ab5b192f01c9d9cd7fff119eab2ae73755cc0"}
              

              Now as an example, N8N allows installing custom node modules https://docs.cloudron.io/packages/n8n/#custom-node-modules
              I added the mentioned client like this:

              export EXTRA_NODE_MODULES="@qdrant/js-client-rest@1.15.0"
              export NODE_FUNCTION_ALLOW_EXTERNAL="@qdrant/js-client-rest"
              

              restart n8n.

              Now inside N8N I can just add a code block and put my JavaScript in there:

              const SERVER = "172.18.0.2"
              
              const { QdrantClient } = require('@qdrant/js-client-rest');
              const client = new QdrantClient({ url: `http://${SERVER}:6333` });
              
              async function GetCollections() {
                try {
                  let collections = await client.getCollections();
                  return collections;
                } catch (error) {
                  return { error: error.message };
                }
              }
              
              async function getVersion() {
                try{
                  let version = await client.versionInfo();
                  return version;
                } catch (error) {
                  return { error: error.message };
                }
              }
              
              // return await GetCollections();
              return await getVersion();
              

              and I get:

              920ec66a-699c-4acb-8779-2c3c223680bf-image.png

              which looks good to me since the default curl also reported:

              {"title":"qdrant - vector search engine","version":"1.15.1","commit":"af7ab5b192f01c9d9cd7fff119eab2ae73755cc0"}
              

              and I can even see the call in the docker container terminal if I run the GetCollections function:

              docker run -it --network=cloudron --rm --name "qdrant-server" qdrant/qdrant
                         _                 _
                __ _  __| |_ __ __ _ _ __ | |_
               / _` |/ _` | '__/ _` | '_ \| __|
              | (_| | (_| | | | (_| | | | | |_
               \__, |\__,_|_|  \__,_|_| |_|\__|
                  |_|
              
              Version: 1.15.1, build: af7ab5b1
              Access web UI at http://localhost:6333/dashboard
              
              2025-08-05T19:08:04.285657Z  WARN qdrant: There is a potential issue with the filesystem for storage path ./storage. Details: Container filesystem detected - storage might be lost with container re-creation
              2025-08-05T19:08:04.285702Z  INFO storage::content_manager::consensus::persistent: Initializing new raft state at ./storage/raft_state.json
              2025-08-05T19:08:04.290017Z  INFO qdrant: Distributed mode disabled
              2025-08-05T19:08:04.290424Z  INFO qdrant: Telemetry reporting enabled, id: f03604a7-74f7-4a50-aa96-5d13be41e0a3
              2025-08-05T19:08:04.291054Z  INFO qdrant: Inference service is not configured.
              2025-08-05T19:08:04.292258Z  INFO qdrant::actix: TLS disabled for REST API
              2025-08-05T19:08:04.292311Z  INFO qdrant::actix: Qdrant HTTP listening on 6333
              2025-08-05T19:08:04.292323Z  INFO actix_server::builder: starting 1 workers
              2025-08-05T19:08:04.292337Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime
              2025-08-05T19:08:04.292342Z  INFO actix_server::server: starting service: "actix-web-service-0.0.0.0:6333", workers: 1, listening on: 0.0.0.0:6333
              2025-08-05T19:08:04.300951Z  INFO qdrant::tonic: Qdrant gRPC listening on 6334
              2025-08-05T19:08:04.300973Z  INFO qdrant::tonic: TLS disabled for gRPC API
              2025-08-05T19:10:06.791834Z  INFO actix_web::middleware::logger: 172.18.0.1 "GET /collections HTTP/1.1" 200 82 "-" "qdrant-js/1.15.0" 0.000218
              

              You could even connect to your Cloudron Server with a local port forward to access the Qdrant Server locally by connecting like this:

              ssh -L 6333:172.18.0.2:6333 root@my.DOMAIN.TLD
              

              Then I can access http://localhost:6333/dashboard#/welcome

              7dc57483-0079-44ef-8413-1924aa98bc5d-image.png

              I even exported you the N8N flow that can be imported:

              {
                "name": "Qdrant-Client-Demo",
                "nodes": [
                  {
                    "parameters": {},
                    "type": "n8n-nodes-base.manualTrigger",
                    "typeVersion": 1,
                    "position": [
                      0,
                      0
                    ],
                    "id": "007bf3f7-a515-4ce5-9b4f-bd09854f5aaf",
                    "name": "When clicking โ€˜Execute workflowโ€™"
                  },
                  {
                    "parameters": {
                      "jsCode": "const SERVER = \"172.18.0.2\"\n\nconst { QdrantClient } = require('@qdrant/js-client-rest');\nconst client = new QdrantClient({ url: `http://${SERVER}:6333` });\n\nasync function GetCollections() {\n  try {\n    let collections = await client.getCollections();\n    return collections;\n  } catch (error) {\n    return { error: error.message };\n  }\n}\n\nasync function getVersion() {\n  try{\n    let version = await client.versionInfo();\n    return version;\n  } catch (error) {\n    return { error: error.message };\n  }\n}\n\nreturn await GetCollections();\nreturn await getVersion();"
                    },
                    "type": "n8n-nodes-base.code",
                    "typeVersion": 2,
                    "position": [
                      208,
                      0
                    ],
                    "id": "07ff8a21-2b41-4807-9877-852bd3ba6dd3",
                    "name": "Code",
                    "alwaysOutputData": true
                  }
                ],
                "pinData": {},
                "connections": {
                  "When clicking โ€˜Execute workflowโ€™": {
                    "main": [
                      [
                        {
                          "node": "Code",
                          "type": "main",
                          "index": 0
                        }
                      ]
                    ]
                  }
                },
                "active": false,
                "settings": {
                  "executionOrder": "v1"
                },
                "versionId": "77088952-cdd7-4c25-b997-17e796579d9f",
                "meta": {
                  "instanceId": "1b29197382aed7f000c929541e52ecd53138f43371fbaa4d95c7faf000a6bce1"
                },
                "id": "Cmp1AW4jMQvJk3sK",
                "tags": []
              }
              

              My normal hourly rate is between โ‚ฌ80 and โ‚ฌ120 so:
              Leave me a generous tip ๐Ÿ˜‰ https://ko-fi.com/brutalbirdie

              Like my work? Consider donating a drink. Cheers!

              1 Reply Last reply
              1
              • BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote last edited by BrutalBirdie
                #7

                After writing this I realized N8N even has a Qdrant module ๐Ÿ˜†
                https://qdrant.tech/documentation/platforms/n8n/

                With that, I can simply add the URL: abc85e89-2739-4ff4-8320-602ef341d26f-image.png

                and run the module:

                4a249eaa-a1b4-4865-b2cc-ab9451eb41f7-image.png

                or any of these:
                da6ff77c-b3de-447b-acfe-3b5bb762a4d4-image.png

                But since you asked specifically for @qdrant/js-client-rest my post before still holds up ๐Ÿ™‚

                Like my work? Consider donating a drink. Cheers!

                1 Reply Last reply
                2
                • J joseph moved this topic from Support
                • jamesJ james marked this topic as a regular topic
                • BrutalBirdieB Offline
                  BrutalBirdieB Offline
                  BrutalBirdie
                  Partner
                  wrote last edited by
                  #8

                  @hpalmier

                  image.png

                  Like my work? Consider donating a drink. Cheers!

                  1 Reply Last reply
                  1
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search