# unknown\_service error when saving configs for app

**URL:** https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490
**Category:** Apps packaging
**Tags:** english
**Created:** [October 19, 2025, 9:29pm UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490 "2025-10-19T21:29:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![endorama](https://forum.yunohost.org/user_avatar/forum.yunohost.org/endorama/32/12813_2.png) [@endorama](https://forum.yunohost.org/u/endorama)
#### Post date: [October 19, 2025, 9:29pm UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/1 "2025-10-19T21:29:24Z")

</div>

I’m developing a package for a personal app I’m working on. You can see the Yunohost package here: [GitHub - endorama/test\_ynh](https://github.com/endorama/test_ynh)

The app is still in development, the package is still in development. Basically will be distributed as a single binary. I plan to open source it and offer a Yunohost package, as I really love the platform, but it’s my first package and I’m struggling with an error message that I’m not able to troubleshoot.

In my package I configured a [setting](https://github.com/endorama/test_ynh/blob/main/config_panel.toml#L8) in `config_panel.toml` that I want to expose to the user. It works, is shown in the UI and it updates the correct setting. But when saving, I see an error message displayed, `Servizio 'kakeibo' sconosciuto` (`Unknown service 'kakeibo'` in English) and the app is not actually restarted, making any UI action useless (a restart is needed for the new value to be picked up).

 ![image](https://forum.yunohost.org/uploads/default/original/2X/b/be2e203530cf71e4b6538ba87b0c26de23ca7a66.png)

The API PUT call to `https://server/yunohost/api/apps/kakeibo/config/main` returns a 400 and shows this content:

```json
{
"error": "Unknown service 'kakeibo'",
"error_key": "service_unknown",
"service": "kakeibo"}

```

I’m assuming this refers to a systemd service, but the service exists and is running:

```auto
# systemctl status kakeibo
● kakeibo.service - Kakeibo Family Financial App
     Loaded: loaded (/etc/systemd/system/kakeibo.service; enabled; preset: enabled)
     Active: active (running) since Sun 2025-10-19 18:59:40 UTC; 2h 17min ago
   Main PID: 2157280 (kakeibo)
      Tasks: 8 (limit: 4530)
     Memory: 13.8M
        CPU: 10.365s
     CGroup: /system.slice/kakeibo.service
             └─2157280 /var/www/kakeibo/kakeibo --config /var/www/kakeibo/config.yaml serve

Oct 19 18:59:40 server systemd[1]: Started kakeibo.service - Kakeibo Family Financial App.

```

Any idea how to troubleshoot this? I found these lines in the log for the operation (`/var/log/yunohost/operations/`), but they do not provide much details.

```auto
2025-10-19 21:26:04,724: INFO - Reloading services...
2025-10-19 21:26:04,910: DEBUG - Reloading service kakeibo
<log ends here>

```

Thank you!

---

<div class="post-metadata">

### Author: ![artlog](https://forum.yunohost.org/user_avatar/forum.yunohost.org/artlog/32/12399_2.png) [@artlog](https://forum.yunohost.org/u/artlog)
#### Post date: [October 20, 2025, 5:47am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/2 "2025-10-20T05:47:34Z")

</div>

> [@endorama](#):
>
> `Unknown service`

digging in code i would think is it def \_get\_services(): of service.py that does not find service in configured service known by yunohost in SERVICES\_CONF = “/etc/yunohost/services.yml”.

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [October 20, 2025, 7:49am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/3 "2025-10-20T07:49:12Z")

</div>

After first install, did you need to manually start kakeibo service or did the install script start it?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [October 20, 2025, 8:18am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/4 "2025-10-20T08:18:25Z")

</div>

Your script is a little hard to read. As you can notice, all yunohost packages have some comments, blocks delimiting sections, to help other packagers.  
What is missing in your **install** script is :

```auto
yunohost service add "$app" --description="Kakeibo Family Financial App" --log="/var/log/$app/$app.log"

```

Set the correct log filename.

You can notice you don’t have a service named “Kakeibo” in tools\>services with your install script.

---

<div class="post-metadata">

### Author: ![endorama](https://forum.yunohost.org/user_avatar/forum.yunohost.org/endorama/32/12813_2.png) [@endorama](https://forum.yunohost.org/u/endorama)
#### Post date: [October 20, 2025, 10:06am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/5 "2025-10-20T10:06:30Z")

</div>

Yes it does, using

```auto
ynh_systemd_action --service_name=$app --action="start" --line_match="Starting server on"

```

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [October 20, 2025, 10:20am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/6 "2025-10-20T10:20:14Z")

</div>

Have a look at `/etc/yunohost/services.yml` and follow the instructions from @jarod5001

---

<div class="post-metadata">

### Author: ![endorama](https://forum.yunohost.org/user_avatar/forum.yunohost.org/endorama/32/12813_2.png) [@endorama](https://forum.yunohost.org/u/endorama)
#### Post date: [October 20, 2025, 11:52am UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/7 "2025-10-20T11:52:49Z")

</div>

This worked like a charm! Thank you and thanks all for helping me out!

(I also added some comments to improve scripts readability upon your suggestion)

I’d like to understand some more about services: I don’t remember reading about them in the documentation. Is `yunohost add service` required when using a systemd service? When acting on a service (es stop, reload, restart) should I prefer `systemctl` or `yunohost service <action>`?

I’m happy to contribute to the documentation to clarify this, but I’d need to understand a bit better service purpose.

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [October 20, 2025, 12:48pm UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/8 "2025-10-20T12:48:35Z")

</div>

So, there are a lot of systemd services on your Yunohost server but not all of them appear in the webadmin \>tools \>services.  
For a specific service to be added to yunohost services, you have to add it using that command, which is not in the helpers but in the core of yunohost (you can find more details using `yunohost service --help`)

> **[App helpers (v2.1) | Yunohost](https://doc.yunohost.org/fr/packaging/scripts/helpers_v2.1/#systemd)**
>
> Doc auto-generated by this script on 18/09/2025 (YunoHost version 12.1.25)

---

<div class="post-metadata">

### Author: ![endorama](https://forum.yunohost.org/user_avatar/forum.yunohost.org/endorama/32/12813_2.png) [@endorama](https://forum.yunohost.org/u/endorama)
#### Post date: [October 20, 2025, 4:06pm UTC](https://forum.yunohost.org/t/unknown-service-error-when-saving-configs-for-app/40490/9 "2025-10-20T16:06:51Z")

</div>

Thank you!
