Skip to content

Mini PC setup

Created: 2023-12-15 19:41:10 -0800 Modified: 2023-12-15 21:28:22 -0800

(kw: “power on boot”) (note: this requires a keyboard and monitor)

Set the machine to turn on as soon as power is received by following these instructions:

  • Boot up the machine
  • Go to UEFI firmware settings (shouldn’t need to press a key for this since a menu should show up with what to boot into, but if you do, it’s delete)
  • Choose Chipset → PCH-IO Configuration → State after G3 → Set to S0 State
  • Save and exit

Note that sudo shutdown now will still permanently power off the device; it’s just when you plug in AC power that the machine will boot (meaning it’ll turn itself back on after a power outage).

(note: this requires a keyboard and monitor)

  • Download a net-install version of Debian, e.g. 12.4.0-amd64
  • Install onto USB stick with these instructions (that includes converting the ISO to an IMG file)
  • Plug the USB drive in.
  • Go to the UEFI boot settings (just ignore Grub if you have the UEFI options)
    • Go to the “Save & Exit” menu, and under “Boot Override”, choose the USB drive
  • Choose “Install” on the Debian menu. Use defaults for everything except:
    • Hostname: mini-pc-beelink
    • Root password (use weak password just while setting it up since we’ll change it later)
    • Full name for the new user: adam
    • Username for your account: adam
    • Password for new user (use a weak password just while setting it up since we’ll change it later)
    • “Choose software to install”
      • ❌ Debian desktop environment (no need)
      • ✅ SSH server
      • ✅ standard system utilities
  • Remove USB drive
  • Reboot
  • Log in
  • Get SSH set up so that we can ditch the keyboard
    • Switch user to root: su
    • vi /etc/ssh/sshd_config
    • Search for PasswordAuthentication and enable it
    • Run systemctl restart sshd
    • Type ip a to get local IP address
    • Then, from macOS:
      • ssh-copy-id adam@
    • Then you can SSH with ssh adam@
    • Then, after you’re able to SSH, disable PasswordAuthentication
      • vi /etc/ssh/sshd_config
      • systemctl restart sshd
  • At this point, you can disconnect the keyboard and display since SSH should be working.

Remaining setup if you want to do this manually and not with Ansible or something

Section titled Remaining setup if you want to do this manually and not with Ansible or something
  • Set a static IP through the router. If my current router doesn’t support this, then set it through the machine itself.
  • Add yourself to sudo and install a bunch of stuff
    • su -
      • (this starts a login shell so that you’ll have the right environment, otherwise usermod won’t be usable)
    • usermod -aG sudo adam
    • Change to strong passwords for “root” and “adam” now: passwd (use a password manager)
    • Note: this next step is done by Ansible, but feel free to run it anyway:
      • apt install sudo btop htop screen curl git vim unzip build-essential

I use Ansible to set up the machine for Abbott (see the scripts here). At the very least, it can install programs like bat that I use everywhere.

  • Make an inventory.ini:
  • Make a playbook.yml:
- name: Set up mini PC
hosts: minipc
become: yes
- name: Install packages
- sudo
- btop
- ripgrep
state: present
  • Run ansible-playbook -i inventory.ini playbook.yaml -K
    • The password that you provide should be for adam, and adam should be able to run sudo su.