There are several ways to tackle the problem depending on how much space you have inside vs how small you want to thing to be. If you have the $$$ you can find RTC pots. The first place I looked in my own quest was with RC paddle controllers. But I found two different types, the el-cheapo models where the controller itself was the RTC mechanism. Bleh. The second type was the kind with actual self contained RTC pots. but these were absurdly expensive to buy by themselves. It would've been cheaper just to buy a high-ish end controller and yank the pot from that. I looked elsewhere but it was generally the same. RTC pots are pricey. So I started building my own (I ended up not using pots so it was all moot but I still have the design sketches).
I don't know how much space you have to work with but you can try something along these lines.
In a nutshell, you're going to take your pot and slip on a horn, arm, hub or some variation. They'll look something like the type
used for servos but sized for your chosen pot. They're reasonably easy to make, kind of a PITA to permanently attach to the shaft though. But I digress. Slip your horn over the shaft then install into your panel as appropriate with the nuts. The next part takes a bit of experimentation. You'll need to find a spring or two with just the right tension so that there is enough slack for the spring to "give" when it goes against, but with enough spring that it will pull against the arm in the opposite direction. You'll also need to anchor the springs somewhere inside the box.
That's the basic mechanism. I've seen several variations on this. I think X's version used a wooden dowel and a single eyelet and spring to get RTC behavior. Another version used a piece of string tensioned between two springs and two tensioners. Very nice. Then complexity easily ramps up from there, involving gears, chains, or whatever. But the basic principle is always the same.
Note: it will be very difficult to get much more than 180 degrees (or thereabouts) with just a basic method of using the arm. You'll need to resort to a gear or chain system and leverage useful ratios to get beyond this limitation. It wasn't an issue with my own project so I never looked beyond this.
It's doable.
Good luck
