{"id":15197159,"url":"https://github.com/wrclark/gem","last_synced_at":"2026-03-05T07:32:32.922Z","repository":{"id":236582444,"uuid":"792901882","full_name":"wrclark/gem","owner":"wrclark","description":"gemini server","archived":false,"fork":false,"pushed_at":"2025-05-11T14:17:15.000Z","size":305,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T15:26:58.134Z","etag":null,"topics":["capsule","gemini","gemini-protocol","gemini-server","gemtext","gmi","linux","openssl","raspberry-pi","raspberrypi","tls13"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wrclark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-27T21:50:02.000Z","updated_at":"2025-05-11T14:17:19.000Z","dependencies_parsed_at":"2024-08-28T23:23:48.951Z","dependency_job_id":"23c2abe5-6807-4e49-bdd5-edc603546c5b","html_url":"https://github.com/wrclark/gem","commit_stats":{"total_commits":91,"total_committers":1,"mean_commits":91.0,"dds":0.0,"last_synced_commit":"0aea3e77ab5d99ff5899f4ce86babb09da491fd6"},"previous_names":["wrclark/gem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wrclark/gem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrclark%2Fgem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrclark%2Fgem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrclark%2Fgem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrclark%2Fgem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wrclark","download_url":"https://codeload.github.com/wrclark/gem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wrclark%2Fgem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30114269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capsule","gemini","gemini-protocol","gemini-server","gemtext","gmi","linux","openssl","raspberry-pi","raspberrypi","tls13"],"created_at":"2024-09-28T00:43:22.649Z","updated_at":"2026-03-05T07:32:32.872Z","avatar_url":"https://github.com/wrclark.png","language":"C","funding_links":[],"categories":["Servers"],"sub_categories":["Graphical"],"readme":"# gem\n\n\u003e gemini server with TLS and script for generating working TLS certs\n\nSupports \n- mime types\n- directory listing\n- chunked file transfer\n- passes most gemini-diagnostics tests\n- user-defined charset/lang meta attributes\n\n![Directory listing as seen in Lagrange](.gitea/lagrange.png)\n\n### build\nTo build you may need to install `libssl-dev`\n\n```sh\n$ sudo apt install libssl-dev\n$ make ssl\n$ make\n$ sudo setcap cap_sys_chroot+ep gem\n```\nLast step is required for `chroot` (or you can run as root/sudo)\n\n### Program options\n```\n-c [pub cert path]   ex: -c \"gem.crt\"     (tls/server.crt default)\n-k [priv key path]   ex: -k \"gem.key\"     (tls/server.key default)\n-h [HOSTNAME]        ex: -h \"example.com\" (localhost default)\n-p [PORT]            ex: -p 1965          (default)\n-d [DOC ROOT]        ex: -d \"/var/gemini\"\n-i [INDEX FILE]      ex: -i \"index.gmi\"   (default)\n-e  enumerate directories without an index file\n-a  permit requests with a different hostname\n-v  print request information\n```\n\nRun with `./gem -d capsule -aev`\n\n### Run gem somewhere other than the git project\nThe options `-c` for the certificate file (pub key) and `-k` for the private key can be used for this purpose.\n```sh\n# example setup\n$ ./gem -aev -d ~/gemini/capsule -c server.crt -k secret.key\n```\n\n#### SSL cert\nTo use your own domain name you have to replace `/CN=localhost` in the `ssl` make target to your domain: eg `example.com` =\u003e `/CN=example.com`.\n\nThen you must also specify the domain as the hostname when running the program:\n```sh\n./gem -h \"example.com\" -d capsule -aev\n```\n\nThe `-a` flag can be useful for accessing the server over IP (perhaps over LAN) without a DNS name.\n\nThe `-d` flag must always be specified.\n\n### meta header lang/charset attribute\nThese are optional, special attributes in the gemini header that define the charset and language used on the page. \n\n#### language\nTo define the language for all the text files in a directory, simply create a `.lang` file with an [ISO 639 2-letter-code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes#Table) optionally followed by by an [ISO 3166-1 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes#Current_ISO_3166_country_codes).\n\nExamples:\n```\nen-GB\nen-US\nru\nes-MX\nsv-FI\nja\n```\n#### charset\nCharacter encoding. `utf-8` should be enough but some text may require any of the following to render properly:\n```\nISO-8859-1\nWindows-1251\nWindows-1252\nGB2312\nShift_JIS\n```\n\nThese 'rules' apply for all the files in that directory. Also make sure it is enabled (`1`) in `config.h`.\n\n```\ncapsule/\n├── .charset      \u003c--- \"utf-8\"\n├── dog.png\n├── index.gmi\n├── .lang         \u003c--- \"en-GB\"\n└── misc\n    ├── 🦊🐦🦉🐞🦓\n    │   ├── 🦩.gmi\n    │   ├── 🐅.gmi\n    │   ├── 🐧.gmi\n    │   ├── 🐬.gmi\n    │   └── 🐺.gmi\n    ├── jp\n    │   ├── .charset      \u003c--- \"Shift_JIS\"\n    │   ├── .lang         \u003c--- \"ja\"\n    │   └── samurai_text_shift_jis.txt\n    └── міжнародний\n        ├── Sultan'ın garaj uzmanı\n        ├── документ на русском языке.txt\n        ├── คำสารภาพ\n        └── 中国\n```\n\n## Misc\n\nGreat development tool:\n```\nhttps://github.com/michael-lazar/gemini-diagnostics\n```\n\nTest gemini client:\n```sh\necho \"gemini://localhost\" | openssl s_client -quiet -crlf -connect localhost:1965\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrclark%2Fgem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwrclark%2Fgem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrclark%2Fgem/lists"}