1/4 inch ratchet, and extension, and a deep well 12mm(14), I can't remember which. It's NOT that hard. With the correct tools.
It's 12 mm socket size. I managed the nut with a 1/2" drive ratchet (with adapter to 3/8", a long 12 mm socket, and maybe a 1.5" extension. The ratchet wrench was about 18" long, but more importantly, had a swivel head, which allowed to me to snake it in through the mess of cables. For the associated stud removal, a 1/4" ratchet wrrench with an E8 Torx socket. And that was one sweaty click at a time, took about 15 minutes.
I bought a 12-inch-long 1/4” drive ratchet because I couldn’t get enough leverage with a short-handle ratchet. A 1.5” extension is ideal. I got the nut started with a 2” extension, then switched to a 1/4” swivel when I ran out of room. The 2” extension worked fine with the E8 torx socket for taking out the stud. Having the right tools changes the job from impossible? to hard.
Leave that nut off; once is enough to deal with that. Good to remove (and leave off) the stud at that location too, with the e8 torx socket (needed for the stud through the EGR valve as well. Note: if you also remove the stud at the lower egr bracket location, you will not need to remove the studs at the rear cooler to exhaust manifold connection. You do need to loosen the bracket and tube above the EGR components, for a little wiggle room.