Niver's system configuration and documentation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

1.2 KiB

gmnisrv

# apt install git make pkg-config libssl-dev scdoc
$ git clone https://git.sr.ht/~sircmpwn/gmnisrv # Download gmnisrv sources
$ mkdir gmnisrv/build
$ cd gmnisrv/build
$ ../configure --prefix=/usr # Check gmnisrv dependencies and setup files needed for building
$ make # Build gmnisrv
# make install # Install gmnisrv binary and manpages on the system
# useradd -U -r -s /usr/sbin/nologin gmnisrv # Add the gmnisrv system user and group
# vim /etc/systemd/system/gmnisrv.service
[Unit]
Description=Gmnisrv, a Gemini server
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gmnisrv
Restart=always
User=gmnisrv
Group=gmnisrv
WorkingDirectory=/srv/ht

[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# mkdir -p /srv/gmi/niver.4.niv.re
# echo "This is a testing Gemini capsule" > /srv/gmi/niver.4.niv.re/index.gmi
# mkdir /var/lib/gemini
# chmod -R 700 /var/lib/gemini
# chown -R gmnisrv:gmnisrv /var/lib/gemini
# vim /etc/gmnisrv.ini
# Space-separated list of hosts
listen=0.0.0.0:1965 [::]:1965

[:tls]
# Path to store certificates on disk
store=/var/lib/gemini

[niver.4.niv.re]
root=/srv/gmi/niver.4.niv.re