The 47-year-old former SAS soldier was sensationally arrested on April 7 and charged with murdering or ordering the murders of five unarmed detainees while deployed in Afghanistan between 2009 and 2012.
The Victoria Cross recipient made his successful application for bail at Sydney's Downing Centre Local Court on Friday despite a judge hearing he had made moves to relocate overseas.
Roberts-Smith wore prison-issued green clothing and watched by audiovisual link from Silverwater prison.
In front of a packed public gallery which included the former soldier's parents, Judge Greg Grogin approved the bail bid, saying the strict conditions mitigated any risk.
The judge noted the consequences if Roberts-Smith approached any prosecution witnesses.
"His arrest would come very swiftly and he would find himself once again donned in green."
The ex-SAS soldier would have been hampered in his ability to defend the case from prison which did not have facilities for the secure transport, storage and discussion of highly classified defence material.
"It's not a matter of sitting in the legal box at a jail and talking about a matter which may be before the courts," Judge Grogin said.
Roberts-Smith would spend years in custody before a trial would occur, the judge noted.
A surety of $250,000 will be forfeited to the court if Roberts-Smith does not comply with his bail conditions.
He will be allowed to travel from his Queensland residence to Sydney and Perth solely to consult with his legal team.
Earlier on Friday, defence barrister Slade Howell said his client would comply with stringent bail conditions despite previous Federal Court findings he had threatened or interfered with witnesses.
While the former SAS soldier had been making plans to relocate overseas, he was not a flight risk, the barrister said.
Mr Howell highlighted the exceptional nature of a highly respected soldier such as his client facing five counts of war crime murder in a civilian court.
He argued that a superior court may have to consider whether the extraordinary publicity surrounding the case has made it impossible for the 47-year-old to have a fair trial.
Crown prosecutor Simon Buchen SC unsuccessfully opposed bail, saying the charges against Roberts-Smith were gravely serious.
The case against Roberts-Smith was strong, and there were eyewitnesses to the alleged murders, Mr Buchen said.
There was also evidence of the use of throw-downs, he said.
Throw-downs are objects placed onto deceased non-combatants to make it seem like they had taken part in hostilities.
While he acknowledged that bail conditions would prevent the 47-year-old from fleeing the country, the prosecutor said they could not prevent the risk of witness tampering.
Evidence that emerged in the Federal Court defamation trial included threatening witnesses, distorting evidence and using burner phones to evade authorities, he said.
An interim non-publication order has been made over the address Roberts-Smith will reside at on bail plus the police station he will report to.
There was a real chance that people with strong opinions could use the opportunity to harm Roberts-Smith or those with him, Judge Grogin said.
A full hearing on these orders will take place on Thursday.
The 47-year-old has been accused of directly murdering two Afghan individuals and aiding, abetting or procuring the murder of three more.
He has consistently proclaimed his innocence.
War crime allegations against Roberts-Smith were first exposed by the now Nine-owned Fairfax Media in 2018.
The war veteran sued for defamation in the Federal Court but suffered a crushing defeat with a judge finding the accusations of murder were, on the balance of probabilities, true.
He failed to overturn these findings on appeal to the full Federal Court and the High Court.