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: about 1 year ago
JSON representation
Simple, secure, static file server for the Gemini protocol
- Host: GitHub
- URL: https://github.com/praetoriansentry/melchior
- Owner: praetoriansentry
- License: apache-2.0
- Created: 2020-10-28T00:39:21.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-14T23:46:36.000Z (over 5 years ago)
- Last Synced: 2025-03-29T06:23:13.669Z (about 1 year ago)
- Topics: gemini, gemini-protocol, server
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
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