{"id":18743264,"url":"https://github.com/anthonybudd/camera-spike","last_synced_at":"2025-04-12T21:32:14.413Z","repository":{"id":130731544,"uuid":"427054973","full_name":"anthonybudd/Camera-Spike","owner":"anthonybudd","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-16T04:30:19.000Z","size":7984,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:43:08.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/anthonybudd.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":"2021-11-11T15:42:58.000Z","updated_at":"2021-11-21T04:04:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e6e876a-ec81-4923-9ef4-79476f91cdcd","html_url":"https://github.com/anthonybudd/Camera-Spike","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/anthonybudd%2FCamera-Spike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FCamera-Spike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FCamera-Spike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FCamera-Spike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonybudd","download_url":"https://codeload.github.com/anthonybudd/Camera-Spike/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248635485,"owners_count":21137242,"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-11-07T16:10:49.594Z","updated_at":"2025-04-12T21:32:14.394Z","avatar_url":"https://github.com/anthonybudd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/anthonybudd/camera-spike/raw/master/docs/img/header.png\" alt=\"Header\"\u003e\n\u003c/p\u003e\n\nCamera Spike is a basic self-hosted security camera project for the Raspberry Pi. A web UI is proxied over Tor using [anthonybudd/nginx-tor-proxy](https://github.com/anthonybudd/nginx-tor-proxy), this allows you to remotely monitor the feed without needing to register the device with a 3rd-party or without disclosing your IP address or the IP address of the Camera Spike. CLI tools are provided so you can easily create a custom Onion v3 address using [cathugger/mkp224o](https://github.com/cathugger/mkp224o).\n\nCreated By [Anthony C. Budd](https://github.com/anthonybudd)\n\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/anthonybudd/Camera-Spike/raw/master/docs/img/screenshot.png?v=2\" width=\"500\" alt=\"screenshot\"\u003e\n\u003c/p\u003e\n\nThe web UI is just [a single .html file](https://github.com/anthonybudd/Camera-Spike/blob/master/src/ui/index.html) with only two local dependencies Vue.js and Axios. This simplicity and minimalism is by design, allowing the user to easily audit the code. Currently there is only basic auth implemented on the route to request the frames for a specific day, the endpoints for returning the actual image data and the HTML for the web UI are not secured. I will address this in a later version, however the onion address does provide some _secuirity by obscurity_.\n\n\n## Set-up\nIt is recommended that you use a fresh installation of Raspberry Pi OS. You will need to manually enable the camera by clicking on `Main Menu -\u003e Preferences -\u003e Raspberry Pi Configuration -\u003e Interfaces`\n\n```sh\ngit clone https://github.com/anthonybudd/Camera-Spike.git\ncd Camera-Spike\n./install.sh # Installs docker, docker-compose and clones anthonybudd/nginx-tor-proxy\ncp .env.example .env\nsudo crontab -e # @reboot bash /home/pi/Camera-Spike/start.sh\n\n# Set USERNAME and PASSWORD\nsed -ie 's#USERNAME=.*#USERNAME=\"'u$(openssl rand -hex 5)'\"#g' .env\nsed -ie 's#PASSWORD=.*#PASSWORD=\"'$(openssl rand -hex 15)'\"#g' .env\ncat .env | grep 'USERNAME\\|PASSWORD' # This is your username and password\n\n# Create Onion Address\ndocker-compose build\ndocker run -ti --entrypoint=\"mkp224o\" -v $(pwd):/tor camera-spike_nginx-tor-proxy -n 1 -S 10 -d /tor ^cs\nsudo mv *.onion nginx-tor-proxy/web\nsudo chown -R $USER nginx-tor-proxy\nsed -ie 's#example-app#'\"camera-spike\"'#g' nginx-tor-proxy/nginx/tor.conf\nsed -ie 's#xxxxx.onion#'\"$(cat nginx-tor-proxy/web/hostname)\"'#g' nginx-tor-proxy/nginx/tor.conf\nsudo chown -R root nginx-tor-proxy\nsudo chmod 700 nginx-tor-proxy/web\ncat nginx-tor-proxy/web/hostname # This is the onion address of the Camera Spike\n\n./start.sh\n```\n\nYou will see that the command to create an onion address has `^cs` at the end. This argument is used to create a vanity onion address, this will create an onion address that starts with `cs` so the full onion address will look like `csw6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion`. See [this](https://github.com/cathugger/mkp224o/blob/74a13ae5c0ecd26c5bca8ea35edb00a649719ff2/main.c#L400) for more info on the [mkp224o](https://github.com/cathugger/mkp224o) arguments.\n\n## Hardware\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/anthonybudd/camera-spike/raw/master/docs/img/pi-with-camera.png\" width=\"300\" alt=\"Pi with camera\"\u003e\n\u003c/p\u003e\n\n- [Raspberry Pi 3](https://www.amazon.com/CanaKit-Raspberry-Complete-Starter-Kit/dp/B01C6Q2GSY/) or [4](https://www.amazon.com/CanaKit-Raspberry-4GB-Starter-Kit/dp/B07V5JTMV9) (I'm using a Pi 3)\n- [Raspberry Pi Camera Module](https://www.amazon.com/dp/B07M9Q43MX)\n- [128GB USB Flash Drive](https://www.amazon.com/dp/B07BPG9YX9) (optional)\n\n\n### USB Storage\nBy default Camera Spike will save all frames to `./images` you can change this by modifying the `MEDIA_PATH` variable in the .env file. However I recommend that you use USB storage. \n\nTo auto-mount a USB flash drive to a specific path run the following commands.\n```\nsudo apt-get install -y exfat-fuse ntfs-3g\nsudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL\n\nsudo nano /etc/fstab # Add line \"UUID=XXXX-XXXX /mnt/camera-spike-usb exfat defaults,uid=1000,gid=1000 0 0\"\n\nnano .env # Edit \"MEDIA_PATH=/mnt/camera-spike-usb\"\n```\n\n\n## ToDo\n- Auth For Images\n- Auto Refresh\n- Add count to header","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonybudd%2Fcamera-spike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonybudd%2Fcamera-spike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonybudd%2Fcamera-spike/lists"}