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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. MiroTalk
  3. MiroTalk Update regularly fails after update

MiroTalk Update regularly fails after update

Scheduled Pinned Locked Moved MiroTalk
port bindings
20 Posts 7 Posters 1.9k Views 7 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.
  • jamesJ james

    Hello @djxx
    This is a common issue and has been reported multiple times.
    Please try to stop the app, wait a minute and then attempt the update process again.
    If this still fails, please stop the app again.
    Then connect with ssh to your server.

    Since your error is the following:

    Docker Error: (HTTP code 500) server error - failed to set up container networking: driver failed programming external connectivity on endpoint a877975d-38be-4088-bc92-e0d7a486a818 (2e5adaa635a95bd65ca0f290712065d444528e3420c49f2f88323b40c62caaa5): failed to bind host port for 0.0.0.0:40014:172.18.16.130:40014/tcp: address already in use
    

    it reveals you have changed the ports to 40000 'ish.
    Could you please confirm what port you have chosen?
    From the ports you have chosen you can run the following command in ssh to see if any other application is already using the the ports:
    If you have chosen 40000 then the Mirotalk app uses 100 ports of so 40000 to 40100.

    lsof -i :40000-40100
    
    D Offline
    D Offline
    djxx
    wrote on last edited by
    #3

    @james Thanks for the quick reply. I didn't change any ports manually. Could it be that this and another application are conflicting and it's not being detected?

    I'll run this lsof command next time it happens to see if I can identify the culprit.

    1 Reply Last reply
    2
    • jamesJ james marked this topic as a regular topic on
    • jamesJ james moved this topic from Support on
    • avatar1024A Offline
      avatar1024A Offline
      avatar1024
      wrote on last edited by
      #4

      I have had that happened with Mirotalk too,. Sometimes update get stuck. Happens less often these days but still sometimes. I either have to restart the app or remove and reinstall.

      1 Reply Last reply
      1
      • MiroTalkM Offline
        MiroTalkM Offline
        MiroTalk
        App Maintainer
        wrote on last edited by MiroTalk
        #5

        Port allocation behavior

        By default, when SFU_SERVER is set to false, the application uses a range of 100 ports.

        when SFU_SERVER=true it allocate ports starting from 40000 default + CPU core eg if your server has 4CPU so become 40000 - 40003 (only 3 ports needed)

        More about: https://mediasoup.discourse.group/t/mediasoups-webrtcserver-concerning-firewall-settings-and-port-binding/5965/5


        Cloudron integration

        To support this behavior on Cloudron, SFU_SERVER should be exposed as a toggle (switch button) in the MiroTalk SFU app settings (Location).
        When the switch is enabled, the port allocation logic in start.sh can be updated something as follows:

        # Enable / disable SFU server (default: false)
        readonly SFU_SERVER="${SFU_SERVER:-false}"
        
        # Number of CPU cores (used only when SFU is enabled)
        readonly CPU_CORES="$(nproc)"
        
        # Base TCP port (default: 25000)
        readonly SFU_TCP_BASE="${SFU_TCP:-25000}"
        
        if [[ "$SFU_SERVER" == "true" ]]; then
            # SFU enabled:
            # allocate one port per CPU core
            readonly SFU_MAX_PORT=$(( SFU_TCP_BASE + CPU_CORES - 1 ))
        else
            # Default behavior:
            # allocate 100 ports starting from the base port
            readonly SFU_MAX_PORT=$(( SFU_TCP_BASE + 100 ))
        fi
        

        Benefits of this approach

        • ✅ Fewer ports allocated
          Only the ports that are actually needed are opened, especially in SFU mode.

        • ✅ Reduced port conflicts
          Smaller port ranges significantly lower the chance of clashes with other services on the same host.

        • ✅ Better Cloudron compatibility
          Minimal port exposure aligns well with Cloudron’s strict networking and security model.

        • ✅ Scales with hardware
          Port allocation automatically adapts to the number of CPU cores available.

        • ✅ User control
          Exposing SFU_SERVER as a switch allows users to explicitly choose whether to run in SFU mode or keep the default behavior.

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

          Hello @mirotalk
          Does this have any other effects?

          MiroTalkM 1 Reply Last reply
          0
          • jamesJ james

            Hello @mirotalk
            Does this have any other effects?

            MiroTalkM Offline
            MiroTalkM Offline
            MiroTalk
            App Maintainer
            wrote on last edited by
            #7

            @james said in MiroTalk Update regularly fails after update:

            Does this have any other effects?

            In theory, it shouldn’t have any other effects, as long as the user can switch between these two modes. I’m not entirely sure why Mediasoup doesn’t use a server SFU by default, but you could ask the Mediasoup support forum for clarification.

            1 Reply Last reply
            1
            • D Offline
              D Offline
              djxx
              wrote on last edited by
              #8

              Is there any update on this? I can't rely on this app for meeting links because about 75% of the time it's not running properly due to startup failure.

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #9

                So this always happens when the app gets updated?

                D 1 Reply Last reply
                0
                • nebulonN nebulon

                  So this always happens when the app gets updated?

                  D Offline
                  D Offline
                  djxx
                  wrote on last edited by
                  #10

                  @nebulon It also happens after system updates or restarts. It seems it's a roll of the dice if the ports aren't already taken. Restarting the app doesn't fix it anymore, so now when it crashes I change the SFU TCP/UDP port range to something else and it works when the app restarts.

                  MiroTalkM 1 Reply Last reply
                  0
                  • robiR Offline
                    robiR Offline
                    robi
                    wrote on last edited by
                    #11

                    Sounds like a firewall cleanup issue or maybe something in between

                    Conscious tech

                    1 Reply Last reply
                    0
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by nebulon
                      #12

                      When this happens, can you check which container is occupying those ports?

                      You can run

                      docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" | grep <portnumber>
                      

                      which should reveal the container holding on to it.

                      1 Reply Last reply
                      1
                      • D djxx

                        @nebulon It also happens after system updates or restarts. It seems it's a roll of the dice if the ports aren't already taken. Restarting the app doesn't fix it anymore, so now when it crashes I change the SFU TCP/UDP port range to something else and it works when the app restarts.

                        MiroTalkM Offline
                        MiroTalkM Offline
                        MiroTalk
                        App Maintainer
                        wrote on last edited by MiroTalk
                        #13

                        @djxx said:

                        Restarting the app doesn't fix it anymore, so now when it crashes I change the SFU TCP/UDP port range to something else and it works when the app restarts.

                        This issue can occur if another application is already using ports within the 40000–40100 range. To resolve it, you can either change the port range (for example, starting from 25000)

                        port-conflicts.png

                        or enable WebRTC server mode in the env (edit it via Cloudron file manager), which requires fewer ports, as described above.

                        SFU_SERVER=true
                        

                        Then restart the instance.

                        Edit: The second option requires implementation on the Cloudron side, as described here:
                        https://forum.cloudron.io/post/117374

                        1 Reply Last reply
                        1
                        • robiR Offline
                          robiR Offline
                          robi
                          wrote on last edited by
                          #14

                          Why don't we have the second option as the more reliable packaged default?

                          Conscious tech

                          1 Reply Last reply
                          0
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #15

                            @djxx I think https://git.cloudron.io/platform/box/-/commit/b08e3a5128cdf2e036523c6d585adb0674ba95bf will help.

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              djxx
                              wrote on last edited by djxx
                              #16

                              It's happening again, and this time I don't see a container conflict but rather a health check failure that it cant find it's public IP:

                              Mar 30 09:06:14 [3/30/2026, 16:06:14:098] [Server] Failed to detect IP from http://api.ipify.org 'getaddrinfo EAI_AGAIN api.ipify.org'
                              Mar 30 09:06:14 [3/30/2026, 16:06:14:101] [Server] Failed to detect IP from http://ipinfo.io/ip 'getaddrinfo EAI_AGAIN ipinfo.io'
                              Mar 30 09:06:14 [3/30/2026, 16:06:14:102] [Server] Failed to detect IP from http://ifconfig.me/ip 'getaddrinfo EAI_AGAIN ifconfig.me'
                              Mar 30 09:06:14 [3/30/2026, 16:06:14:103] [Server] Public IP detection failed 'All public IP detection services failed! Please check your network connection'
                              Mar 30 09:06:14 ⠙
                              Mar 30 09:06:23 => Healthcheck error: Error: connect EHOSTUNREACH 172.18.16.130:3010
                              

                              When I check what is using port 3010, it's nodeJS running /home/yellowtent/box/box.js

                              MiroTalkM 1 Reply Last reply
                              0
                              • D djxx

                                It's happening again, and this time I don't see a container conflict but rather a health check failure that it cant find it's public IP:

                                Mar 30 09:06:14 [3/30/2026, 16:06:14:098] [Server] Failed to detect IP from http://api.ipify.org 'getaddrinfo EAI_AGAIN api.ipify.org'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:101] [Server] Failed to detect IP from http://ipinfo.io/ip 'getaddrinfo EAI_AGAIN ipinfo.io'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:102] [Server] Failed to detect IP from http://ifconfig.me/ip 'getaddrinfo EAI_AGAIN ifconfig.me'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:103] [Server] Public IP detection failed 'All public IP detection services failed! Please check your network connection'
                                Mar 30 09:06:14 ⠙
                                Mar 30 09:06:23 => Healthcheck error: Error: connect EHOSTUNREACH 172.18.16.130:3010
                                

                                When I check what is using port 3010, it's nodeJS running /home/yellowtent/box/box.js

                                MiroTalkM Offline
                                MiroTalkM Offline
                                MiroTalk
                                App Maintainer
                                wrote on last edited by MiroTalk
                                #17
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:098] [Server] Failed to detect IP from http://api.ipify.org 'getaddrinfo EAI_AGAIN api.ipify.org'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:101] [Server] Failed to detect IP from http://ipinfo.io/ip 'getaddrinfo EAI_AGAIN ipinfo.io'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:102] [Server] Failed to detect IP from http://ifconfig.me/ip 'getaddrinfo EAI_AGAIN ifconfig.me'
                                Mar 30 09:06:14 [3/30/2026, 16:06:14:103] [Server] Public IP detection failed 'All public IP detection services failed! Please check your network connection'
                                

                                This looks like a network-related issue rather than something specific to MiroTalk.

                                If SFU_ANNOUNCED_IP is not configured, the system will automatically rely on three external services to determine the instance’s public IPv4 address.


                                Is there a firewall or network filter in between that might be blocking traffic?


                                NOTE: As I can see, on Cloudron this is handled by the command in:
                                https://git.cloudron.io/packages/mirotalksfu-app/-/blob/main/start.sh#L39

                                If it fails (mean not set SFU_ANNOUNCED_IP), MiroTalk SFU uses an internal fallback mechanism that queries three external services in sequence to determine a valid public IPv4 address for the instance.

                                D 1 Reply Last reply
                                0
                                • MiroTalkM MiroTalk
                                  Mar 30 09:06:14 [3/30/2026, 16:06:14:098] [Server] Failed to detect IP from http://api.ipify.org 'getaddrinfo EAI_AGAIN api.ipify.org'
                                  Mar 30 09:06:14 [3/30/2026, 16:06:14:101] [Server] Failed to detect IP from http://ipinfo.io/ip 'getaddrinfo EAI_AGAIN ipinfo.io'
                                  Mar 30 09:06:14 [3/30/2026, 16:06:14:102] [Server] Failed to detect IP from http://ifconfig.me/ip 'getaddrinfo EAI_AGAIN ifconfig.me'
                                  Mar 30 09:06:14 [3/30/2026, 16:06:14:103] [Server] Public IP detection failed 'All public IP detection services failed! Please check your network connection'
                                  

                                  This looks like a network-related issue rather than something specific to MiroTalk.

                                  If SFU_ANNOUNCED_IP is not configured, the system will automatically rely on three external services to determine the instance’s public IPv4 address.


                                  Is there a firewall or network filter in between that might be blocking traffic?


                                  NOTE: As I can see, on Cloudron this is handled by the command in:
                                  https://git.cloudron.io/packages/mirotalksfu-app/-/blob/main/start.sh#L39

                                  If it fails (mean not set SFU_ANNOUNCED_IP), MiroTalk SFU uses an internal fallback mechanism that queries three external services in sequence to determine a valid public IPv4 address for the instance.

                                  D Offline
                                  D Offline
                                  djxx
                                  wrote on last edited by
                                  #18

                                  @MiroTalk I can't speak for what Cloudron is doing - but after changing the port ranges again and restarting the app, it starts working again. Perhaps there's a step (getting the public IP) that only happens on reconfiguration but the app expects it to happen on every start?

                                  1 Reply Last reply
                                  0
                                  • girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #19

                                    @djxx unfortunately, my fix (in 9.1.6) did not work. I am looking into a more involved fix.

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

                                      I missed a retry in start container - https://git.cloudron.io/platform/box/-/commit/4ba9c63eb41d663e805f72257cc37774f401265b

                                      1 Reply Last reply
                                      1

                                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                      With your input, this post could be even better 💗

                                      Register Login
                                      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