2023-08-01 13:34:38 +00:00
|
|
|
# geml
|
|
|
|
|
|
|
|
Gemini server written in Common Lisp
|
|
|
|
|
|
|
|
## /etc/geml/geml.ini
|
|
|
|
|
|
|
|
geml requires `cert` and `key` to be configured before it will run. And will
|
|
|
|
have nothing to serve until you configure at least one domain and root. See
|
2023-08-01 13:43:09 +00:00
|
|
|
[`geml.ini`](./geml.ini) as an example.
|
2023-08-01 13:34:38 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
cert = /var/lib/geml/localhost.crt
|
|
|
|
key = /var/lib/geml/localhost.key
|
|
|
|
|
|
|
|
[my.gmi.capsule]
|
|
|
|
root = /srv/gmi
|
|
|
|
```
|
|
|
|
|
|
|
|
### Generate Self-Signed SSL Certificate
|
|
|
|
|
|
|
|
- [ ] include/write helper script for this
|
|
|
|
|
|
|
|
```sh
|
|
|
|
openssl req -x509 \
|
|
|
|
-out localhost.crt \
|
|
|
|
-keyout localhost.key \
|
|
|
|
-newkey rsa:2048 \
|
|
|
|
-nodes \
|
|
|
|
-sha256 \
|
|
|
|
-subj '/CN=localhost' \
|
|
|
|
-extensions EXT \
|
|
|
|
-config <(printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
### Standalone Executable
|
2023-08-01 13:34:38 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
To get an executable `bin/geml-server` run `make`.
|
2023-08-01 13:34:38 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
```sh
|
|
|
|
make && bin/geml-server -h
|
2023-08-01 13:34:38 +00:00
|
|
|
```
|
2023-08-01 17:11:57 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
### Systemd
|
|
|
|
|
|
|
|
Install the build to `/usr/local/bin/geml-server` with
|
|
|
|
`sudo make install` which will also wire up systemd so you can `sudo systemctl
|
|
|
|
enable --now geml`
|
2023-08-01 13:34:38 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
You'll need to `sudo systemctl restart geml` whenever you update
|
|
|
|
`/etc/geml/geml.ini`... you did do that didn't you?
|
|
|
|
|
|
|
|
### yeet it
|
|
|
|
|
|
|
|
To undo all that run these:
|
2023-08-01 17:11:57 +00:00
|
|
|
|
|
|
|
```sh
|
2023-08-01 20:14:16 +00:00
|
|
|
sudo make uninstall
|
|
|
|
make clean
|
2023-08-01 17:11:57 +00:00
|
|
|
```
|
2023-08-01 13:43:09 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
### SBCL
|
|
|
|
|
|
|
|
Start sbcl with proper readline support: `rlwrap sbcl`
|
2023-08-01 13:43:09 +00:00
|
|
|
|
2023-08-01 20:14:16 +00:00
|
|
|
```lisp
|
|
|
|
(ql:quickload "geml")
|
|
|
|
(gemini.server:start-server "/etc/geml/geml.ini")
|
|
|
|
```
|