Yeah there’s a bit of scope to review what op is doing here.
Why is there even a DE on a server if it’s headless. If it’s not headless why not write up some Dockerfiles and manage it from a non-root account?
Are the services running as root?
Also, is it being accessed via wireguard/ovpn? It would be unwise to run a server as root with an open port.
I have no clue how dangerous running Firefox as root is, but it begs the question…why would you do that?
Create a user account for managing things and create a separate user for each service and/or containers.
For managing things use tmux with ssh, if you want to manage files etc. just use ranger/lf/mc. One can also mount the file system with sshfs.