{"id":18011364,"url":"https://github.com/joaquimley/raspberrypi-headless-setup","last_synced_at":"2025-10-04T05:58:05.279Z","repository":{"id":93731206,"uuid":"272408261","full_name":"JoaquimLey/raspberrypi-headless-setup","owner":"JoaquimLey","description":"Source files for the \"How to setup your headless RaspberryPi\" blog","archived":false,"fork":false,"pushed_at":"2021-05-21T21:41:35.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T13:46:13.957Z","etag":null,"topics":["blog","headless","raspberrypi","things","tutorial"],"latest_commit_sha":null,"homepage":"https://www.joaquimley.com/blog/raspberrypi-headless-setup/","language":"Shell","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/JoaquimLey.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":"2020-06-15T10:24:27.000Z","updated_at":"2023-06-29T04:59:10.000Z","dependencies_parsed_at":"2023-03-20T15:32:33.901Z","dependency_job_id":null,"html_url":"https://github.com/JoaquimLey/raspberrypi-headless-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JoaquimLey/raspberrypi-headless-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoaquimLey%2Fraspberrypi-headless-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoaquimLey%2Fraspberrypi-headless-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoaquimLey%2Fraspberrypi-headless-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoaquimLey%2Fraspberrypi-headless-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoaquimLey","download_url":"https://codeload.github.com/JoaquimLey/raspberrypi-headless-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoaquimLey%2Fraspberrypi-headless-setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278272336,"owners_count":25959524,"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-04T02:00:05.491Z","response_time":63,"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":["blog","headless","raspberrypi","things","tutorial"],"created_at":"2024-10-30T03:09:47.636Z","updated_at":"2025-10-04T05:58:05.247Z","avatar_url":"https://github.com/JoaquimLey.png","language":"Shell","readme":"# Raspberry Pi Headless Setup\n\nCheck the article here for a step-by-step guide:\n\n- https://www.joaquimley.com/blog/raspberrypi-headless-setup/\n\n\n# Setup\n\n1. Insert SD card into your local machine\n2. Flash the SD with the appropriate OS, I recommend using [raspberry-imager](https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility/) (you may need to reconnect your SD card after the flash process)\n3. When the SD write (and verification) is complete, open the terminal\n\n## Enable ssh\n```bash\ntouch /Volumes/boot/ssh\n```\n\n## Add WIFI for headless\n\n### 1. Create the config file\n\n```bash\ntouch  /Volumes/boot/wpa_supplicant.conf\n```\n\n### 2. Add your WIFI details\n\nAdjusting for your [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), network name and network password:\n\nUsing `vscode`:\n```bash\ncode /Volumes/boot/wpa_supplicant.conf\n```\n\nFor example:\n\n```\nctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\ncountry=PT\n\nnetwork={\n\tssid=\"An-example-wifi\"\n\tpsk=\"this_pw_is_fake1\"\n\tkey_mgmt=WPA-PSK\n\tpriority=1\n\tid_str=\"home\"\n}\n\nnetwork={\n\tssid=\"Another-wifi_name\"\n\tpsk=\"anotherFakePassword!\"\n\tkey_mgmt=WPA-PSK\n\tpriority=2\n\tid_str=\"office\"\n}\n\nnetwork={\n\tssid=\"Yet_another\"\n\tpsk=\"super_secret_password\"\n\tkey_mgmt=WPA-PSK\n\tpriority=3\n\tid_str=\"factory\"\n}\n```\n\n### Verify all went well\n\n```bash\ncat /Volumes/boot/wpa_supplicant.conf\n```\n\n# Boot up\n\n1. Eject your SD card\n2. Insert the SD card to your raspi\n3. Connect power source\n4. The LEDs should start flashing, wait for your pi to boot up\n\n### SSH into your pi\n\n```\nssh pi@raspberrypi.local\n```\n\n_Default password for `pi` user is `raspberry`_\n\n-----------------------------\n\n#### Recommended\n\nChange default password\n\n```\nsudo passwd\n```\n\n1. Type your password\n2. Confirm new password\n\nYou should see a message \n```\npasswd: password updated successfully\n```\n\n_If you get an error:_\n\n```bash\npasswd: Authentication token manipulation error\npasswd: password unchanged\n```\n\nIt means the filesystem was mounted as read-only, which prevents changing the password. A way to fix this issue is to remount the filesystem and then to check permissions of `/etc/shadow` file.\n\n```\nsudo mount -rw -o remount /\n```\n\nor\n\n```\nsudo mount -o remount,rw /\n```\n\n### Expand storage\n\n```bash\nsudo raspi-config\n```\n\n  1. Advanced options\n\n  2. Select first option \n  \n```\nA1 Expand File System\n```\n\n#### (Optional) Change your pi's hostname\n\nThis might come in handy for two reasons:\n1. Easily distinguish between devices\n\n2. Easily ssh locally with `ssh pi@your_custom_hostname.local`\n\n```bash\nsudo raspi-config\n```\n\n  1. Network Options\n\n  2. N1 Hostname -\u003e OK\n  \n  3. Set the new hostname\n\n### Remove Bloatware on the Raspberry Pi\n\n```\nsudo curl -fsSL https://raw.githubusercontent.com/JoaquimLey/raspberrypi-headless-setup/master/pi_bloat_remove.sh | sudo bash\n```\n\n### Setup ngrok\n\nI use ngrok to remotely ssh to my pi's. The free account is more than enough for this use case. Beware though, the port is constantly changing and the connections drop fairly frequently, can be a little bit frustrating.\n\n1. Create a free account at https://ngrok.com/\n2. Download  ngrok for `Linux ARM`\n\n```bash\nsudo wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip\n```\n\n3. Configure and start the service on boot using a symlink: https://github.com/JoaquimLey/ngrok-install\n\n### Install git\n\n```bash\nsudo apt-get install git\n```\n\n\n### Update packages to the latest version\n\n```bash\nsudo apt-get update \u0026\u0026 sudo apt full-upgrade\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaquimley%2Fraspberrypi-headless-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaquimley%2Fraspberrypi-headless-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaquimley%2Fraspberrypi-headless-setup/lists"}