I don't think you quite understand the error message.
nohup
just launches another process (in your example called server
), preventing it from getting a SIGHUP once the terminal starting it disconnects.
The problem here is not that the PID changes (the displayed pid is the pid of nohup
when it temporarily launches), it's that nohup
can't find a command called server
to launch at all.
nohup: failed to run command ‘server’: No such file or directory