Hi,
Ubuntu 16 showed me that there was some update, so I updated it. Now whenever I am trying to start the Ghost service I get “Failed to start ghost.service: Unit ghost.service not found.”
But when I go to Ghost folder and “npm start --production” it, it works.
Any idea how to get the “sudo service ghost start” working?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I encountered the same problem after upgrading my droplet to Ubuntu 16. I solved it by adding a systemd service configuration for ghost.
I created the following file: /lib/systemd/system/ghost.service
With this content
[Unit]
Description=Ghost: Just a blogging platform
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/www/ghost
User=ghost
Group=ghost
ExecStart=/usr/bin/npm start --production
ExecStop=/usr/bin/npm stop --production
Restart=always
SyslogIdentifier=Ghost
[Install]
WantedBy=multi-user.target
This is based on the following systemd script: https://github.com/TryGhost/Ghost-Config/blob/master/systemd/ghost.service
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.