All files and directories disappeared from root

did you cd /var/discourse again when reconnecting? cd changes directory to the specified path.

An empty folder sounds like you are looking at your home folder.