{"id":17356899,"url":"https://github.com/j8r/crystalxd","last_synced_at":"2026-05-15T23:02:49.337Z","repository":{"id":152029268,"uuid":"224897501","full_name":"j8r/crystalxd","owner":"j8r","description":"Crystal client for the LXD REST API","archived":false,"fork":false,"pushed_at":"2020-02-24T10:04:37.000Z","size":97,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T14:44:14.707Z","etag":null,"topics":["api","container","crystal","linux","lxd","rest"],"latest_commit_sha":null,"homepage":"https://j8r.github.io/crystalxd","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j8r.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}},"created_at":"2019-11-29T17:33:13.000Z","updated_at":"2021-11-02T19:26:16.000Z","dependencies_parsed_at":"2023-09-13T21:46:51.770Z","dependency_job_id":null,"html_url":"https://github.com/j8r/crystalxd","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"dd869ea20fe005aa6efd587b012c3b68cf529431"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/j8r/crystalxd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystalxd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystalxd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystalxd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystalxd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j8r","download_url":"https://codeload.github.com/j8r/crystalxd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystalxd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264696460,"owners_count":23650936,"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":["api","container","crystal","linux","lxd","rest"],"created_at":"2024-10-15T18:59:10.862Z","updated_at":"2026-05-15T23:02:49.251Z","avatar_url":"https://github.com/j8r.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CrystaLXD\n\nCrystal client for the [LXD](https://linuxcontainers.org/lxd/) REST API.\n\n[![Build Status](https://cloud.drone.io/api/badges/j8r/crystalxd/status.svg)](https://cloud.drone.io/j8r/crystalxd)\n[![ISC](https://img.shields.io/badge/License-ISC-blue.svg?style=flat-square)](https://en.wikipedia.org/wiki/ISC_license)\n\n## Prerequisites\n\n### Setup\n\n[Install the LXD package](https://linuxcontainers.org/lxd/getting-started-cli/)\n\nAdd yourself to the lxd group, so you can run lxc without being root:\n\n`sudo usermod -aG lxd $USER`\n\nThen logout and login again.\n\nBefore running containers, LXD must be configured:\n\n`lxd init --auto --storage-backend btrfs --network-address '[::1]'`\n\nThe default port is `8443` HTTPS.\n\n[Other backends are also available](https://lxd.readthedocs.io/en/latest/storage/#storage-backends-and-supported-functions), depending of the needs.\n\n### Certificates\n\nThe LXD daemon run as root, that's why its API uses [TLS certificates](https://lxd.readthedocs.io/en/latest/security/) for encryption and authentication.\n\nIn this directory, create self-signed certificates:\n```\nmkdir -p certs \u0026\u0026 cd certs\n\nopenssl ecparam -name secp521r1 -genkey -noout -out lxd.key\nopenssl req -new -sha256 -newkey rsa:4096 -key lxd.key -out lxd.csr -subj \"/CN=CrystaLXD specs\"\nopenssl x509 -days 365 -signkey lxd.key -in lxd.csr -req -out lxd.crt\n```\n\nThen add the certificate to the trust store:\n`lxc config trust add lxd.crt`\n\nIf you want to remove one:\n`lxc config trust remove \u003cFINGERPRINT\u003e`\n\n## Documentation\n\nCrystaLXD documentation: https://j8r.github.io/con\n\nThis library is based on the [official LXD REST API document](https://github.com/lxc/lxd/blob/master/doc/rest-api.md).\n\n## Installation\n\nAdd the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  crystalxd:\n    github: j8r/crystalxd\n```\n\n## Documentation\n\nhttps://j8r.github.io/crystalxd\n\n## Usage\n\n```cr\nrequire \"crystalxd\"\n\nCLIENT = CrystaLXD::Client.new(\n  tls: OpenSSL::SSL::Context::Client.from_hash({\n    \"key\"         =\u003e \"certs/lxd.key\",\n    \"cert\"        =\u003e \"certs/lxd.crt\",\n    \"verify_mode\" =\u003e \"none\",\n  })\n)\n```\n\n## Running test specs\n\n`crystal spec`\n\n**Warning**: The specs will try as much as possible to restore the initial LXD state,\nbut there is no guarantees of any kind.\n\n## License\n\nCopyright (c) 2019-2020 Julien Reichardt - ISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcrystalxd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj8r%2Fcrystalxd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcrystalxd/lists"}