Type from a terminal:
xrayd -daemon
Also, make sure to create a xray.conf with your credentials if needed for accessing RPC calls.
This is a sample xray.conf file
cd /.xray
sudo nano xray.conf
rpcuser=user
rpcassword=password
server=1
rpcallowip=127.0.0.1
logevents=1
daemon=1