Non-Catalogue Apps/Services

I’d like to host some apps/services from outside the YunoHost catalogue but can’t figure out how. They are git repos that do not have an index.* file: they are run by creating a *.service file in systemd to keep them listening on a port and, as such, don’t typically work by simply moving the files to the My Webapp dir.

What didn’t work:

I added a subdomain via the web-app and completed the certificate process and saw the sub.example.com file and sub.example.com.d dir placed in /etc/nginx/conf.d/ as is usually, and then tried to add:

location / {
  proxy_pass http://localhost:{port}/;
}

both (on separate attempts) to /etc/nginx/conf.d/sub.example.com and to /etc/nginx/conf.d/sub.example.com.d/sub.conf as I would normally do for an nginx conf, confirming with nginx -t and reloading with systemctl restart nginx but these attempts did not enable the app at the subdomain as works on any other nginx vps I have tested.

I am fairly new to this kind of configuration but I have figured out a lot and managed to make this kind of thing work on a non-YunoHost server. Can anyone help me with what I may be missing?

My YunoHost server

  • Hardware:
    • Operating System: Debian GNU/Linux 11 (bullseye)
    • Kernel: Linux 5.10.0-31-amd64
    • Architecture: x86-64
  • YunoHost version: 11.2.26
  • I have access to my server:
    • Through SSH
    • Through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : slight edit to nginx configuration as detailed above

Maybe you’re looking for Installing "custom" apps | Yunohost Documentation

As I mentioned, the my_webapp doesn’t suit my purposes because I am not creating static files to be served by nginx: I am cloning git repos and running the contents (which sometimes do not contain .html, .php, etc. files) as a service, per their installation instructions, which is then made available on a port. I have been able to get this to work by simply running the service and pointing the nginx conf to that localhost:port on other devices that are clean Debian installations without Yunohost.

The remaining instructions on that page are for Docker, which is, also, not what I’m using.

The projects I am attempting to run are often npm/node projects which are run by a .service and listen on a port. I thought that simply reconfiguring the nginx conf file for the established (sub)domain to use that location would work, but I am not getting any results.

On another read, I managed to establish the desired functionality by using the Redirect app listed.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.