Troubles w/ hosting gemini server from fly.io

I’m trying to host a Gemini server using the Agate project. Since Gemini is a different protocol from http, my fly.toml file looks like this:

…

[build]
  dockerfile = "Dockerfile.agate"

[[services]]
  internal_port = 1965
  protocol = "tcp"
  processes = ["app"]  
  [[services.ports]]
    port = 1965

My dockerfile looks like this:

FROM alpine:latest
EXPOSE 1965 # Note that Gemini apps are served from port 1965.
RUN apk add cargo && wget -O source.tar.gz $(wget -qO- https://api.github.com/repos/mbrubeck/agate/releases/latest | sed -nE 's/^.*"tarball_url"\s*:\s*"([^"]+)".*$/\1/p')&& tar xzf source.tar.gz && mv /mbrubeck-agate-* /agate && cd agate && cargo build --release
RUN cp /agate/target/release/agate /usr/bin/agate
COPY ./start.sh ./start.sh
ENTRYPOINT ["/bin/sh", "start.sh"]

and the start.sh entrypoint consists merely of this:

#!/bin/sh
exec agate --content /var/gemini/ --addr 0.0.0.0:1965 --hostname myprojectname.fly.dev --lang en-US --certs /var/certs 

My dockerfile works locally; I can build the image and run it from Docker Desktop and the server works just fine.

From the fly.io logs, it looks like my server starts successfully:

[agate] Started listener on 0.0.0.0:1965

However, it doesn’t seem to receive requests made from my browser; no requests are logged, so it seems as though requests aren’t making it through.

Would appreciate any help!

Just a wild guess: does fly ips list show your ipv4 address is shared? You may need a dedicated ipv4 address to make this work.

ah interesting, yes, my ipv4 address appears to be shared. Thank you for this insight!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.