šŸ’¾ Archived View for halfbigdata.eu ā€ŗ 20220213-self-hosting-capsule.gmi captured on 2022-04-29 at 11:21:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

ā¬…ļø Previous capture (2022-03-01)

-=-=-=-=-=-=-

Self-hosting capsule on shared server?

Wherein I lay out some details of how I host my capsule as well as related problems. (Help is appreciated.)

[Edit 2022-02-15: Someone pointed me towards a potential solution. See addendum at the end.]

Yesterday, I created my very own capsule about my frugal-computing journey. Today, I added the HTML counterpart (including an RSS feed), which I generate from the gemini site using a script.

Tools

I am using the following tools:

I meant to use `gmnisrv`, which is written in C, but I couldn't get it to compile because a lot of X509-related name errors. Somehow, the header files on the system don't include a lot of functions (mainly the funny ones with `get0` instead of `get`).

src/serve.c: In function ā€˜serve_cgiā€™:
src/serve.c:232:33: error: implicit declaration of function ā€˜X509_get0_serialNumberā€™; did you mean ā€˜X509_get_serialNumberā€™? [-Werror=implicit-function-declaration]
  232 |    const ASN1_INTEGER *sn_asn = X509_get0_serialNumber(client_cert);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
      |                                 X509_get_serialNumber
src/serve.c:232:33: error: initialization of ā€˜const ASN1_INTEGER *ā€™ {aka ā€˜const struct asn1_string_st *ā€™} from ā€˜intā€™ makes pointer from integer without a cast [-Werror=int-conversion]

Therefore I fell back on titan2, which is as simple (or dare I say: frugal) as it gets.

titan2 on Gitlab

gemtext-to-html (my fork) on Sourcehut

gmnisrv on Sourcehut

Shared server

I host my site on a shared server on pay-what-you-like provider Uberspace.

Uberspace (strongly recommended)

As far as I understand, I share the machine (and the IP address) with other customers. I guess Uberspace use some clever script to automatically configure Apache (or nginx) with reverse proxies for every customer (as well as processing Let's Encrypt).

Naturally, this kind of multiplexing is not available for Gemini, because (again, naturally) neither Apache nor nginx can reverse proxy Gemini connections.

Therefore my capsule uses this peculiar port 47060 -- it's the one I was assigned by the Uberspace firewall-thingy script.

So far, the only real problem I saw was with the mozz.us Gemini portal, which does not like my port at all. Other clients so far run fine.

A gateway error has occurred:

Port 47060 is not allowed.

My capsule on mozz.us (not working)

Maybe I can convice Uberspace to do multiplexing using Molly Brown or something. Or maybe I am doing something wrong?

Molly Brown on Tildegit

Addendum: a potential solution

Some very kind person pointed me towards a potential solution for nginx by panda-roux, which I promptly forwarded to the friendly folks at Uberspace.

Gemini NGINX Config (panda-roux)

From my communication with them, it seems that said folks are open to looking into the topic.