How can I setup Ombi to run as a startup service ?

Hi,

I am planning to use Ombi for my Jellyfin server. https://github.com/Ombi-app/Ombi

I tried using this guide https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/
to setup Ombi as a startup service and to manage it with systemctl start/stop.

I successfully created the ombi.service file in /lib/systemd/system that contains :

[Unit]
Description=Ombi
After=network.target

[Service]
ExecStart=/mnt/dietpi_userdata/ombi/Ombi
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target


I correctly updated the systemctl process. But even with that, Ombi still doesn’t launch at startup and isn’t turn on/off with systemctl commands. Am I doing something wrong ? All guides are telling me the same method.

Thanks in advance for any answer,
Have a great day

do you have created a User=pi on your system? usually it is not present by default

You’re right, I didn’t notice this.

I changed it to the “dietpi” user as this one already exists.

But even with that and reloading the systemctl process, it still doesn’t command the program

how is it behaving if you change to user root for testing.

It still doesn’t launch the program when changing it to root.

What’s strange is that when I try to exexute a systemctl start ombi, it immediatly exexutes the command. Normally, it takes 1-2 secs to launch a program with this, before being able to enter another command.

I can confirm Ombi can be correctly executed when going to its folder with cd then ./

does it start if you run /mnt/dietpi_userdata/ombi/Ombi

Yes, it is working if I go to the folder with cd /mnt/dietpi_userdata/ombi/ then if I do ./Ombi

btw why are you trying to create the service yourself?

I simply installed the apt package as described on ombi docs and it will create a service directly

https://docs.ombi.app/guides/installation/#debian-apt-repo

root@DietPi4:~# systemctl status ombi
● ombi.service - Ombi - PMS Requests System
   Loaded: loaded (/lib/systemd/system/ombi.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-02-08 21:46:03 CET; 86ms ago
 Main PID: 3004 (Ombi)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/ombi.service
           └─3004 /opt/Ombi/Ombi --storage /etc/Ombi/

Feb 08 21:46:03 DietPi4 systemd[1]: Started Ombi - PMS Requests System.
root@DietPi4:~#

That’s how service file /lib/systemd/system/ombi.service looks like

[Unit]
Description=Ombi - PMS Requests System
After=network-online.target

[Service]
User=ombi
Group=nogroup
WorkingDirectory=/opt/Ombi/
ExecStart=/opt/Ombi/Ombi --storage /etc/Ombi/
Type=simple
TimeoutStopSec=30
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Hi,

Thanks for your answer.
I found out Ombi had an apt package just before seeing your last message. I installed it with it and it solved the problem. Thanks a lot for your help.

But I’m having a similar problem with another software : jfa-go https://github.com/hrfee/jfa-go
This small program doesn’t have an apt package and I would like to have as a service manageable with systemctl like the others.

I’ve extracted the archive to my /opt/ folder, and I can confirm it runs by executing ./jfa-go

But I can’t manage to add it as service. Here is the content of my jfa-go.service :

[Unit]
Description=jfa-go
After=network-online.target

[Service]
User=root
Group=nogroup
ExecStart=/opt/jfa-go/jfa-go
Type=simple
TimeoutStopSec=30
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

But doing that doesn’t allow me to control it with systemctl, I am running into this error :

root@DietPi:~# systemctl start jfa-go.service
root@DietPi:~# systemctl status jfa-go.service
● jfa-go.service - jfa-go
   Loaded: loaded (/etc/systemd/system/jfa-go.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2021-02-09 15:46:19 GMT; 4s ago
  Process: 24821 ExecStart=/opt/jfa-go/jfa-go (code=exited, status=1/FAILURE)
 Main PID: 24821 (code=exited, status=1/FAILURE)

févr. 09 15:46:19 DietPi systemd[1]: jfa-go.service: Failed with result 'exit-code'.

Is there something I missed during the configuration ? I correctly reloaded systemctl daemon.

I succeeded to fix this myself !

I’ve installed it in mnt/dieti_userdata instead of /opt , and now it works and systemctl works perfectly. It correctly boots at launch and I can control it easily. I don’t know it didn’t work earlier but now it’s perfect.

ok good you fixed it :slight_smile:

Did you activate that service?

sudo systemctl enable ombi.service

or whatever filename you created?

https://www.debugpoint.com/2020/12/systemd-systemctl-service/

Hello, I also want to use Ombi on my Dietpi server. I have installed on my MiniPC (x64): Nextcloud, Emby (with SSL, let’sencrypt) and Home Assistant.
Can I use Nginx Proxy Manager to open that service for internet?
Will this affect my Emby and Nextcloud installations and certificate?
Do I have to forward port [5000] on my router for Ombi.
Regards.

are you already using Nginx Proxy Manager?

No, I now install it on my laptop in work because I want to try. I newer use any proxy and don’t know how to.
Regards.

using Nginx Proxy Manager will conflict with NextCloud as both are using web server port 80/443.

Theoretically they could work together but you would need to reconfigure your web server to move away from port 80 and disable https. This all will be taken over by Nginx Proxy Manager. As an alternative you could use the current web server as revers proxy. But this would require manual configuration of proxy functionality and proxy rules. This differs from web server to web serer (Apache2, Nginx, Lighttpd). Some applications have dedicated wiki entries for the revers proxy topic.

That Ombi app have some instructions but I don’t understand what to do.
https://docs.ombi.app/info/reverse-proxy
Can You help me with that? If it safe to use that proxy with my SSL certificate that I already use for Nextcloud and Emby?
Regards.

certificate handling will be taken over by NPM. Means you would need to recreate them in NPM application. But this should not be an issue. You just need to remove all configs from current install.

Sorry I don’t explain clearly. If that Nginx Proxy Manager will conflict with my nextcloud I will not use it.
I want to use some other proxy.

Joulinar can You tell me if I install Omni with Linuxserver docker image like this:

---
version: "2.1"
services:
  ombi:
    image: lscr.io/linuxserver/ombi
    container_name: ombi
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - BASE_URL=/ombi #optional
    volumes:
      - /path/to/appdata/config:/config
    ports:
      - 3579:3579
    restart: unless-stopped

I contact Linuxserver support and they told me that I can use they SWAG docker image to handle SSL. I will forward port 443 from nextcloud to swag and use nextcloud with swag.
Will that conflict with my Nextcloud or Emby?