Running Octoprint on Ubuntu Server Status Active(Exited)

Hi!
Im Running Octoprint on my Ubuntu Server and I Followed all the instructions in this video:


until the part that he removes the port, because in my 80 port i have other service!

If i run octoprint as

~/share/Octoprint/env/bin/octoprint serve

It runs perfectly

I dont know if my Daemon path is correct

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

When i try to start it as a service it says

octoprint.service - LSB: OctoPrint daemon
Loaded: loaded (/etc/init.d/octoprint; generated)
Active: active (exited) since Mon 2019-04-08 03:27:43 UTC; 2min 41s ago
Docs: man:systemd-sysv-generator(8)
Process: 27389 ExecStart=/etc/init.d/octoprint start (code=exited, status=0/SUCCESS)
Apr 08 03:27:43 servidor systemd[1]: Starting LSB: OctoPrint daemon...
Apr 08 03:27:43 servidor systemd[1]: Started LSB: OctoPrint daemon

And my log only shows the information when i run it like the first example, it says nothing about the service or anything!

Thank you in advance!

My systemd startup file (octoprint.service) in /etc/systemd/system/ :

[Unit]
Description=OctoPrint
After=network.target

[Service]
User=nas
ExecStart=/home/nas/OctoPrint/venv/bin/octoprint serve
Restart=always
Nice=-2

[Install]
WantedBy=default.target

1 Like

Ohhh!! Okey I actually didnt had that file! Im going to create it and try it again!

Thank you!

This is not standard. I want use systemd so i create it.
With systemd you can start/stop/restart with:
systemctl start octoprint.service etc

nas@uplink:~/git/klipper$ systemctl status octoprint.service
● octoprint.service - OctoPrint
   Loaded: loaded (/etc/systemd/system/octoprint.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-04-04 17:08:59 CEST; 3 days ago
 Main PID: 2728 (octoprint)
    Tasks: 20 (limit: 4915)
   CGroup: /system.slice/octoprint.service
           └─2728 /home/nas/OctoPrint/venv/bin/python2 /home/nas/OctoPrint/venv/bin/octoprint serve

Apr 08 14:24:01 uplink octoprint[2728]: 2019-04-08 14:24:01,765 - octoprint.server.heartbeat - INFO - Server heartbeat <3
Apr 08 14:24:05 uplink octoprint[2728]: 2019-04-08 14:24:05,494 - octoprint.plugins.tracking - INFO - Sent tracking event ping
Apr 08 14:29:45 uplink octoprint[2728]: 2019-04-08 14:29:45,117 - octoprint.server.util.sockjs - INFO - New connection from cl
Apr 08 14:29:45 uplink octoprint[2728]: 2019-04-08 14:29:45,186 - octoprint.server.util.sockjs - INFO - User admin logged in o
Apr 08 14:29:45 uplink octoprint[2728]: 2019-04-08 14:29:45,200 - octoprint.plugins.pushover - INFO - Got an event: ClientOpen
Apr 08 14:31:09 uplink octoprint[2728]: 2019-04-08 14:31:09,094 - octoprint.server.util.sockjs - WARNING - Could not send mess
Apr 08 14:31:09 uplink octoprint[2728]: 2019-04-08 14:31:09,096 - octoprint.plugins.pushover - INFO - Got an event: ClientClos
Apr 08 14:31:09 uplink octoprint[2728]: 2019-04-08 14:31:09,098 - octoprint.server.util.sockjs - INFO - Client connection clos
Apr 08 14:39:01 uplink octoprint[2728]: 2019-04-08 14:39:01,766 - octoprint.server.heartbeat - INFO - Server heartbeat <3

Thank you!

It worked perfectly!!!