Last active
November 26, 2017 15:25
-
-
Save joao-timescale/dfa5ed293a5513bcb9d4494514a562f7 to your computer and use it in GitHub Desktop.
Rocket.chat server systemd service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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