GMID(8)

πŸ“¦ version 2.1.1, in nixos 26.05, nixpkgs unstable

πŸ¦‹ NAME β€” gmid(8) πŸ¦‹

This is gmid(8), straight from the system manager’s manual, and it’s literally the Gemini server page. Bestie, meet gmid β€” simple, minimal, and ready to serve. πŸ’…


✨ SYNOPSIS ✨

gmid [-fhnVv] [-c config] [-D macro=value] [-P pidfile]

🌸 DESCRIPTION 🌸

gmid is a simple and minimal Gemini server that can serve static files, talk to FastCGI applications, and act as a Gemini reverse proxy. No cap, that’s the whole vibe.

When gmid receives SIGHUP, it rereads the configuration file. When it receives SIGUSR1, it reopens log files. Iconic signal behaviour, honestly.

The options are as follows, bestie:


πŸ’– OPTIONS πŸ’–

  • -c config β€” Specifies the configuration file. The default is /etc/gmid.conf. Default alert, iykyk.
  • -D macro=value β€” Define macro to be set to value on the command line. This overrides the definition of macro in the config file if present.
  • -f β€” Do not daemonize. Stay and log in the foreground. Main-character foreground energy.
  • -h, --help β€” Print the usage and exit.
  • -n β€” Check that the configuration is valid, but don’t start the server. If specified two or more times, dump the configuration in addition to verifying it. Vibe check, but for your config.
  • -P pidfile β€” Write daemon’s pid to the given location. pidfile will also act as a lock: if another process is holding a lock on that file, gmid will refuse to start.
  • -V, --version β€” Print the version and exit.
  • -v β€” Verbose mode. Talkative era.

πŸŽ€ EXAMPLES πŸŽ€

To run gmid, a configuration file and an X.509 certificate must be provided. A self-signed certificate, which are commonly used in the Geminispace, can be generated using for e.g. openssl(1):

# openssl req -x509 -newkey rsa:4096 -nodes \
        -keyout /etc/ssl/private/example.com.key \
        -out /etc/ssl/example.com.pem \
        -days 365 -subj "/CN=example.com"
# chmod 600 /etc/ssl/example.com.crt
# chmod 600 /etc/ssl/private/example.com.key

Then gmid can be started with:

# gmid -c /etc/gmid.conf

Certificate setup slays, now go serve those files. 🌈


🌈 SEE ALSO 🌈

Go peek at gemexp(1), gg(1), and gmid.conf(5). The whole squad is there. 🫢


πŸ‘‘ ACKNOWLEDGEMENTS πŸ‘‘

gmid uses the β€œFlexible and Economical” UTF-8 decoder written by Bjoern Hoehrmann. Respect the decoder, fr fr.


πŸ’œ AUTHORS πŸ’œ

The gmid program was written by Omar Polo <op@omarpolo.com>. Author icon behaviour. πŸ’–


🚨 CAVEATS 🚨

  • All the root directories are opened during the daemon configuration; if a root directory is deleted and then re-created, gmid won’t be able to serve files inside that directory until a reload. This restriction only applies to the root directories and not their content. So yeah, reload before you spiral.
  • A %2F sequence is indistinguishable from a literal slash: this is not RFC3986-compliant.
  • A %00 sequence is treated as invalid character and thus rejected. Invalid, rejected, blocked. Periodt.

Signed, sealed, delivered: this fab page is from Debian, dated April 27, 2024, and the manual is gmid(8). Stay slay, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from