Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/praetoriansentry/melchior

Simple, secure, static file server for the Gemini protocol
https://github.com/praetoriansentry/melchior

gemini gemini-protocol server

Last synced: 3 months ago
JSON representation

Simple, secure, static file server for the Gemini protocol

Awesome Lists containing this project

README

        

* Melchior

This is meant to be an extremely simple static file server that
operates on the gemini protocol. I mostly just wanted an extremely
simple and hopfully secure server to run at home.

** Features

- Configured with environment variables

** Running

In order to run this, at the very least you'll need to generate a
certificate. I've been using a command like this.

#+BEGIN_SRC
openssl req -newkey rsa:2048 -nodes -keyout localhost.key -nodes -x509 -out localhost.crt -subj "/CN=localhost"
#+END_SRC

After getting the certificates generated you can run this by doing

#+BEGIN_SRC
env MELCHIOR_TLS_CERT=localhost.crt MELCHIOR_TLS_KEY=localhost.key MELCHIOR_HOSTNAME=localhost MELCHIOR_BIND_ADDR=127.0.0.1:1965 MELCHIOR_ROOT_DIR=. go run melchior.go
#+END_SRC

If you don't have a gemini client handy, you can use ~socat~ to do
some testing
#+BEGIN_SRC
socat - OPENSSL-connect:127.0.0.1:1965,verify=0
#+END_SRC

** Installation

#+begin_src
# I'm doing a static build so that I can run this more easily in a container-ish environment
go build -ldflags "-linkmode external -extldflags -static" -a melchior.go
cp melchior /usr/local/bin/melchior
cp melchior-daemon.service /etc/systemd/system/melchior-daemon.service
chmod 664 /etc/systemd/system/melchior-daemon.service

sudo systemctl enable melchior-daemon
sudo systemctl start melchior-daemon
#+end_src