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. App Packaging & Development
  3. Installing packages next to cloudron

Installing packages next to cloudron

Scheduled Pinned Locked Moved App Packaging & Development
10 Posts 4 Posters 897 Views 4 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.
  • andreasduerenA Offline
    andreasduerenA Offline
    andreasdueren
    wrote on last edited by
    #1

    I know I'm not supposed to do this and am fully aware of all possible consequences (this is merely a small development server to play on).

    But I would like to install elasticsearch next to cloudron and have nextcloud access it. However, the containers don't seem to be able to call to elasticsearch. curl "http://localhost:9200"fails with curl: (7) Failed to connect to localhost port 9200 after 0 ms: Connection refused

    I have the feeling there is a way to do that though?

    1 Reply Last reply
    0
    • nebulonN Away
      nebulonN Away
      nebulon
      Staff
      wrote on last edited by
      #2

      If you want to connect to services exposing ports on the host system, then you have to use 172.18.0.1 the gateway IP address. localhost within the container will refer to the container itself.

      andreasduerenA 1 Reply Last reply
      2
      • nebulonN nebulon

        If you want to connect to services exposing ports on the host system, then you have to use 172.18.0.1 the gateway IP address. localhost within the container will refer to the container itself.

        andreasduerenA Offline
        andreasduerenA Offline
        andreasdueren
        wrote on last edited by andreasdueren
        #3

        @nebulon Still running into problems. Running curl on machine via terminal resolves fine:

        root@my:~# curl -u elastic:PASSWORD http://localhost:9200
        {
          "name" : "my",
          "cluster_name" : "elasticsearch",
          "cluster_uuid" : "LpqIch-iRl2KRaK6-_DvuQ",
          "version" : {
            "number" : "8.17.2",
            "build_flavor" : "default",
            "build_type" : "deb",
            "build_hash" : "747663ddda3421467150de0e4301e8d4bc636b0c",
            "build_date" : "2025-02-05T22:10:57.067596412Z",
            "build_snapshot" : false,
            "lucene_version" : "9.12.0",
            "minimum_wire_compatibility_version" : "7.17.0",
            "minimum_index_compatibility_version" : "7.0.0"
          },
          "tagline" : "You Know, for Search"
        }
        

        But

        root@539fd472-7ce9-455f-80b0-869ffba5faab:/app/code# curl -u elastic:PASSWORD http://172.18.0.1:9200
        curl: (28) Failed to connect to 172.18.0.1 port 9200 after 132415 ms: Connection timed out
        

        from the CLI within the app fails for some reason.

        1 Reply Last reply
        0
        • nebulonN Away
          nebulonN Away
          nebulon
          Staff
          wrote on last edited by
          #4

          To which interfaces is you elasticsearch binding to? Maybe it explicitly only binds to localhost on the host itself and not any other interfaces like the docker bridge?

          andreasduerenA 1 Reply Last reply
          0
          • nebulonN nebulon

            To which interfaces is you elasticsearch binding to? Maybe it explicitly only binds to localhost on the host itself and not any other interfaces like the docker bridge?

            andreasduerenA Offline
            andreasduerenA Offline
            andreasdueren
            wrote on last edited by
            #5

            @nebulon in /etc/elasticsearch/elasticsearch.yml I tried network.host: 172.18.0.1 & 0.0.0.0. Wouldn't docker be one of these?

            1 Reply Last reply
            0
            • nebulonN Away
              nebulonN Away
              nebulon
              Staff
              wrote on last edited by
              #6

              Ah, have you put that port into the allowlist https://docs.cloudron.io/networking/#whitelist-ports ? Generally apps cannot randomly connect to services on the host and requests from within app containers are treated more or less similar to external connections from that perspective.

              robiR andreasduerenA 2 Replies Last reply
              1
              • nebulonN nebulon

                Ah, have you put that port into the allowlist https://docs.cloudron.io/networking/#whitelist-ports ? Generally apps cannot randomly connect to services on the host and requests from within app containers are treated more or less similar to external connections from that perspective.

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by
                #7

                @nebulon Would that then allow the App proxy to go to an internal app?

                Conscious tech

                1 Reply Last reply
                0
                • nebulonN nebulon

                  Ah, have you put that port into the allowlist https://docs.cloudron.io/networking/#whitelist-ports ? Generally apps cannot randomly connect to services on the host and requests from within app containers are treated more or less similar to external connections from that perspective.

                  andreasduerenA Offline
                  andreasduerenA Offline
                  andreasdueren
                  wrote on last edited by
                  #8

                  @nebulon Yup that did the trick, thank you

                  necrevistonnezrN 1 Reply Last reply
                  0
                  • andreasduerenA andreasdueren

                    @nebulon Yup that did the trick, thank you

                    necrevistonnezrN Offline
                    necrevistonnezrN Offline
                    necrevistonnezr
                    wrote on last edited by
                    #9

                    @andreasdueren If you successfully integrate Elastic with Nextcloud - a little writeup a.k.a. community guide would be awesome!

                    andreasduerenA 1 Reply Last reply
                    3
                    • necrevistonnezrN necrevistonnezr

                      @andreasdueren If you successfully integrate Elastic with Nextcloud - a little writeup a.k.a. community guide would be awesome!

                      andreasduerenA Offline
                      andreasduerenA Offline
                      andreasdueren
                      wrote on last edited by
                      #10

                      @necrevistonnezr It's working, but it is running next to Cloudron which isn't really optimal. I wanted to test and see if it breaks anything though, currently there seem to be no issues.

                      1 Reply Last reply
                      0
                      • andreasduerenA andreasdueren referenced this topic on
                      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