{"id":22683860,"url":"https://github.com/jerboaburrow/busser","last_synced_at":"2026-02-05T21:31:38.401Z","repository":{"id":221843712,"uuid":"755448773","full_name":"JerboaBurrow/Busser","owner":"JerboaBurrow","description":"Simply host your corner of the internet in Rust ","archived":false,"fork":false,"pushed_at":"2025-11-02T09:39:00.000Z","size":289,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-02T11:35:41.703Z","etag":null,"topics":["cloud","e2-micro","free-tier","rust","self-hosted","webhosting","website"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/JerboaBurrow.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}},"created_at":"2024-02-10T08:31:49.000Z","updated_at":"2025-11-02T09:08:01.000Z","dependencies_parsed_at":"2024-03-23T11:22:17.088Z","dependency_job_id":"4ecaf58d-0918-4623-9b0d-d069b37a402d","html_url":"https://github.com/JerboaBurrow/Busser","commit_stats":{"total_commits":112,"total_committers":2,"mean_commits":56.0,"dds":0.375,"last_synced_commit":"0a5f5e1006c8199c492ef64e1dfcecc5416820ce"},"previous_names":["jerboaburrow/busser"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/JerboaBurrow/Busser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerboaBurrow%2FBusser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerboaBurrow%2FBusser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerboaBurrow%2FBusser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerboaBurrow%2FBusser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JerboaBurrow","download_url":"https://codeload.github.com/JerboaBurrow/Busser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JerboaBurrow%2FBusser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29135047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T20:50:26.975Z","status":"ssl_error","status_checked_at":"2026-02-05T20:49:26.082Z","response_time":65,"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":["cloud","e2-micro","free-tier","rust","self-hosted","webhosting","website"],"created_at":"2024-12-09T21:14:27.087Z","updated_at":"2026-02-05T21:31:38.374Z","avatar_url":"https://github.com/JerboaBurrow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch3 align=\"center\"\u003eBusser\u003c/h3\u003e\n    \u003cp align=\"center\"\u003e\n        Simply host your corner of the internet in Rust\n        \u003cbr\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cdiv align = \"center\"\u003e\n    \n[![Linux x86_64](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-linux.yml/badge.svg)](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-linux.yml) [![macOS](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-macos.yml/badge.svg)](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-macos.yml) [![Windows](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-windows.yml/badge.svg)](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-windows.yml) \n\n[![aarch64](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-aarch64.yml/badge.svg)](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-aarch64.yml) [![armv7](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-armv7.yml/badge.svg)](https://github.com/JerboaBurrow/Busser/actions/workflows/build-and-test-armv7.yml)\n\n[![Coverage Status](https://coveralls.io/repos/github/JerboaBurrow/Busser/badge.svg?branch=main)](https://coveralls.io/github/JerboaBurrow/Busser?branch=main)\n\u003c/div\u003e\n\n✔️ Quickly host static sites, via free tier cloud services (Google Cloud e2-micro) or a Raspberry Pi!\n\n✔️ Git based content management (with Github webhook integration) with automated checkouts, content re-serving, and sitemap generation.\n\n✔️ Status messages on content updates and hit statistics (Currently via Discord webhook integration)\n\n✔️ URL shortening, e.g. ```/x/y/z/webpage.html``` aliased as ```/x/y/z/webpage```\n\n✔️ Http redirect to https and Https certificates\n\n✔️ IP throttling, and anonymised hit statistics \n\n✔️ Hot :fire: loadable configuration\n\n# Contents\n\n- [Planned features](#planned-features)\n- [Spinning up](#spinning-up)\n    - [Configuration](#configuration)\n- [Free static website hosting example with Google Cloud Free Tier](#free-static-website-hosting-example-with-google-cloud-free-tier)\n___\n\n# Planned features\n\n- Zulip, Slack, etc. webhook integration.\n- Gitlab webhook integration\n- Proxy relaying (e.g. relay POSTS to AWS Lambda based apis)\n- System health status messages.\n- System alerts (user configurable burst events, RAM/DISC usage, etc.)\n\n___\n\n# Spinning up\n\n1. Just create a folder with your ```.html/.css/.js``` and other resources, ```.png, .gif, ...```\n2. Point Busser to it with a config.json\n3. Run it, and that's it!*\n\n\\* you'll need certificates for https, and open ports\n\n## Configuration\n\nThe ```config.json``` specifies key properties of the site and its content\n\n```json\n{\n    \"port_https\": 443,\n    \"port_http\": 80, \n    \"throttle\": \n    {\n        \"max_requests_per_second\": 64.0, \n        \"timeout_millis\": 5000, \n        \"clear_period_seconds\": 3600\n    },\n    \"stats\": \n    {\n        \"path\": \"stats\",\n        \"hit_cooloff_seconds\": 3600,\n        \"save_schedule\": \"0 0 * * * * *\",\n        \"digest_schedule\": \"0 0 0 * * * *\",\n        \"ignore_regexes\": [\"/favicon.ico\"]\n    },\n    \"content\": \n    {\n        \"path\": \"PATH_TO_SITE_FILES\",\n        \"home\": \"PATH_TO_SITE_ROOT_PAGE\",\n        \"allow_without_extension\": true,\n        \"browser_cache_period_seconds\": 3600,\n        \"server_cache_period_seconds\": 3600,\n        \"ignore_regexes\": [\"/.git\", \"workspace\"],\n        \"generate_sitemap\": true,\n        \"message_on_sitemap_reload\": true\n    },\n    \"git\":\n    {\n        \"remote\": \"git@github.com:JerboaBurrow/website.git\",\n        \"branch\": \"main\",\n        \"checkout_schedule\": \"10 * * * * * *\",\n        \"remote_webhook_token\": \"GITHUB_WEBHOOK_SECRET\",\n        \"auth\":\n        {\n            \"key_path\": \"YOUR_KEY_PATH\",\n            \"user\": \"Jerboa-app\",\n            \"passphrase\": \"YOUR_KEY_PASS\"\n        }\n    },\n    \"domain\": \"127.0.0.1\",\n    \"api_token\": \"YOUR_BUSSER_API_TOKEN\",\n    \"notification_endpoint\": { \"addr\": \"https://discord.com/api/webhooks/xxx/yyy\" },\n    \"cert_path\": \"certs/cert.pem\",\n    \"key_path\": \"certs/key.pem\"\n}\n\n```\n____\n\n## GDPR, Cookie Policies, and Privacy Policies\n\n- The IP throttler only stores hashes of an IP and a request path, it is likely not considered identifiable information.\n\n- The statistics collection stores the IP, hit time, path, and counts for each IP-path pair. The IP is stored as a hash value.\n____\n\n## API\n\nCurrently there is an API function to request a statistics digest, the following bash script will perform the request. It is currently limited to only returning stats based on already saved data.\n\n```\n# ./get_stats.sh the_secret_token '{\"from_utc\":\"2024-03-07T08:40:50.948868839+00:00\",\"post_discord\": false}'\nhmac=$(echo -n $2 | openssl dgst -sha256 -hmac $1 | sed 's/SHA2-256(stdin)= //g') \ncurl -v -H 'Content-Type: application/json' -d \"$2\" -H 'api: StatsDigest' -H \"busser-token: ${hmac}\" -X POST https://your.domain\n```\n___\n\n# Free static website hosting example with Google Cloud Free Tier\n\nThe [gcloud free tier](https://cloud.google.com/free?hl=en) [allows for the following instance running 24/7:](https://cloud.google.com/free/docs/free-cloud-features#compute)\n\n```\n    1 non-preemptible e2-micro VM instance per month in one of the following US regions:\n        Oregon: us-west1\n        Iowa: us-central1\n        South Carolina: us-east1\n    30 GB-months standard persistent disk\n    1 GB of outbound data transfer from North America to all region destinations (excluding China and Australia) per month\n\n```\n\nYou will still see costs in the Google cloud console, or savings suggestions. You should recieve free tier discount deductions to nullify these cost completely\n\nThis can be verified by:\n\n1. Navigating to the [Google Cloud Console](https://console.cloud.google.com)\n2. Selecting ```Billing``` form the burger menu (top left as of now)\n3. Selecting ```Cost Table```\n4. In ```Filters``` (right) select ```SKUs```\n5. Type ```e2```\n6. Select the all (e.g. ```16 filtered results```)\n7. Toggle the arrow for you project\n8. Toggle ```Compute Engine```\n9. You should see e.g. ```E2 Instance Core running in Americas``` with ```X.XX```\n10. You should also see e.g.  ```E2 Instance Ram running with free tier discount``` with ```-X.XX```\n\nAs this is a website you may be charged for network costs over the 1 GB outbound data, or for traffic from China and Australia\n\n##### Create it using the CLI...\n\nUsing the gloud cli this command should create an instance template for the free tier, which can be used to create instances\n\n```bash\ngcloud beta compute instance-templates create free-tier-template-http --project=YOUR_PROJECT --machine-type=e2-micro \\\\\n--network-interface=network=default,network-tier=PREMIUM \\\\\n--instance-template-region=projects/YOUR_PROJECT/regions/us-central1 --maintenance-policy=MIGRATE \\\\\n--provisioning-model=STANDARD --service-account=YOUR_SERVICE_ACCOUNT \\\\\n--scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \\\\\n--enable-display-device --tags=http-server,https-server \\\\\n--create-disk=auto-delete=yes,boot=yes,device-name=free-tier-template,image=projects/debian-cloud/global/images/debian-11-bullseye-v20220719,mode=rw,size=30,type=pd-standard \n--no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any\n```\n\n##### ...or using Cloud console\n\n- create an e2 in us-central1 (Iowa) for both zone and region\n- select e2-micro (0.25-2 vCPU 1GB memory)\n- you can change the boot disc from 10GB to 30GB if you like\n- allow HTTPS and HTTP (if you need it for certificate provising)\n- all else as default\n\n#### Network\n\nMake sure 443 and 80 are open ports (or whatever ports you wish to serve on)\n\n### https certificate setup\n\n#### Self signed (useful for localhost testing)\n\n- You can use the bash script ```certs/gen.sh``` to generate a key/cert pair with openssl\n\n#### Production; from authority\n\n- get a domain (e.g. from squarespace)\n- create a custom DNS record, e.g.\n    - ```your.domain.somewhere    A\t1 hour\tgoogle.cloud.instance.ip ```\n- Use [Let's Encrypts](https://letsencrypt.org/) recommendation of [certbot](https://certbot.eff.org/) it really is very easy\n    - Something like ```sudo certbot certonly --standalone -d your.domain.somewhere -d sub.your.domain.somehwere```\n    - You will need to enable http in the cloud instance firewall for provisioning as well as https\n\n#### Spinning up\n\nEither: Run at login, root may be required for certificates (should be for certbot ones)\n  \nOr: Use a service file in ```/lib/systemd/system```, e.g\n\n```\n[Unit]\nDescription=Busser\n\n[Service]\nExecStart=busser -d\nWorkingDirectory=/home/busser\nUser=root\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen start and monitor it with\n\n```sudo systemctl start busser.service``` and ```sudo journalctl -e -u busser.service```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerboaburrow%2Fbusser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerboaburrow%2Fbusser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerboaburrow%2Fbusser/lists"}