{"id":17120174,"url":"https://github.com/milouse/diamant","last_synced_at":"2026-02-08T06:36:47.459Z","repository":{"id":77463464,"uuid":"362438075","full_name":"milouse/diamant","owner":"milouse","description":"A simple Gemini server written in Ruby","archived":false,"fork":false,"pushed_at":"2024-07-17T20:59:55.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T09:33:39.848Z","etag":null,"topics":["gemini","gemini-protocol","gemini-server","ruby"],"latest_commit_sha":null,"homepage":"https://git.umaneti.net/diamant/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milouse.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"liberapay":"milouse","custom":["https://paypal.me/milouse"]}},"created_at":"2021-04-28T11:09:24.000Z","updated_at":"2024-07-17T20:59:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d20db269-c99a-4048-8c36-265250cd20c2","html_url":"https://github.com/milouse/diamant","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/milouse/diamant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milouse%2Fdiamant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milouse%2Fdiamant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milouse%2Fdiamant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milouse%2Fdiamant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milouse","download_url":"https://codeload.github.com/milouse/diamant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milouse%2Fdiamant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269180914,"owners_count":24373837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gemini","gemini-protocol","gemini-server","ruby"],"created_at":"2024-10-14T17:59:14.074Z","updated_at":"2026-02-08T06:36:47.430Z","avatar_url":"https://github.com/milouse.png","language":"Ruby","funding_links":["https://liberapay.com/milouse","https://paypal.me/milouse","https://liberapay.com/milouse/donate"],"categories":[],"sub_categories":[],"readme":"#+title: Diamant Gemini Server\n#+subtitle: A simple Gemini server for static files.\n#+author: Étienne Deparis\n#+language: en\n\nDiamant is a server for the Gemini network protocol, built in ruby. Diamant\nhas very few features, and can only serve static files.\n\n[[gemini://gemini.circumlunar.space/][About the gemini protocol]]\n[[https://gemini.circumlunar.space/][About the gemini protocol]]\n\nInternally, it uses the OpenSSL library to handle the TLS sessions, and the\nruby ~Thread~ implementation to handle concurrent requests.\n\n#+html: \u003ca href=\"https://liberapay.com/milouse/donate\"\u003e\u003cimg alt=\"Support using Liberapay\" src=\"https://img.shields.io/badge/Liberapay-Support_me-yellow?logo=liberapay\"/\u003e\u003c/a\u003e\n#+html: \u003ca href=\"https://paypal.me/milouse\"\u003e\u003cimg alt=\"Support using Paypal\" src=\"https://img.shields.io/badge/Paypal-Support_me-00457C?logo=paypal\u0026labelColor=lightgray\"/\u003e\u003c/a\u003e\n\nIf you like my work, you can help me a lot by giving me a tip, either\nthrough [[https://liberapay.com/milouse][Liberapay]] or [[https://paypal.me/milouse][Paypal]]. Thank you very much!\n\n* About the name\n\nIt is named « Diamant », in reference to one of the first French attempts to build a\nrocket. The first Diamant launch happened in 1965, exactly like Gemini. I think\nit's cool.\n\n[[https://en.wikipedia.org/wiki/Diamant][About the Diamant rocket program on Wikipedia]]\n\n* Installation and setup\n\nDiamant is a [[https://rubygems.org/gems/diamant][ruby gem]]. You need a working ruby environment to use it. We\nrecommand you to use [[https://rvm.io][RVM]] and a specific gemset. However, it will work with a\nglobal ruby installation too.\n\n#+caption: Installation procedure with RVM\n#+begin_src shell\n  rvm get latest\n  rvm use ruby-2.7.2@diamant --create\n  gem install diamant\n#+end_src\n\nThen you need to generate a self-signed TLS certificate and private key. In\nthe following example, remember to replace the example hostname\n~myhostname.com~ with the one you would like to use.\n\nDiamant provides a tool to create these certificates and keys:\n\n#+caption: TLS certificate and private key creation with Diamant\n#+begin_src shell\n  diamant generate_tls_cert myhostname.com\n#+end_src\n\nYou can also use the OpenSSL command if you prefer:\n\n#+caption: TLS certificate and private key creation with OpenSSL\n#+begin_src shell\n  openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem\n      -days 3650 -nodes -subj \"/CN=myhostname.com\"\n#+end_src\n\nFinally, you should create a folder to store your static files to serve:\n\n#+caption: Creation of the first Gemini files\n#+begin_src shell\n  mkdir public_gmi\n  echo 'Hello World!' \u003e public_gmi/index.gmi\n#+end_src\n\n* Run the server\n\n** Basic way\n\nWith all the default options, running the server is as simple as:\n\n#+caption: Running Diamant with default options\n#+begin_src shell\n  diamant\n#+end_src\n\nHowever, you may want to use some other options:\n\n#+caption: Running Diamant with some other options\n#+begin_src shell\n  diamant serve ~/my_gemini_site -b 0.0.0.0\n#+end_src\n\nTo see all possible options, just enter the following command:\n\n#+caption: Access Diamant help\n#+begin_src shell\n  diamant --help\n#+end_src\n\n** As a systemd service\n\nYou can take inspiration from the following service example file:\n\n#+caption: systemd service file example for Diamant\n#+begin_src conf\n  [Unit]\n  Description=Control Diamant Gemini Server\n  After=network.target\n\n  [Service]\n  Type=simple\n  User=gemini\n  Group=gemini\n  Environment=\"PATH=/home/gemini/.rvm/gems/ruby-2.7.2@diamant/bin:/home/gemini/.rvm/gems/ruby-2.7.2@global/bin:/home/gemini/.rvm/rubies/ruby-2.7.2/bin:/home/gemini/.rvm/bin:/usr/local/bin:/usr/bin:/bin\"\n  Environment=\"GEM_HOME=/home/gemini/.rvm/gems/ruby-2.7.2@diamant\"\n  Environment=\"GEM_PATH=/home/gemini/.rvm/gems/ruby-2.7.2@diamant:/home/gemini/.rvm/gems/ruby-2.7.2@global\"\n  WorkingDirectory=/home/gemini\n  ExecStart=/home/gemini/.rvm/gems/ruby-2.7.2@diamant/bin/diamant -b 0.0.0.0\n  KillMode=control-group\n\n  [Install]\n  WantedBy=multi-user.target\n#+end_src\n\n* Sources\n\nDevelopment occurs on my own git repository:\n\n[[https://git.umaneti.net/diamant/][Diamant gemini server git repository]]\n\n[[./TODO.org][Diamant current backlog]]\n\n* See also\n\nBe aware that another ruby implementation exists, named Gack. Diamant differs\nfrom it for two reasons:\n\n- it directly support TLS. There is no need to put it behind a reverse proxy,\n  just run it (even as a simple user, as the 1965 port is not a protected one).\n- it will only serve static content from a given repository, when Gack is more\n  like an application framework (it is named after Rack).\n\n[[https://github.com/rawburt/gack][Gack on github]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilouse%2Fdiamant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilouse%2Fdiamant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilouse%2Fdiamant/lists"}