I’m writing a Lemmy bot. (No spoilers. I’ll publish it one day.) To test it, I’m running a local Lemmy instance (via Docker) on a computer on my LAN and pointing my bot at it. That method works great, mostly. I can use Lemmy-UI just fine on my computer. I can also connect to that computer from a browser on my Android phone via http://192.168.1.199:1234/. I can also connect to Lemmy directly from my browser on my Android phone via http://192.168.1.199:8536/ and get a JSON payload (rather than an HTML page) with some information about the instance. So I’m certain I can connect to both Lemmy and Lemmy-UI from elsewhere on my LAN.

I also want to see exactly what posts made by my bot look like in Jerboa, but I haven’t been able to figure out how to connect to it from Jerboa. On the “add account instance” interface, you can select an instance from the dropdown, but you can also type whatever you want into the dropdown field.

I’ve tried typing in:

  • 192.168.1.199
  • 192.168.1.199:1234 (Lemmy-UI is HTTP port 1234.)
  • 192.168.1.199:8536 (Lemmy is HTTP port 8536.)
  • http://192.168.1.199:1234
  • http://192.168.1.199:8536

(And, yeah, I figure port 1234 is probably not correct because probably Jerboa doesn’t go through Lemmy-UI, but rather directly to Lemmy itself. But I figured I’d include those experiments here for completeness’s sake.)

But I get the error message “Couldn’t connect to the instance.”

I’m running Jerboa 0.0.77 and Lemmy 0.19.8.

Thanks in advance!

  • @JASN_DE
    link
    78 days ago

    Does it expect TLS, so https:// by any chance?

    • @TootSweetOP
      link
      English
      3
      edit-2
      8 days ago

      Yeah, I was a bit worried about that. Currently it doesn’t have TLS enabled. I might have to have a valid certificate and everything, which would be annoying. If I don’t get a silver bullet other than this, I’ll probably see about going that route.

      Edit: Yeah, looks like this is probably the case. It seems Jerboa only wants to connect to port 443, no matter what I put in the instance box and openssl s_server on 443 with just any old random certificate gives SSL alert number 46 which basically means Jerboa won’t trust the certificate. So, I think my path forward is to make my server do the whole TLS thing with a valid certificate. Thanks everyone for the input!

      • qprimed
        link
        fedilink
        English
        3
        edit-2
        8 days ago

        self signed is an option if strict checking is not enforced by the client… or perhaps certbot to the rescue? if you run a public facing DNS server, certbot-dns-rfc2136 requests would allow you to create certs for any host you want (even internal ones)

  • Shadow
    link
    fedilink
    48 days ago

    If it’s all in docker, you probably need the docker container name as the target host. Assuming your docker network isn’t in host mode.

    • @TootSweetOP
      link
      English
      28 days ago

      I’ve got Docker forwarding the ports to my host system, though. And I’m trying to connect Jerboa from a separate device that wouldn’t know Docker is even involved. That connection works fine from a browser, so it doesn’t seem to me like the hostname could possibly be the problem.