Gallagher first joined PNE in 2007, signing on loan from Blackburn Rovers where he started his career.
He went on to have loan spells at Stoke and Plymouth before joining Leicester City in a permanent deal.
It was as a Leicester player that Gallagher returned to Deepdale on loan in October 2013.
He stayed on loan for more than a season-and-a-half, with him in the side which won the League One play-off final at Wembley in May 2015.
After promotion Gallagher signed a permanent deal with North End and he's been here ever since.
In total he made 313 appearances in a PNE shirt, even pulling on the goalkeeper's jersey and gloves against Ipswich in November 2018.
He combined playing and coaching earlier in the season before joining the staff when Frankie McAvoy took the interim head coach job.
McAvoy landed the head coach job on Monday and now Gallagher will focus on a coaching role.