Updated

All Bernard Madoff needed was two friends.

But the alleged perpetrator of one of the biggest Ponzi schemes in history couldn't find two pals to guarantee his $10 million bail on Wednesday, so the judge in his case added a raft of new bail provisions to keep the former Wall Street legend on a tight leash.

Click here for photos.

U.S. District Court Magistrate Judge Gabriel Gorenstein ordered nightly house arrest for the disgraced investor, who must now keep a 7 p.m. to 9 a.m. curfew in his Manhattan apartment. Madoff was ordered to wear an ankle-monitoring bracelet at all times, and his wife, Ruth, was told to surrender her passport by noon Thursday.

Though Gorenstein then canceled a scheduled Wednesday hearing after Madoff and the government agreed to the new terms, the fallen financier made a surprise appearance in court anyway.

Click here to read the case. (pdf)

He said nothing to reporters as he walked out of the building. It wasn't clear why he was at the courthouse after the judge ruled he didn't have to be.

"In light of this order and the agreement of both the defendant and the government to the changes in the bail conditions, there is no need for a further hearing on bail today," the judge said earlier Wednesday in his written order. "Accordingly, the hearing is canceled."

Madoff had been ordered to find four co-signers to his $10 million bail, but his lawyers were sent scrambling when the alleged sultan of swindle struck out. Two co-signers will now suffice, according to court documents, and Madoff's lawyers will have until Monday to come up with additional paperwork.

Only Madoff's brother Peter and wife Ruth have cleaved to their kin and guaranteed the eight-figure Bernie bailout. Not even Madoff's sons have come forth to sign, and small wonder: they're the ones who turned their father in to federal investigators before his arrest last Thursday.

Madoff remains free on bail, but the one-time investing wizard has nowhere to go. He has already surrendered his passport, and he faces worldwide scorn for organizing what investigators say was a $50 billion pyramid scam.

Madoff 's crash has left investors, charities and banks in ruin around the globe after he admitted to prosecutors his investment plans were "all just one big lie" and "basically a giant Ponzi scheme."

The Associated Press contributed to this report.