-- Leo's gemini proxy

-- Connecting to gemini.bunburya.eu:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Isn't there an easy way to self-host a Gemini server?

https://www.reddit.com/r/geminiprotocol/comments/16i97w2/isnt_there_an_easy_way_to_selfhost_a_gemini_server/

created by innocuousAzureus on 14/09/2023 at 04:58 UTC

5 upvotes, 5 top-level comments (showing 5)


Gemini is simple, yet deploying your own Gemini server is not. Isn't there a one-click way to deploy a Gemini server so you can self-host?



Comments


Comment by Arkholt at 14/09/2023 at 15:19 UTC

2 upvotes, 0 direct replies


If so, I would love to find out. At this point the only way I know of is with a fair amount of command line usage.


I used this tutorial to set up mine, which uses Agate: https://landchad.net/gemini/


I also know of the Bliz server, which seems relatively simple to set up: gemini://cadence.moe/bliz-documentation/01-setup.gmi


I think the biggest thing holding back a one-click solution is generating the TLS certificates. Unless there's a setup script or something that generates them automatically during installation, it seems like that's always going to be an extra step.


Comment by GiveEmWatts at 15/09/2023 at 17:17 UTC

2 upvotes, 0 direct replies


It's not any more complicated than setting up a web server. Much simpler actually.


Comment by AntiAmericanismBrit at 17/09/2023 at 21:37 UTC

2 upvotes, 0 direct replies


Not one click but here is a step by step guide tested on Ubuntu 22.04 LTS:


sudo apt install molly-brown


First things first that version of Molly Brown has a bug: if you are on both ipv4 and IPv6, it listens on IPv6 only. So if you want to listen on ipv4 you might want to disable IPv6 on your box for now:


sudo sed -i /etc/default/grub -e 's/quiet splash/quiet splash ipv6.disable=1/' -e 's/LINUX=""/LINUX="ipv6.disable=1"/'


sudo update-grub


Next we need to create directories for the Gemini files and certificates, and we need to create your server certificates, and also create a user for the service because for some reason this isn't yet done by default by the deb scripts:


sudo mkdir -p /etc/molly-brown/certs /var/gemini


sudo chown -R $(whoami) /var/gemini


echo "Hello World from Gemini" > /var/gemini/index.gmi


openssl genrsa 2048 > access.key


openssl req -new -x509 -days 36500 -nodes -sha256 -key access.key -out access.crt


sudo mv access.crt access.key /etc/molly-brown/certs/


sudo useradd molly-brown


You will need to edit the config file in /etc/molly-brown it is just a simple set of directives.


If you want AccessLog to work, you will also need to edit the service file to allow write access to the log directory you set. As the service file could be easily overwritten by package updates, I suggest taking a copy and editing that:


sudo systemctl disable molly-brown@.service


awk '//{print} /ProtectSystem=strict/ {print "ReadWritePaths=/var/log/molly-brown"}' < /lib/systemd/system/molly-brown@.service > gemini.service


sudo mkdir /var/log/molly-brown


sudo chown molly-brown:molly-brown /var/log/molly-brown


sudo systemctl enable $(pwd)/gemini.service


Now you can try pointing a Gemini client at your box and see if you can get the hello world message.


Yes I do agree it would be nice if there were fewer steps :) at least a nice thing about command line is we can write notes like this that you can just follow hopefully...


(I actually keep a "do all the things to set up my box" script in a private Git repo, so if something horrible happens to my box and I have to set it up again from scratch, I can just run that. It also makes it easier to read off what I did later.)


Comment by sirnewton_01 at 23/09/2023 at 13:17 UTC

2 upvotes, 1 direct replies


I wonder if gemini could leverage existing hosting tech, such as ssh, or even no server at all to make it much easier to deploy on a local network.


supertxt, for example, makes use of cli commands like cats that are sshla that work local as well as they do remote over ssh using your existing ssh creds and configuration.


https://supertxt.net


Also, it would be great if it servers can generate their own config files with sane defaults, including the encryption keys. This is what the conserv server does, although it's ssh tech instead of tls.


https://supertxt.net/git/st-int.html


Comment by innocuousAzureus at 18/11/2023 at 13:31 UTC

1 upvotes, 0 direct replies


Ideally, setting up a gemini server would be as easy as installing a gemini client.


Gemini's philosophy is to have things as simple as possible. Except setting up your own server, it seems.


-- Response ended

-- Page fetched on Thu May 2 19:37:31 2024