{"id":23858782,"url":"https://github.com/tthebc01/cloud-in-a-box","last_synced_at":"2025-10-13T16:08:07.196Z","repository":{"id":37272338,"uuid":"492612118","full_name":"TtheBC01/Cloud-in-a-Box","owner":"TtheBC01","description":"Docker stack template with form-based login, browser IDE, resource monitoring, and object storage.","archived":false,"fork":false,"pushed_at":"2024-05-18T18:01:26.000Z","size":6562,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T16:06:31.020Z","etag":null,"topics":["caddy2","cadvisor","docker","glances","grafana","ipfs","prometheus-metrics","supervisord","theia-ide"],"latest_commit_sha":null,"homepage":"http://toddchapman.io/Cloud-in-a-Box/","language":"Dockerfile","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/TtheBC01.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":"2022-05-15T21:50:48.000Z","updated_at":"2024-10-30T16:42:07.000Z","dependencies_parsed_at":"2025-01-03T03:19:26.062Z","dependency_job_id":null,"html_url":"https://github.com/TtheBC01/Cloud-in-a-Box","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/TtheBC01/Cloud-in-a-Box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TtheBC01%2FCloud-in-a-Box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TtheBC01%2FCloud-in-a-Box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TtheBC01%2FCloud-in-a-Box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TtheBC01%2FCloud-in-a-Box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TtheBC01","download_url":"https://codeload.github.com/TtheBC01/Cloud-in-a-Box/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TtheBC01%2FCloud-in-a-Box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016062,"owners_count":26085798,"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-10-13T02:00:06.723Z","response_time":61,"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":["caddy2","cadvisor","docker","glances","grafana","ipfs","prometheus-metrics","supervisord","theia-ide"],"created_at":"2025-01-03T03:19:18.958Z","updated_at":"2025-10-13T16:08:07.162Z","avatar_url":"https://github.com/TtheBC01.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Alt Text](/demo.gif)\n\n# Cloud-in-a-Box\n\nThis template repository implements a docker stack that can act as your own personal, lightweight, micro-cloud setup. \nThe stack uses the open-source [Theia](https://theia-ide.org/) framework to build a browser-based IDE, similar \nto VSCode, that is served from Docker container. An [authentication layer](https://github.com/greenpau/caddy-security) \nis provided by Caddy and public hosting is handled by [Argo Tunnel](https://www.cloudflare.com/products/tunnel/).\nAdditionally, the IDE and caddy processes are handled by [supervisord](http://supervisord.org/) for process control \nand automatic restarts. \n\nSeveral services are created for monitoring:\n- [glances](https://nicolargo.github.io/glances/) is used for host resource monitoring\n- [cAdvisor](https://github.com/google/cadvisor) provides detailed container metrics\n- [Prometheus](https://prometheus.io/) stores time series data collected from glances and cAdvisor\n- [Grafana]() dashboards are provisioned for visualization of host resource utilization and Caddy Server load\n\nLastly, an [IPFS](https://ipfs.io/) node is included for content delivery and basic object storage functionality. \n\nThis repo is intended to be self-contained in that a developer should be able to use it as a stand-alone tool. However,\nit can also serve as a template project for specialized applications like Web 3.0 infrastructure hosting or remote access\nfor machine learning rigs. \n\n## Requirements\n\n1. [Docker Engine](https://docs.docker.com/engine/install/)\n2. [Docker Compose](https://docs.docker.com/compose/install/)\n\n## Building\n\nTo build the IDE environment, use the Docker cli:\n\n```\ndocker build -t browser-ide .\n```\n\nIf you want to use your locally built image in the stack, change line 11 in the [`docker-compose.yml`](/docker-compose.yml#L11) file.\n\n## Pre-built Docker Image\n\nA pre-built version of the browser-ide can be pulled from Docker Hub:\n\n```\ndocker pull tthebc01/browser-ide\n```\n\n## Running the Stack\n\nImportant environment variables are configured in the [`.env`](.env) file. \n\n### Step 1: Username and Password\n\nYou should set the `AUTHP_ADMIN_USER` and `AUTHP_ADMIN_SECRET` environment variables in the [`.env`](/.env#L2) file to \nappropriate values to properly setup the form-based login. \n\n### Step 2: Get an Argo Tunnel Token\n\nThis repository is setup to use Cloudflare Argo Tunnels as the introspective tunnel technology for exposing the \nIDE to the wider internet. This could be replaced with something like [NGrok](https://ngrok.com/). Anonymous \n(non-authenticated) tunnels can be supported by tweaking the [Caddyfile](/browser-ide/Caddyfile) appropriately. \n\nYou must have a domain name managed by Cloudflare. Second, you must have Argo Tunnels enabled for \nthe domain's account. Use the [Zero Trust dashboard](https://one.dash.cloudflare.com/) to configure a new \ntunnel and configure your desired subdomain and service address. \n\n![Alt Text](/tunnel-config.png)\n\nWhen you create a new tunnel in the dashboard, it will give you a tunnel token (a long string). Put the tunnel \ntoken in the `.env` file as the value saved in the `TUNNEL_TOKEN` environment variable.\n\n### Step 3: Docker Compose\n\nNow, use the `docker-compose.yml` file to spin up a stack consisting of the browser-ide container, an Argo Tunnel\ninstance, and several monitoring services:\n\n```\ndocker compose up -d\n```\n\nCheck that your tunnel client is running nominally:\n\n```\ndocker logs argo-tunnel\n```\n\nThe URL for your tunnel will be the subdomain you chose for your parent domain managed by your Cloudflare\naccount.\n\n## Docker in Docker\n\nThe browser-ide image includes the `docker.io` package so that the host's docker socket (which is mounted as a volume in \nthe [`docker-compose.yml`](/docker-compose.yml#L6) file) can be manipulated as if the user was logged into the host machine. \nIf you do not require this functionality, you may consider removing the socket mount from this file. \n\n## Configuring IPFS WebUI\n\nTo get the IPFS Web UI to work properly, you'll need to follow the directions on the startup page the first time you click on the \nIPFS service in the auth portal. It will ask you to run the following two commands in the IPFS container (with `example.com` \nreplaced with your public URL):\n\n```shell\nipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"https://example.com\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\"]'\nipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\"]'\n```\n\nTo do this, open a terminal in the IDE and start an interactive session in the IPFS service container:\n\n```shell\ndocker exec -ti ipfs_node /bin/sh\n```\n\nOnce in the interactive shell, run the two commands from above. Now you must restart the IPFS service by running the following command\nin a new terminal:\n\n```shell\ndocker restart ipfs_node\n```\n\n## TODO:\n\n1. Add alerts for Slack\n2. Add GPU support\n3. Make the login form prettier","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftthebc01%2Fcloud-in-a-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftthebc01%2Fcloud-in-a-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftthebc01%2Fcloud-in-a-box/lists"}