nohup COMMAND &

It doesn’t matter whether you are on the server or through SSH. Even when you logged out or lost connection, the command will still continue to run.