Hi @sbe! Welcome!
What code are you running that produces this error? If the code is written assuming it can access the local machine’s display, you may not be able to use it with RStudio Server. See:
(That post is about RStudio Cloud, but I believe it also applies to RStudio Server, which Cloud uses)