{"id":26090553,"url":"https://github.com/kyle-blair/host-provisioning-service","last_synced_at":"2026-04-08T21:32:32.557Z","repository":{"id":281421607,"uuid":"945192003","full_name":"kyle-blair/host-provisioning-service","owner":"kyle-blair","description":"A simple web server that provides host configuration files.","archived":false,"fork":false,"pushed_at":"2025-10-10T00:16:33.000Z","size":128,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T06:00:59.461Z","etag":null,"topics":["automation","cloud-init","express","homelab","nodejs","server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyle-blair.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-08T21:37:57.000Z","updated_at":"2025-10-10T00:15:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bee7f75-9786-40e5-bc0e-059e3cee1719","html_url":"https://github.com/kyle-blair/host-provisioning-service","commit_stats":null,"previous_names":["kyle-blair/host-provisioning-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyle-blair/host-provisioning-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyle-blair%2Fhost-provisioning-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyle-blair%2Fhost-provisioning-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyle-blair%2Fhost-provisioning-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyle-blair%2Fhost-provisioning-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyle-blair","download_url":"https://codeload.github.com/kyle-blair/host-provisioning-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyle-blair%2Fhost-provisioning-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31575584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["automation","cloud-init","express","homelab","nodejs","server"],"created_at":"2025-03-09T09:34:35.538Z","updated_at":"2026-04-08T21:32:32.545Z","avatar_url":"https://github.com/kyle-blair.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Host Provisioning Service\n\nA simple web server that provides host configuration files.\n\n## Context\n\nA complex home network where I have control over core\nhosts and services such as a firewall, dns, and\nhypervisors.\nIdeally, and potentially over time, this project can\naccommodate more and more automation with respect to host\nprovisioning, as well as becoming useful to more contexts.\n\n## Motivation\n\nI want completely touchless, automated provisioning of hosts\non my home network.\nThis means, at a minimum, I need to automate:\n\n1. Installing the operating system.\n2. Configuring the operating system so that it is accessible\n   over the network for further customization.\n\n\u003e [!NOTE]\n\u003e The astute reader will recognize that, even with a\n\u003e hypervisor, there are many steps that precede (1), and\n\u003e many of those are likely to be manual. These are out of\n\u003e scope for now, but I do intend to address them over time,\n\u003e whether in this project or elsewhere.\n\nOne of the easier ways to accomplish at least part of (1)\nand all of (2) is by using\n[cloud-init](https://cloudinit.readthedocs.io/en/latest/index.html).\nThis project has an https(s) server implementation to serve\nconfiguration files over the network as part of cloud-init's\nprotocol.\nNew hosts that support cloud-init can be directed to this\nserver on first boot in order to retrieve configuration\nfiles.\nSee the cloud-init documentation on the\n[NoCloud data source](https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html)\nand how to use it via discovery configuration.\nUnfortunately, the easiest method of discovery configuration\nstill requires modifying the installation image (.iso file).\n\nTODO: Provide full notes on this process, perhaps via\nmy first blog post.\n\n## Prerequesites\n\nTo run directly via Nodejs:\n\n- Nodejs (including `npm`)\n\nTo run via container:\n\n- A container runtime such as Podman, Colima, Docker.\n\nFor https (the default--because _securitay_):\n\n- A server tls certificate.\n- A server tls private key corresponding to the certificate.\n- A certificate authority public certificate to give to\n  clients so they will trust and accept the server\n  certificate.\n\nTODO: Include instructions on how to generate certificates.\nTODO: Determine if cloud-init accepts certificates from a\nprivate authority for authenticating data sources.\n\n## Usage\n\n### Configure\n\n#### Content\n\nThe whole point of this is to send cloud-init configuration\nfiles, so you must write your own and put them in the\n[content](./content) directory.\nI have provided sample files in the [examples](./examples/)\ndirectory, but they are likely too specific for it to make\nany sense to include real-world examples.\n\n\u003e [!IMPORTANT]\n\u003e You must add your ssh key to the\n\u003e [user-data](./content/user-data) file or otherwise\n\u003e modify/replace the files to suit your needs. Otherwise\n\u003e you will likely end up with a failed operating system\n\u003e installation or a useless one (since you won't be able\n\u003e to access it).\n\nThe basic structure should look like this:\n\n```\ncontent/\n├── meta-data\n└── user-data\n```\n\n#### Environment\n\n`port` to bind to. Default 443.\n\n`server_tls_certificate` holds the _contents_ of the\ncertificate. Required for https.\n\n`server_tls_private_key` holds the private key\ncorresponding to the certificate. Required for https.\n\n`insecure` set to `true` to have the server communicate\nusing http instead of https.\n\n### Run\n\n```shell\ngit clone git@github.com:kyle-blair/host-provisioning-service.git\ncd host-provisioning-service\n```\n\n#### Local/Direct/Development\n\n```shell\nnpm install\n# The default port 443 requires elevated permission.\n# Use 10000 for now.\nexport port=10000\nexport server_tls_certificate=$(cat /path/to/certificate.pem)\nexport server_tls_private_key=$(cat /path/to/private-key.pem)\nnpm start\n```\n\n#### Container\n\nTODO: Implement and test containerfile and container-compose.\n\n```shell\n# Something like this\ndocker-compose up --build container-compose.yaml\n```\n\n#### Try it\n\n```shell\ncurl https://localhost/cloud-init/v1/user-data\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-blair%2Fhost-provisioning-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyle-blair%2Fhost-provisioning-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-blair%2Fhost-provisioning-service/lists"}