Hexo systemD unit file
Posted: Tue Apr 02, 2024 1:37 am
Hexo is a simple, lightweight node blog framework. It didn’t include a SystemD Unit file, so I created one:
Hexo SystemD Unit File
Create the next file on this location
in some case you need to reload the daemon
and start the service with
if everything go well you are not to see any errors you can check is running with
is going to be like this
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