add gemini server
This commit is contained in:
parent
43c0d0dac2
commit
a5e13178d0
49
networking/servers/agate.md
Normal file
49
networking/servers/agate.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
Make sure your dns is in order.
|
||||||
|
My domain name is `belgradecats.tk`, so put your own in there.
|
||||||
|
|
||||||
|
Install agate by placing the binary somewhere or (on Arch):
|
||||||
|
|
||||||
|
> yay -S agate
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> sudo mkdir -p /usr/share/gemini/{certs,gemini}
|
||||||
|
|
||||||
|
> sudo useradd gemini -d /usr/share/gemini
|
||||||
|
|
||||||
|
> sudo chown -R gemini:gemini /usr/share/gemini
|
||||||
|
|
||||||
|
> sudo su gemini
|
||||||
|
|
||||||
|
> cd
|
||||||
|
|
||||||
|
> echo 'Hello Gemworld!' > gemini/index.gmi
|
||||||
|
|
||||||
|
> cd /usr/share/gemini/certs
|
||||||
|
|
||||||
|
> openssl req -new -subj "/CN=belgradecats.tk" -x509 -newkey ec pkeyopt ec_paramgen_curve:prime256v1 -days 3000 -nodes -out cert.pem keyout key.pem
|
||||||
|
|
||||||
|
Make a service file.
|
||||||
|
|
||||||
|
> sudo vim /etc/systemd/system/multi-user.target.wants/agate.service
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=agate
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=gemini
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/agate -s --content /usr/share/gemini/gemini --key /usr/share/gemini/certs/key.pem --cert /usr/share/gemini/certs/cert.pem --hostname belgradecats.tk --lang en-GB
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
> sudo systemctl daemon-reload
|
||||||
|
|
||||||
|
> sudo systemctl enable --now agate
|
||||||
|
|
Loading…
Reference in New Issue
Block a user