[Answered] How to install Debian on Raspi 4 2GB Headless - For email server

3 years ago by promitheas to c/selfhosted

Hey guys, I would like to install Debian on my raspberry pi 4 model B 2gb, but I dont have a micro HDMI. I would like to install it headless. I watched a video where the guy created some files in the boot partition on the SD card to enable SSH, and I was wondering if I can do something similar with a Debian SD so I dont need to go out and buy a cable.

I couldn't find too many tutorials for Debian on the pi, and none to install it headless.

Thanks in advance!

Edit 1: I ended up going with raspbian lite because of some other issues that came up.

load all comments
psyonity 4 points 3 years ago

In case of Raspbian, you can create a wpa_supplicant.conf in the boot partition with:

network={
    ssid="testing"
    psk="testingPassword"
} 

and a empty ssh file.

For the user config, since bullseye you need to make an account on first boot, that can be done with a userconf file, but it's a bit more involved. You can see how to do it at the end of This blog post

path: 0 206936, hotness: undefined, score: 4, children: 4
promitheas 2 points 3 years ago

Im planning on putting debian on it, so I think its slightly different because e.g. theres no raspberry pi user

path: 0 206936 207101, hotness: undefined, score: 2, children: 3
psyonity 3 points 3 years ago

If you're planning on using plain Debian and the challenges that come with it, you probably should start with one of the pre-built images from the Debian foundation. You can mount the root partition with either a running linux box or WSL2. Then you can chroot into it to setup the wpa_supplicant.conf in the /etc/ folder and ensble sshd.

path: 0 206936 207101 207568, hotness: undefined, score: 3, children: 1
haych 2 points 3 years ago

Why not use Raspberry Pi OS? It's based off of Debian.

path: 0 206936 207101 207284, hotness: undefined, score: 2, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
63103
6834
6313

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...