Tekashi 6ix9ine will be testifying in front of pretty much everyone except those to whom he's closest -- his family -- because we've learned they're so scared of retaliation, they won't go near the courtroom.

The rapper's immediate family members have decided it's just too risky for them to show their faces when a trial begins for the two men who allegedly had a role in his kidnapping last year. The reason is simple ... Tekashi will be snitching, and they know what happens to snitches.

The fam is especially concerned about members of the Nine Trey Bloods, some of whom will be attending the trial.

We're told his family thinks, at the very least, they'd be harassed, but more likely followed back to their home ... or even outright attacked by Nine Trey members.

Remember, Tekashi was already scared for his family's lives -- despite hiring extra security to guard them -- and it looks like he's following through on that concern now that the day is right around the corner.

As we reported ... prosecutors laid out what Tekashi's going to say on the stand next week, when he'll supposedly name names, connect people to certain incriminating messages ... and implicate himself and other Nine Trey Bloods to a plot on hurting rival rapper Casanova.

Presumably, he'll also get into detail about how he was bankrolling his fellow gang members -- something prosecutors revealed in court docs.

There's obviously a lot on the line ... and Tekashi wants to protect his brood. So, he's going in solo come crunch time.