Hexo SystemD Unit File
Create the next file on this location
Code: Select all
# cd /etc/systemd/system/Code: Select all
[Service]
WorkingDirectory=/home/YOURDOMAIN/FOLDER WHERE IS INSTALLED
ExecStart=/usr/local/bin/hexo server
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=hexo
User=REPLACE WITH YOUR USER
Group=REPLACE WITH YOUR USER
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.targetCode: Select all
# systemctl daemon-reloadCode: Select all
# systemctl start hexoCode: Select all
# systemctl status hexoCode: Select all
● hexo.service
Loaded: loaded (/etc/systemd/system/hexo.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2024-04-02 04:29:50 UTC; 5s ago
Main PID: 753876 (hexo)
Tasks: 11 (limit: 12030)
Memory: 75.0M
CGroup: /system.slice/hexo.service
└─753876 hexo
