The 28-year-old has also played for Ipswich Town, Rotherham United, Aldershot Town and Cheltenham Town and is a former Wales U21 internationalist.
Manager Robbie Neilson told the club website: “Troy will add strength, height and physical presence to our defence and I am delighted to have him.”