Keates made over 150 league appearances for Wrexham and captained the club to an FA Trophy win in 2013.
The 38-year-old, along with Joey Jones and Andy Davies, had been in temporary charge of the National League club after Gary Mills was sacked on 13 October.
"Dean is a man with an excellent pedigree in football," the club said.
"He is someone who knows all about Wrexham AFC and the fans expectations and someone who has a real passion for the club.
"We believe has the knowledge, the drive and the determination to bring lasting success to the Club as we build for a successful future."
His first game in charge as permanent manager will be the home National League game against Barrow on Tuesday.
Keates, who started his career with hometown club Walsall, also played for Hull City, Kidderminster Harriers, Lincoln City, Peterborough United and Wycombe Wanderers.
He joined Wrexham in the summer of 2010 and after five seasons at the Racecourse left in 2015 before a spell with Rhyl in the Welsh Premier League and more recently played at Rushall.

2 June 2017 Last updated at 08:09 BST
Although kids aren't able to vote, the decisions made in the election will have a big impact on the lives of all children across the country.
But with so many different political parties competing with each other, we're giving you the lowdown on the main ones.
Find out all you need to know about the Labour Party in Newsround's 60-second guide.

The body, believed to be that of Victoria Cherry, 44, of Fulwood, Lancashire, was found by Greater Manchester Police at a house in Toronto Street, Bolton, on Monday.
It was discovered following the earlier arrest of a 43-year-old man on suspicion of murder.
Ms Cherry has not been seen since October 2015.
Det Ch Insp Terry Crompton said: "We are continuing to support Victoria's family as they deal with this devastating news.
"The arrested man remains in custody, but I'm urging anyone with any information that would help our enquiries to get in touch.
"If you have information about Victoria's whereabouts since her disappearance in 2015, or if you hold any information about the events leading up to our discovery, please contact us as a matter of urgency."
Wrexham have appointed former midfielder Dean Keates as their new manager on an 18-month contract.
[NEXT_CONCEPT]
There's a general election coming up on 8 June, when adults will vote to decide who will run the UK.
[NEXT_CONCEPT]
Police investigating the suspected murder of a woman missing for 15 months have discovered a body.