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
  • 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. LibreChat
  3. First try app packaging : librechat - issue with postgresql extention (pgvector)

First try app packaging : librechat - issue with postgresql extention (pgvector)

Scheduled Pinned Locked Moved LibreChat
39 Posts 10 Posters 2.0k Views 10 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.
  • canadaduaneC Offline
    canadaduaneC Offline
    canadaduane
    App Dev
    wrote on last edited by
    #12

    This is awesome progress @Valexico! Did pgvector make it in to the base Cloudron release, and were you able to then connect LibreChat's DB up?

    BTW I'm very interested in this right now because Open WebUI (the only chat frontend currently supported by Cloudrain AFAIU) recently changed their license to something that is no longer open source (by OSI definition).

    1 Reply Last reply
    2
    • V Offline
      V Offline
      Valexico
      wrote on last edited by
      #13

      Hi @canadaduane
      I think I did have a working app at the end but not 100% features. And then I didn't had time (and interest) to finish the setup
      If somebody is interested I can share my past work but I guess litellm have change quite a bit since

      1 Reply Last reply
      3
      • canadaduaneC Offline
        canadaduaneC Offline
        canadaduane
        App Dev
        wrote on last edited by canadaduane
        #14

        I have a working setup, based on @Valexico 's work here:

        github.com/canadaduane/librechat-cloudron
        https://github.com/halecraft/librechat-cloudron

        The package has been updated to the latest version of LibreChat 0.7.8, and I fixed a few minor wrinkles such as OIDC login, write access to the public dir, and postgres support. I haven't yet tested it with all of the providers (this requires access keys in the .env file).

        image.png

        marcusquinnM 1 Reply Last reply
        8
        • canadaduaneC canadaduane referenced this topic on
        • canadaduaneC canadaduane

          I have a working setup, based on @Valexico 's work here:

          github.com/canadaduane/librechat-cloudron
          https://github.com/halecraft/librechat-cloudron

          The package has been updated to the latest version of LibreChat 0.7.8, and I fixed a few minor wrinkles such as OIDC login, write access to the public dir, and postgres support. I haven't yet tested it with all of the providers (this requires access keys in the .env file).

          image.png

          marcusquinnM Offline
          marcusquinnM Offline
          marcusquinn
          wrote on last edited by
          #15

          @canadaduane Amazing work, well done, and thanks @Valexico, too!

          Web Design https://www.evergreen.je
          Development https://brandlight.org
          Life https://marcusquinn.com

          1 Reply Last reply
          2
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #16

            @canadaduane great stuff! Is there any packaging issues to be aware of? Can you also attach some LICENSE to your work and we can then look into publishing it in the App Store.

            1 Reply Last reply
            4
            • canadaduaneC Offline
              canadaduaneC Offline
              canadaduane
              App Dev
              wrote on last edited by
              #17

              Thanks @girish! I've added an MIT license. Also, I tested with a basic OPENROUTER_KEY and it seems to work well. I'm not aware of any issues at this time.

              1 Reply Last reply
              3
              • canadaduaneC Offline
                canadaduaneC Offline
                canadaduane
                App Dev
                wrote on last edited by
                #18

                @Valexico is the MIT license ok with you also?

                1 Reply Last reply
                3
                • V Offline
                  V Offline
                  Valexico
                  wrote on last edited by
                  #19

                  @canadaduane
                  Yes no problem

                  1 Reply Last reply
                  3
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #20

                    Thanks, cc @vladimir.d . We will take a look .

                    1 Reply Last reply
                    3
                    • firmansiF Offline
                      firmansiF Offline
                      firmansi
                      wrote last edited by
                      #21

                      It seems the package is not shipped with RAG API ?

                      1 Reply Last reply
                      1
                      • nebulonN Offline
                        nebulonN Offline
                        nebulon
                        Staff
                        wrote last edited by
                        #22

                        The package does have pgvector extension, that should work, however I am not sure I understand how the app needs to be configured for RAG API and the local vectordb. Does anyone have upstream docs for that? I can only find https://www.librechat.ai/docs/configuration/rag_api

                        firmansiF 1 Reply Last reply
                        1
                        • luckowL Offline
                          luckowL Offline
                          luckow
                          translator
                          wrote last edited by
                          #23

                          more or less the same question here -> https://forum.cloudron.io/topic/14037/libcrechat-postgresql-pgvector

                          Pronouns: he/him | Primary language: German

                          1 Reply Last reply
                          1
                          • nebulonN nebulon

                            The package does have pgvector extension, that should work, however I am not sure I understand how the app needs to be configured for RAG API and the local vectordb. Does anyone have upstream docs for that? I can only find https://www.librechat.ai/docs/configuration/rag_api

                            firmansiF Offline
                            firmansiF Offline
                            firmansi
                            wrote last edited by firmansi
                            #24

                            @nebulon the documentation for RAG API can be found in https://github.com/danny-avila/rag_api

                            As seen that the pgvector can't be used if the RAG API not installed and running. This RAG API is somehow critical part, if it's not running then the librechat can't have capability that openwebui has for files upload, processing files to embedding model and so on

                            1 Reply Last reply
                            2
                            • nebulonN Offline
                              nebulonN Offline
                              nebulon
                              Staff
                              wrote last edited by
                              #25

                              I see, so this is actually another project which needs to be bundled together with librechat or as a separate app.

                              This one is using pgvector, not librechat itself!

                              (will also move the thread here to the librechat category)

                              1 Reply Last reply
                              2
                              • nebulonN nebulon moved this topic from App Packaging & Development
                              • V Valexico

                                Hi

                                I wanted to learn cloudron app packaging, and I am actually working on an AI assistant to generate Clourdon packages bases on source repository. Ibuilt a bunch of nested prompts (with Zed editor which is really cool for this) and had encouraging result so far.

                                I could generate a working package for Librechat which is requested here.

                                Sources are here : https://gitlab.com/vlebert/librechat-cloudron

                                The app can start in Cloudron but I have 2 issues

                                • SSO with OIDC don't work. It is documented here but I can't make it work.
                                • There is a sub-app called RAG-API used to interact with uploaded document and which require pgvector extention. How to use this extension in a cloudron package ?
                                  Documentation says vector extension is "whitelisted" : https://docs.cloudron.io/packaging/addons/#postgresql
                                  But I can't create this extention in postgres :
                                  bd1f68e9-abfa-46b4-9a83-5ecfc2925ba8-digi-studio 2024-11-25 at 10.52.00.png
                                  Should it be installed with apt in the Dockerfile ? I made a few attempts but no success...

                                Any help would be greatly appreciated 🙂

                                L Offline
                                L Offline
                                LoudLemur
                                wrote last edited by
                                #26

                                @Valexico hey there! Trying this is awesome and thank you so much for putting your ai skills towards packaging.

                                I came here to offer congratulations on having LibreChat packaged, but to hear you have stated an ai cloudron packaging initiative is just fantastic. I am very glad you are here and thanks for your efforts.

                                1 Reply Last reply
                                1
                                • V Offline
                                  V Offline
                                  Valexico
                                  wrote last edited by
                                  #27
                                  This post is deleted!
                                  1 Reply Last reply
                                  0
                                  • V Offline
                                    V Offline
                                    Valexico
                                    wrote last edited by
                                    #28

                                    Hi @LoudLemur
                                    Thanks

                                    For those who want to dig "AI assisted packaging", here is how I proceeded

                                    • I use Zed Editor which has a nice prompt library tool allowing prompt nesting (prompts in prompts. Sins Zed last "agentic" update, you need to use what they call "text thread" to have this feature/behaviour
                                    • I have a main big prompt with all main specificities of packaging (Cloudron documentation mainly)
                                    • I have smaller prompts about addon to be loaded only when needed
                                    • And then I made specific prompts loading target app source files, and the same for example of packaged apps to guide the AI

                                    I did this in 2024. This could be largely improved in 2025 with more agentic behaviour to let the AI fetch the context it needs 🙂

                                    dbbfa877-1653-4bde-a4e5-81131168daf1-digi-studio 2025-07-08 at 09.12.31.png

                                    1851dda3-585f-4c90-9535-6b299fb8c808-digi-studio 2025-07-08 at 09.13.39.png

                                    22c5517a-f79b-477d-aa18-fa820472b819-digi-studio 2025-07-08 at 09.13.50.png

                                    b7816f6c-ffeb-4b26-b9ea-be74684179ef-digi-studio 2025-07-08 at 09.13.17.png

                                    1 Reply Last reply
                                    5
                                    • jdaviescoatesJ Offline
                                      jdaviescoatesJ Offline
                                      jdaviescoates
                                      wrote last edited by
                                      #29

                                      See also the prompt put together by @canadaduane here https://git.knownelement.com/KNEL/KNELProductionContainers/src/commit/9f74e0fc3977d368f1ca4846843607c75cd05b1c/Techops/CloudronPackagePrompt.md

                                      I use Cloudron with Gandi & Hetzner

                                      1 Reply Last reply
                                      4
                                      • robiR Offline
                                        robiR Offline
                                        robi
                                        wrote last edited by robi
                                        #30

                                        With an MCP server if you install context7.com it has the ability to ingest all the relevant docs for the agent task. https://github.com/upstash/context7

                                        There are other nice combos of MCPs, perhaps for another thread. Start and share.

                                        Conscious tech

                                        L 1 Reply Last reply
                                        1
                                        • robiR robi

                                          With an MCP server if you install context7.com it has the ability to ingest all the relevant docs for the agent task. https://github.com/upstash/context7

                                          There are other nice combos of MCPs, perhaps for another thread. Start and share.

                                          L Offline
                                          L Offline
                                          LoudLemur
                                          wrote last edited by
                                          #31

                                          @robi @girish there is an option to add cloudron's docs here, if they are on github

                                          https://context7.com/add-library?tab=github

                                          marcusquinnM 1 Reply Last reply
                                          2
                                          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