Skip to content

Instantly share code, notes, and snippets.

@joao-timescale
Last active November 26, 2017 15:25
Show Gist options
  • Save joao-timescale/dfa5ed293a5513bcb9d4494514a562f7 to your computer and use it in GitHub Desktop.
Save joao-timescale/dfa5ed293a5513bcb9d4494514a562f7 to your computer and use it in GitHub Desktop.
Rocket.chat server systemd service
[Unit]
Description=Rocket.Chat Server
Requires=After=mongod.service # Requires the mongod service to run first
[Service]
ExecStart=/usr/local/bin/node /opt/rocket.chat/main.js
WorkingDirectory=/opt/rocket.chat # Set to rocket.chat directory
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Output to syslog
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat_server
User=rocketchat # Run the process using the rocketchat user
Group=rocketchat
Environment=ROOT_URL=http://your-hostname-here.ipadress:3000/ MONGO_URL=mongodb://localhost:27017/rocketchat PORT=3000
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment