Second half goals from Ben Hughes and Ali Randles secured Penyffordd their first three points of the season.
The first half was very nip and tuck with both sides struggling to stamp their authority on the game.
Chances were limited to both sides from long range shots which were dealt with by the keepers.
The Lions started the second half on the front foot and were rewarded when some good play down the right side led to Luke Peters crossing for striker Hughes to head in.
Coedpoeth then started to take chances and put pressure on the Lions back-line, forcing Jamie Griffiths into a good one-on-one save.
Penyffordd made the game safe on 72 minutes with a headed goal from Randles via a Liam Hughes corner.
Hughes hit the crossbar as the Lions continued to push forward but could not add to their tally.
The Lions are proudly sponsored by Red Lion Penyffordd and Coffee King for the 2023/2024 season.
Revenge for Casty over a Lex outfit which had beaten them 4-0 in the FAW Trophy last weekend.
The league fixture on Wednesday night saw the Law take an 11th minute lead through Tom Huxley, Kian Davies with the assist.
Colts levelled on 20 when Nathan Davies applied the finish after Ben Bailey set him up.
It was 1-1 at half time, but just past the hour Casty edged ahead through a goal from substitute Kacper Wojciech, Dain Smith assisting.
And Wojciech made it 3-1 in the 83rd, the 20-year-old Pole benefiting from the good work of fellow sub Allister Belk.
Ben Pritchard replied six minutes into added time for Lex, but it was too late to save themselves.
Rhostyllen went top of the table on goal difference after an impressive result at last season’s champions Queen’s Park, who are still without a win in three matches.
Aayron Rafferty put the visitors 1-0 up in the 41st minute and soon after the Park’s experienced campaigner Tony Jones was red-carded.
Tom Douglas doubled the away score on 63 minutes and Zak Dobie made it three not long after.
Hat-trick hero Harry Massey banked the points for unbeaten hosts Overton.
Massey made the breakthrough from a 35th minute penalty and it stayed 1-0 up to half time.
After the break Massey netted on 67 and 88 minutes to complete the job.
The result put Overton second, level on points with Acton, who head the table on goal difference.
It's a big Flintshire welcome to Poppy Smith. Picture: FLINT TOWN UNITED FC Flint Town…
Megan Skelly-Robinson Llangefni Town have strengthened their goalkeeping options by signing a second top-class stopper.…
Ellie shoots for goal. ALL PHOTOS: DAI SINCLAIR - DIOLCH DAI She's been there since…
Often the definition of a successful pre-season for a football club is as much about…
Samantha WiIliams, of IWT, with headteacher Arwel Owen and Ysgol Bro Dyfrdwy pupils ANOTHER GREAT…