💾 Archived View for tanso.net › diary › 2020-10-25.gmi captured on 2020-11-07 at 02:09:45. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
I randomly noticed a hacker news post on the Gemini Protocol, and was intrigued. I miss the good old web, before cookies and popups and ever present advertising overtook everything. And before everything got completely centralized on a handfull of walled garden services. So, let's try again. Back to basics.
I set up a podman container to host my gemini service:
$ cat <<'EOF' > Dockerfile # # Dockerfile for gmnisrv # FROM alpine MAINTAINER Jan-Frode Myklebust <janfrode@tanso.net> RUN apk add --no-cache git gcc openssl openssl-dev make libc-dev scdoc RUN git clone https://git.sr.ht/~sircmpwn/gmnisrv RUN cd gmnisrv && ./configure && make && make install RUN mkdir -p /usr/local/etc RUN mkdir -p /srv/gemini/etc RUN cp /usr/local/share/gmnisrv/gmnisrv.ini /srv/gemini/etc/gmnisrv.ini EXPOSE 1965 CMD ["/usr/local/bin/gmnisrv", "-C", "/srv/gemini/etc/gmnisrv.ini"] EOF $ podman build --pull-always -t gmnisrv .
Then populated /srv/gemini with a default config file in /srv/gemini/etc/gmnisrv.ini, TLS key and cert from Let's encrypt in the same folder, and a /srv/gemini/files folder to hold my content. Most importantly I put a index.gmi into the files/, with a nice ascii art header of my name. Then I started the container using the following:
$ podman run -v /srv/gemini:/srv/gemini:Z -p 1965:1965/tcp -it gmnisrv
Once I'm happy that it's working, I start it as a systemctl service instead:
$ cat <<'EOF' > /etc/systemd/system/gmnisrv.service [Unit] Description=Gemini container [Service] Restart=always ExecStart=/usr/bin/podman start -a gmnisrv ExecStop=/usr/bin/podman stop -t 2 gmnisrv [Install] WantedBy=local.target EOF $ podman run -v /srv/gemini:/srv/gemini:Z -p 1965:1965/tcp --name gmnisrv -d gmnisrv $ podman kill gmnisrv $ systemctl enable gmnisrv.service $ systemctl start gmnisrv $ systemctl status gmnisrv
And some content:
$ cat <<'EOF' > /srv/gemini/files/index.gmi __ _____ .___ |__|____ _____/ ____\______ ____ __| _/____ | \__ \ / \ __\\_ __ \/ _ \ / __ |/ __ \ | |/ __ \| | \ | | | \( <_> ) /_/ \ ___/ /\__| (____ /___| /__| |__| \____/\____ |\___ > \______| \/ \/ \/ \/ # Jan-Frode's flight log => /diary/2020-10-25.gmi 2020-10-24 My first venture into gemini EOF $ vi /srv/gemini/files/diary/2020-10-25.gmi write this text... :-)