{"id":28184118,"url":"https://github.com/robur-coop/unipi","last_synced_at":"2025-05-16T05:13:10.583Z","repository":{"id":42657690,"uuid":"257044317","full_name":"robur-coop/unipi","owner":"robur-coop","description":"Serving content from a git repository via HTTPS (including let's encrypt provisioning) as MirageOS unikernel","archived":false,"fork":false,"pushed_at":"2025-03-17T18:11:45.000Z","size":148,"stargazers_count":63,"open_issues_count":3,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-12T05:58:24.195Z","etag":null,"topics":["git","http","http-server","letsencrypt","mirageos","ocaml","unikernel"],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robur-coop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-04-19T16:12:58.000Z","updated_at":"2025-03-17T18:11:46.000Z","dependencies_parsed_at":"2023-09-08T08:59:34.612Z","dependency_job_id":"9947dc51-6b4a-430c-8250-5599cfd6d207","html_url":"https://github.com/robur-coop/unipi","commit_stats":null,"previous_names":["robur-coop/unipi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robur-coop%2Funipi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robur-coop%2Funipi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robur-coop%2Funipi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robur-coop%2Funipi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robur-coop","download_url":"https://codeload.github.com/robur-coop/unipi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254470977,"owners_count":22076587,"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","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":["git","http","http-server","letsencrypt","mirageos","ocaml","unikernel"],"created_at":"2025-05-16T05:12:11.542Z","updated_at":"2025-05-16T05:13:10.571Z","avatar_url":"https://github.com/robur-coop.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unipi - serve git repository content as HTTPS\n\nUnipi is a MirageOS unikernel that provides the contents of a git repository via\nHTTP and HTTPS. It embeds (optional) let's encrypt provisioning.\n\nA webhook is provided to update the internal state of the git repository. An\nexample deployment is [robur.coop](https://robur.coop), which serves the\n[robur website](https://git.robur.coop/robur/homepage-data) (using the\npages branch).\n\nSome HTTP headers are added: \"content-type\", which value is looked up of the\nfile ending using [magic-mime](https://github.com/mirage/ocaml-magic-mime/).\n\"last-modified\" and \"etag\" are the timestamp of the most recent commit to the\ngit remore, respective the hash of the most recent commit. If the client sends\n\"if-modified-since\" or \"if-none-match\", and either matches the most recent\ncommit, the HTTP status Not modified (304) is returned with an empty body.\n\nInspiration for this unikernel is taken from\n[Canopy](https://github.com/Engil/Canopy) after discussion with the\n[Muen](https://muen.sk) developers.\n\n## Configuration\n\nUnipi is only configured via boot parameters, as follows:\n\n- `--port` configures the TCP port to listen on (defaults to 80)\n- `--remote` configures the git remote url (e.g. https://github.com/mirage/ocaml-dns.git#gh-pages)\n- `--hook` configures the (secret) url of the webhook, if requested unipi updates its internal git remote (default is \"hook\")\n- `--ipv4` configures the IPv4 address of unipi (e.g. 192.168.2.2/24)\n- `--ipv4-gateway` configures the IPv4 gateway\n\nTo use git via ssh (only public/private key authentication is supported):\n- `--ssh-key` for the ssh private key - either rsa:\u003cseed\u003e or ed25519:\u003cb64-encoded private key\u003e (you can use the tool `awa_gen_key` to produce a random seed and public key)\n- `--ssh-authenticator` to authenticate the ssh remote (format is SHA256:b64-encoded-public-key hash, the output of `ssh-keygen -lf \u003c(ssh-keyscan -t rsa|ed25519 remote-host 2\u003e/dev/null)`)\n\nFor HTTPS service with let's encrypt certificate:\n- `--tls=true` enables tls\n- `--hostname=my-server.example.com` configuring the server name\n- `--production=true` for let's encrypt production environment (default is false, which uses the let's encrypt staging environment)\n- (optional) `--cert-seed=\u003cmy-seed\u003e` seed for the private key of the certificate (`dd if=/dev/random bs=32 count=1 | b64encode -m -`)\n- (optional) `--account-seed=\u003cmy-seed\u003e` seed for the let's encrypt account (see above how to generate this)\n- (optional) `--email=\u003caccount email\u003e` email address used for let's encrypt account registration\n\nFor a complete list of boot parameters, execute the binary with `--help` as\nargument.\n\n## Installation from source\n\nTo install this unikernel from source, you need to have\n[opam](https://opam.ocaml.org) (\u003e= 2.1.0) and\n[ocaml](https://ocaml.org) (\u003e= 4.08.0) installed. Also,\n[mirage](https://mirageos.org) is required (\u003e= 4.5.0). Please follow the\n[installation instructions](https://mirageos.org/wiki/install).\n\nThe following steps will clone this git repository and compile the unikernel:\n\n```bash\n$ git clone https://github.com/robur-coop/unipi.git\n$ cd unipi\n$ mirage configure -t \u003cyour-favourite-target\u003e #i.e. hvt, spt, xen\n$ make depend\n$ make build\n```\n\n## Installing as binary\n\nBinaries are available at [Reproducible OPAM\nbuilds](https://builds.robur.coop/job/unipi/), see [Deploying binary MirageOS\nunikernels](https://hannes.robur.coop/Posts/Deploy) and [Reproducible MirageOS\nunikernel builds](https://hannes.robur.coop/Posts/ReproducibleOPAM) for details.\n\n## Questions?\n\nPlease open an issue if you have questions, feature requests, or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobur-coop%2Funipi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobur-coop%2Funipi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobur-coop%2Funipi/lists"}