Unable to create the rocketchat.service file on Debian (9.12)


Hello all!

I hope that you and your loved ones are doing well in these times of trouble.

I wanted to benefit from this free time to install a new Rocket.Chat server on a debian. I already installed one on a raspberry pi that works great, but I would like to have it now on my server that runs proxmox. For this I created a virtual machine with a Debian 9.12 on it (first tried on a Debian 10, but the Rocket.chat installation fails due to libcurl compatibility issues based on what I could find).

Having this VM, I followed the tutorial provided on the Rocket.Chat installation page over ssh on my PC. Everything goes fine until the step in which I have to create the rocketchat.service file using this command:

cat << EOF |sudo tee -a /lib/systemd/system/rocketchat.service
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000

Here is the result I get:

But when I then try to open the rocketchat.service file using the nano editor (last command line on the screenshot), it tells me that the directory (and the file) does not exist. I checked manual of course and they do not exist.

I am not sure to understand exactly what “cat” command should do. As far as I could understand it’s for executing a whole script in the terminal. Then, “tee” should create the rocketchat.service file if I am not mistaking, right? Or shall I have to create a blank one myself first, with the corresponding directory?

I am sorry for these basic questions, but I am quite new in the programing field, and there are still much things I shall discover ^^.

Thank you in advance for your help!

Server Setup Information

  • Version of Rocket.Chat Server: Last one
  • Operating System: Debian 9.12
  • Deployment Method: Manual install
  • Number of Running Instances: 1
  • NodeJS Version: 12.14