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. Support
  3. How to connect from one app to another, via the internal network?

How to connect from one app to another, via the internal network?

Scheduled Pinned Locked Moved Solved Support
network
7 Posts 3 Posters 907 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.
  • S Offline
    S Offline
    shrey
    wrote on last edited by girish
    #1

    How to do i connect to app A from app B, via the internal cloudron network?

    Not sure if the ip address given by ifconfig is consistent across instance restarts.

    Also, tried host.docker.internal & localhost.... didn't work.

    girishG 1 Reply Last reply
    1
    • S shrey

      How to do i connect to app A from app B, via the internal cloudron network?

      Not sure if the ip address given by ifconfig is consistent across instance restarts.

      Also, tried host.docker.internal & localhost.... didn't work.

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @shrey you can use the app id as the host name. You can also get the raw ip by running ip addr in the web terminal of the app.

      app id is preferred if that works because the ip might change because of platform changes.

      S 1 Reply Last reply
      1
      • girishG girish

        @shrey you can use the app id as the host name. You can also get the raw ip by running ip addr in the web terminal of the app.

        app id is preferred if that works because the ip might change because of platform changes.

        S Offline
        S Offline
        shrey
        wrote on last edited by shrey
        #3

        @girish

        Currently, the url http://<app id> seems to be reachable only from the terminal (e.g. of another app).

        If i try to reach this url from inside the other internal app (e.g. access the directus url via n8n, both on the same cloudron), i receive the error:

        NodeApiError: The service refused the connection - perhaps it is offline
        connect ECONNREFUSED fd00:c107:d509::56:8055
        

        PS: The url http://<app-internal-ip> works fine

        girishG 1 Reply Last reply
        0
        • andreasduerenA Offline
          andreasduerenA Offline
          andreasdueren
          wrote on last edited by
          #4

          Curious to hear what your use case for this is

          S 1 Reply Last reply
          0
          • andreasduerenA andreasdueren

            Curious to hear what your use case for this is

            S Offline
            S Offline
            shrey
            wrote on last edited by
            #5

            @andreasdueren
            Sure,

            @shrey said in How to connect from one app to another, via the internal network?:

            e.g. access the directus url via n8n

            1 Reply Last reply
            1
            • S shrey

              @girish

              Currently, the url http://<app id> seems to be reachable only from the terminal (e.g. of another app).

              If i try to reach this url from inside the other internal app (e.g. access the directus url via n8n, both on the same cloudron), i receive the error:

              NodeApiError: The service refused the connection - perhaps it is offline
              connect ECONNREFUSED fd00:c107:d509::56:8055
              

              PS: The url http://<app-internal-ip> works fine

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @shrey said in How to connect from one app to another, via the internal network?:

              PS: The url http://<app-internal-ip> works fine

              If you run host <app id> , it will resolve to the internal IP. So, I am not sure why it's not working with app id. But it works for me here. For example:

              # curl -L http://dfa81ea4-9a21-4a58-9283-05c5fef1161b | wc -l
                % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                               Dload  Upload   Total   Spent    Left  Speed
                0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
              100 16067  100 16067    0     0  42339      0 --:--:-- --:--:-- --:--:--  382k
              75
              
              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                Note that depending on the app, you might have to query a different port i.e the port it is listening on.

                # curl -L http://12aded8a-8c78-4b6c-bdbe-2d549b1c2eb5:3000 | wc -c
                  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                 Dload  Upload   Total   Spent    Left  Speed
                100    11    0    11    0     0   1412      0 --:--:-- --:--:-- --:--:--  1571
                100    11    0    11    0     0    417      0 --:--:-- --:--:-- --:--:--   417
                100  143k  100  143k    0     0  1464k      0 --:--:-- --:--:-- --:--:-- 1464k
                147314
                

                Directus listens on port 8055 and n8n on port 5678

                1 Reply Last reply
                0
                • girishG girish has marked this topic as solved 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