{"id":13401434,"url":"https://github.com/dobin/lxd-webgui","last_synced_at":"2025-07-15T06:32:21.794Z","repository":{"id":70330105,"uuid":"54184300","full_name":"dobin/lxd-webgui","owner":"dobin","description":"A lightweight web frontend for LXD","archived":false,"fork":false,"pushed_at":"2018-12-10T08:42:15.000Z","size":958,"stargazers_count":170,"open_issues_count":26,"forks_count":29,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-07-31T19:29:14.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dobin.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}},"created_at":"2016-03-18T08:03:25.000Z","updated_at":"2024-06-06T23:00:24.000Z","dependencies_parsed_at":"2023-04-27T20:31:46.697Z","dependency_job_id":null,"html_url":"https://github.com/dobin/lxd-webgui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobin%2Flxd-webgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobin%2Flxd-webgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobin%2Flxd-webgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobin%2Flxd-webgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dobin","download_url":"https://codeload.github.com/dobin/lxd-webgui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226023408,"owners_count":17561456,"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":[],"created_at":"2024-07-30T19:01:02.607Z","updated_at":"2024-11-23T09:19:20.129Z","avatar_url":"https://github.com/dobin.png","language":"JavaScript","funding_links":[],"categories":["UI","JavaScript"],"sub_categories":[],"readme":"# Description\n\nA lightweight web management web interface for LXD.\n\nWritten completely in AngularJS. Does not need an application server, database or other backend services. Just serve the static HTML and JS files and go!\n\n# Status\n\nThis software is beta.\n\n## Browser support\n\nWorks best in Chrome. Works in Firefox. Safari is currently not supported.\n\n# Screenshot\n\n![Screenshot](/doc/screenshot-overview.png?raw=true \"Screenshot\")\n\n# installation\n\nThe installation procedure is as follows:\n- Install LXD (if not already happened)\n- Install LXD-WEBGUI\n- Create a client certificate and install it into the browser, and lxd\n- Configure lxd to listen to localhost/network\n\n\n## Install LXD itself\n\ninstall lxd as described here:\n - https://linuxcontainers.org/lxd/getting-started-cli/\n - https://www.stgraber.org/2016/03/15/lxd-2-0-installing-and-configuring-lxd-212/\n\nMy lxd init looks like this:\n```\n$ sudo lxd init\nName of the storage backend to use (dir or zfs): zfs\nCreate a new ZFS pool (yes/no)? yes\nName of the new ZFS pool: lxdpool\nWould you like to use an existing block device (yes/no)? no\nSize in GB of the new loop device (1GB minimum): 16\nWould you like LXD to be available over the network (yes/no)? no\nLXD has been successfully configured.\n```\n\n## Install LXD-WEBGUI\n\n### Prerequisites\n\nInstall npm, bower and a simple http server:\n```\n$ sudo apt-get install npm\n$ sudo npm install -g bower\n$ sudo npm install -g http-server\n```\n\n### checkout LXD-WEBGUI\n\n```\n$ git clone https://github.com/dobin/lxd-webgui.git\n$ cd lxd-webgui\n```\n\n\n### Dependencies\n\ninstall web dependencies for lxc-gui:\n```\nlxd-webgui$ bower install\n```\n\n### HTTP server\n\ncreate certs for the http server:\n```\nlxd-webgui$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes\n```\n\n\nstart http server to serve lxd-webgui:\n```\nlxd-webgui$ http-server -S -a localhost -p 8000\n```\n\nOf course you can just put the file to be served via Apache (/var/www) or any other web server.\nThey are just static files.\n\n## lxd configuration\n\n### certs\n\nCreate a self-signed cert to authenticate to LXD:\n\n```\n$ cd ~/\n$ mkdir lxc-cert\n$ cd lxc-cert\n$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes\n```\nContent of certificate (CN, AU etc.) does not really matter, but should contain something\nlike \"LXD\" so you are able to select the correct cert when prompted.\n\nConvert cert to pkcs12:\n```\n$ openssl pkcs12 -export -out cert.p12 -inkey key.pem -in cert.pem\n```\n\nNow, add the PKCS12 cert.p12 to your browser, or your OS:\n```\n Chrome: \"Settings\" -\u003e \"Manage Certificates\" -\u003e  \"import\" -\u003e select the .p12 from above\n Firefox: \"Preferences\" -\u003e \"Advanced\" -\u003e \"Certificates\" -\u003e \"View Certificates\" -\u003e \"(Your Certificates)\" -\u003e \"Import\"\n```\n\nInternet Explorer / Edge and Chrome will use the Windows/OSX certificate store. Firefox has its own certificate store.\n\n\n## lxd configuration\n\nMost importantly, we have the add the above client certificate\n(~/lxd-cert/cert.pem) into the trusted certs of lxd:\n```\n$ sudo lxc config trust add cert.pem\n```\n\nConfigure LXD to listen to localhost on port 9000, and allow access from localhost port 8000 (where LXD-WEBGUI lives). We also have to configure LXD to accept the PUT, DELETE and OPTIONS HTTP headers, and fix allowed headers to  include \"Content-Type\".\nAfterwards, we NEED to restart it atm.\n\n```\n$ sudo lxc config set core.https_address 127.0.0.1:9000\n$ sudo lxc config set core.https_allowed_origin https://localhost:8000\n$ sudo lxc config set core.https_allowed_methods \"GET, POST, PUT, DELETE, OPTIONS\"\n$ sudo lxc config set core.https_allowed_headers \"Origin, X-Requested-With, Content-Type, Accept\"\n$ sudo lxc config set core.https_allowed_credentials \"true\"\n$ sudo lxd restart\n```\n\n## LXD-WEBGUI network access\n\nIf you want to access LXD-WEBGUI via the network, configure LXD to listen\nto the network with:\n```\n$ sudo lxc config set core.https_address \u003cyour-ip\u003e:9000\n$ sudo lxc config set core.https_allowed_origin *\n```\n\nThis will allow anyone with a valid client cert to access the LXD API.\nYou'll have to import the client certificate (p12) into the browser which\nyou are using to access LXD-WEBGUI.\n\nYou can specify the LXD API server in the \"Settings\" tab in LXD-WEBGUI.\n\n\n## start\n\nimportant:\ntry to access lxd API: https://localhost:9000\n(and accept the certificate warning)\n\n\naccess LXD-WEBGUI: https://localhost:8000\n\n\n# FAQ\n\n## Whats up with all the certs?\n\nLXD provides a REST based API via HTTPS webserver (here :9000). This webserver needs a server certificate.\n\nLXD-WEBGUI is served via HTTPS via a webserver. This also needs a server certificate.\n\nThe authentication to the LXD API is performed via a client certificate. This certificate is stored in the\nbrowser of the user. LXD-WEBGUI performs HTTP requests to the API, which is authenticated via this client cert.\n\n\n# security considerations\n\nDo not let any other application run on the same domain+port as LXD-WEBGUI.\n\nThere is no CSRF protection for the LXD REST service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobin%2Flxd-webgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdobin%2Flxd-webgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobin%2Flxd-webgui/lists"}