New Hibernian boss Alan Stubbs will take his side to Ibrox to play Rangers in the first round of the Petrofac Training Cup.
Holders Raith Rovers face a Fife derby against Dunfermline Athletic at East End Park while Heart of Midlothian take on Annan Athletic at Tynecastle.
Local rivals Airdrieonians and Albion Rovers meet at the Excelsior Stadium and there's another derby match at Ochilview, where East Stirlingshire entertain Falkirk.
Morton have home advantage against Lowland League winners Spartans and Stenhousemuir travel to Highland League champions Brora Rangers.
Arbroath v Alloa Athletic
East Fife v Forfar Athletic
Montrose v Peterhead
Elgin City v Stirling Albion
Dunfermline Athletic v Raith Rovers
Cowdenbeath v Brechin City
East Stirlingshire v Falkirk
Brora Rangers v Stenhousemuir
Queen's Park v Berwick Rangers
Rangers v Hibernian
Stranraer v Dumbarton
Heart of Midlothian v Annan Athletic
Airdrieonians v Albion Rovers
Queen of the South v Livingston
Morton v Spartans
Clyde v Ayr United
Ties are due to be played on the weekend of July 26 but the Rangers v Hibernian match will be rescheduled due to Glasgow 2014.