added missing save
strip port
trim trailing /
Shavit is a configurable Gemini server for UNIX operating systems. The server is in a very early state and can only serve static files but in the near future it will support dynamically generated files like a search endpoints and an Atom feed.
The server is written in Go so to build it you only need to run one command:
go build
This will produce a binary named shavit
that you can run.
After you have compiled the server you need to configure it before it will run.
The server expect a configuration file in /etc/shavit/config.toml
that contain
a path to the documents directory and the certificate files. A simple
configuration file might look like this:
source = "/var/gemini/docs"
tls_certificate = "/var/gemini/server.crt"
tls_key = "/var/gemini/server.key"
With this configuration file the server will look for a certificate and key in
/var/gemini
and for documents in /var/gemini/docs
.
Calm down. Everything's fine.
This fork of shavit adds support for publishing access measurements into Influxdb. To activate this feature, add in the configuration file:
influxdb_address = "http://127.0.0.1:8086"
influxdb_token = ""
influxdb_bucket = "mysupercapsule"
If you don't encrypt anything and don't configure Influxdb auth, make sure it only listens on localhost.
Then start shavit.
You need to create the bucket (usually your capsule name) in Influxdb:
% influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> create database axionfield
Then navigate on your gemini capsule to create some hits. You can check the stats by doing:
% influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> use axionfield
Using database axionfield
> select * from hits
name: hits
time url value
---- --- -----
time url value
---- --- -----
1670366649977061461 gemini://axionfield.space/ 1
1670366755216750823 gemini://axionfield.space 1
1670366759328809892 gemini://axionfield.space/gemlog/20220524-isolate-yourself.gmi 1
1670366761238772854 gemini://axionfield.space/gemlog/20220830-librem5-wireguard-and-mms.gmi 1
1670366762792695647 gemini://axionfield.space/gemlog/20220411-enterprise-software.gmi 1
1670366762961665148 gemini://axionfield.space/gemlog/20210531-burn-your-nest.gmi 1
1670366831436249883 gemini://axionfield.space/gemlog/20220411-enterprise-software.gmi 1
1670366832239928815 gemini://axionfield.space/gemlog/20220411-enterprise-software.gmi 1
1670366834315601313 gemini://axionfield.space/ 1
1670366835357014051 gemini://axionfield.space/ 1
See? It's fine.