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. Support
  3. Can't use localtunnel properly with app proxy

Can't use localtunnel properly with app proxy

Scheduled Pinned Locked Moved Solved Support
app proxy
7 Posts 4 Posters 2.4k 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.
  • D Offline
    D Offline
    doon
    wrote on last edited by girish
    #1

    Hi there,
    I'm trying to install localtunnel server in order to share my local stuffs to the world.
    I have localtunnel server working properly on port 4000 on my server, using docker (I just changed the port to 4000).

    I use an app proxy to be able to contact this service from outside :
    Screenshot 2024-01-31 at 16.26.27.png

    With ssh in my server I got this :

    $ curl http://localhost:4000/api/status
    {"tunnels":0,"mem":{"rss":59826176,"heapTotal":33873920,"heapUsed":20766296,"external":699069}}
    

    But when I try to call it from outside of the server, I got this :

    $ curl https://app.[mynameserver]/api/status
    404
    

    Can you help me on this please ?

    1 Reply Last reply
    1
    • D Offline
      D Offline
      doon
      wrote on last edited by
      #2

      If this can help, here is the app proxy log :

      app.[mynameserver] (App Proxy)
      Jan 31 16:36:02box:taskworker Starting task 781. Logs are at /home/yellowtent/platformdata/logs/7680a923-b928-4f51-9ddb-18d9c1da18e8/apptask.log
      Jan 31 16:36:02box:apptask run: startTask installationState: pending_install runState: running
      Jan 31 16:36:02box:tasks update 781: {"percent":10,"message":"Cleaning up old install"}
      Jan 31 16:36:02box:shell reload spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/restartservice.sh nginx
      Jan 31 16:36:02box:apptask deleteContainer: deleting app containers (app, scheduler)
      Jan 31 16:36:02box:shell removeLogrotateConfig spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/configurelogrotate.sh remove 7680a923-b928-4f51-9ddb-18d9c1da18e8
      Jan 31 16:36:02box:services teardownAddons: Tearing down ["proxyAuth"]
      Jan 31 16:36:02box:services teardownAddons: Tearing down addon proxyAuth with options {}
      Jan 31 16:36:02box:tasks update 781: {"percent":20,"message":"Downloading icon"}
      Jan 31 16:36:02box:apptask downloadIcon: Downloading icon of io.cloudron.builtin.appproxy@1.0.2
      Jan 31 16:36:03box:tasks update 781: {"percent":30,"message":"Registering subdomains"}
      Jan 31 16:36:03box:dns registerLocations: Will register [{"subdomain":"app","domain":"[mynameserver]"}] with options {"overwriteDns":false}
      Jan 31 16:36:03box:network/generic getIPv4: querying ipv4.api.cloudron.io to get server IPv4
      Jan 31 16:36:03box:tasks update 781: {"message":"Registering location app.[mynameserver]"}
      Jan 31 16:36:03box:dns upsertDNSRecord: location app on domain [mynameserver] of type A with values ["[myIPserver]"]
      Jan 31 16:36:03box:dns/manual upsert: app for zone [mynameserver] of type A with values ["[myIPserver]"]
      Jan 31 16:36:03box:tasks update 781: {"percent":40,"message":"Downloading image"}
      Jan 31 16:36:03box:tasks update 781: {"percent":50,"message":"Creating app data directory"}
      Jan 31 16:36:03box:tasks update 781: {"percent":60,"message":"Setting up addons"}
      Jan 31 16:36:03box:services Setting up proxyAuth
      Jan 31 16:36:03box:services setupAddons: Setting up ["proxyAuth"]
      Jan 31 16:36:03box:services setupAddons: setting up addon proxyAuth with options {}
      Jan 31 16:36:03box:tasks update 781: {"percent":80,"message":"Creating container"}
      Jan 31 16:36:03box:apptask startApp: starting container
      Jan 31 16:36:03box:tasks update 781: {"percent":85,"message":"Waiting for DNS propagation"}
      Jan 31 16:36:03box:tasks update 781: {"message":"Waiting for propagation of app.[mynameserver]"}
      Jan 31 16:36:03box:dns/waitfordns waitForDns: waiting for app.[mynameserver] to be [myIPserver] in zone [mynameserver]
      Jan 31 16:36:03box:dns/waitfordns waitForDns: nameservers are ["ns1.dns-parking.com","ns2.dns-parking.com"]
      Jan 31 16:36:03box:dns/waitfordns resolveIp: Checking if app.[mynameserver] has A record at 162.159.24.201
      Jan 31 16:36:03box:dns/waitfordns isChangeSynced: app.[mynameserver] (A) was resolved to [myIPserver] at NS ns1.dns-parking.com (162.159.24.201). Expecting [myIPserver]. Match true
      Jan 31 16:36:03box:dns/waitfordns resolveIp: Checking if app.[mynameserver] has A record at 162.159.25.42
      Jan 31 16:36:03box:dns/waitfordns waitForDns: app.[mynameserver] at ns ns1.dns-parking.com: done
      Jan 31 16:36:03box:dns/waitfordns isChangeSynced: app.[mynameserver] (A) was resolved to [myIPserver] at NS ns2.dns-parking.com (162.159.25.42). Expecting [myIPserver]. Match true
      Jan 31 16:36:03box:dns/waitfordns waitForDns: app.[mynameserver] at ns ns2.dns-parking.com: done
      Jan 31 16:36:03box:dns/waitfordns waitForDns: app.[mynameserver] has propagated
      Jan 31 16:36:03box:tasks update 781: {"percent":95,"message":"Configuring reverse proxy"}
      Jan 31 16:36:03box:reverseproxy providerMatchesSync: subject=CN = app.[mynameserver] domain=app.[mynameserver] issuer=C = US, O = Let's Encrypt, CN = R3 wildcard=false/false prod=true/true issuerMismatch=false wildcardMismatch=false match=true
      Jan 31 16:36:03box:reverseproxy ensureCertificate: app.[mynameserver] acme cert exists and is up to date
      Jan 31 16:36:03box:reverseproxy expiryDate: subject=CN = app.[mynameserver] notBefore=Jan 31 13:32:16 2024 GMT notAfter=Apr 30 13:32:15 2024 GMT daysLeft=89.91401716435185
      Jan 31 16:36:03box:reverseproxy needsRenewal: false. force: false
      Jan 31 16:36:03box:reverseproxy writeAppLocationNginxConfig: writing config for "app.[mynameserver]" to /home/yellowtent/platformdata/nginx/applications/7680a923-b928-4f51-9ddb-18d9c1da18e8/app.[mynameserver].conf with options {"sourceDir":"/home/yellowtent/box","vhost":"app.[mynameserver]","hasIPv6":true,"ip":null,"port":3000,"endpoint":"external","redirectTo":null,"certFilePath":"/home/yellowtent/platformdata/nginx/cert/app.[mynameserver].cert","keyFilePath":"/home/yellowtent/platformdata/nginx/cert/app.[mynameserver].key","robotsTxtQuoted":null,"cspQuoted":null,"hideHeaders":[],"proxyAuth":{"enabled":false,"id":"7680a923-b928-4f51-9ddb-18d9c1da18e8","location":"/"},"upstreamUri":"http://localhost:4000","ocsp":true,"hstsPreload":false}
      Jan 31 16:36:03box:shell reload spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/restartservice.sh nginx
      Jan 31 16:36:04box:tasks update 781: {"percent":100,"message":"Done"}
      Jan 31 16:36:04box:taskworker Task took 1.43 seconds
      Jan 31 16:36:04box:tasks setCompleted - 781: {"result":null,"error":null}
      Jan 31 16:36:04box:tasks update 781: {"percent":100,"result":null,"error":null}
      Jan 31 16:36:10=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      Jan 31 16:36:20=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      Jan 31 16:36:30=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      Jan 31 16:36:40=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      Jan 31 16:36:50=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      Jan 31 16:37:00=> Healtheck error: Error: connect ECONNREFUSED ::1:4000
      
      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3

        I don't know what that localtunnel software does, however running it on the same server installed on the side of Cloudron will most likely break something in the long run, so I can't recommend that.

        For the actual error, is localtunnel listening on the ipv6 interface where the health check tries to call?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          doon
          wrote on last edited by
          #4

          tbh I don't know, it runs Koa.js under the hood

          girishG 1 Reply Last reply
          0
          • D doon

            tbh I don't know, it runs Koa.js under the hood

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

            @doon per the docs, you have to pass --domain also . See https://github.com/localtunnel/server?tab=readme-ov-file#setup

            So, pass --domain app.domain.com to the docker arguments .

            To mimic how the reverse proxy calls try:

            curl -H 'Host: app.domain.com' http://localhost:4000/api/status
            

            The above must work first for the reverse proxy to work.

            And two other things: that app hasn't been updated for 5 years it seems.... And don't run additional stuff on cloudron server itself. We don't support this.

            1 Reply Last reply
            2
            • D Offline
              D Offline
              doon
              wrote on last edited by
              #6

              yay thanks for that !

              robiR 1 Reply Last reply
              0
              • girishG girish marked this topic as a question on
              • girishG girish has marked this topic as solved on
              • D doon

                yay thanks for that !

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

                @doon Perhaps you can do a writeup as a guide for the rest of the forum on your use case?

                Conscious tech

                1 Reply Last reply
                0

                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