NGINX Service Fails Every Reboot

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.1.39
How are you able to access your server: Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: No

Describe your issue

After a power outage, the system reboots but when it comes online the nginx service fails. I have to restart the nginx service to make everything work again.

I saw this Nginx failing at boot 100% of the time, fine after restarting service but there didn’t seem to be any resolution.

Share relevant logs or error messages

× nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2026-05-13 15:08:18 CST; 1min 28s ago
       Docs: man:nginx(8)
    Process: 1506 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 72ms

May 13 15:08:17 arkadi.one systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
May 13 15:08:18 arkadi.one nginx[1506]: 2026/05/13 15:08:17 [warn] 1506#1506: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/arkadi.one.d/nextcloud.conf:9
May 13 15:08:18 arkadi.one nginx[1506]: 2026/05/13 15:08:17 [emerg] 1506#1506: host not found in upstream "arkadi" in /etc/nginx/conf.d/linkding.arkadi.one.d/redirect__4.conf:4
May 13 15:08:18 arkadi.one nginx[1506]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 13 15:08:18 arkadi.one systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 13 15:08:18 arkadi.one systemd[1]: nginx.service: Failed with result 'exit-code'.
May 13 15:08:18 arkadi.one systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

I haven’t done tweaking to nginx stuff. I don’t know much about nginx. I looked at that linkding file but I don’t know what is wrong with it. Redirect app made that file, not me.

#sub_path_only rewrite ^/$ / permanent;
location / {

  proxy_pass        http://arkadi:9090;
  proxy_redirect    off;
  proxy_set_header  Host $host;
  proxy_set_header  X-Real-IP $remote_addr;
  proxy_set_header  X-Forwarded-Proto $scheme;
  proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header  X-Forwarded-Host $server_name;
  proxy_set_header  X-Forwarded-Port $server_port;

  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";

  # Include SSOWAT user panel.
  include conf.d/yunohost_panel.conf.inc;
  more_clear_input_headers 'Accept-Encoding';
}

Linkding runs in docker, and works correctly after restarting Nginx with
sudo yunohost service restart nginx

What does return sudo nginx -t ?
This seems unreachable :

  proxy_pass        http://arkadi:9090;

Try changing to the local IP.

1 Like

This is after restarting nginx.

2026/05/13 17:38:47 [warn] 97941#97941: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/arkadi.one.d/nextcloud.conf:9
2026/05/13 17:38:47 [warn] 97941#97941: "ssl_stapling" ignored, no OCSP responder URL in the certificate "/etc/yunohost/certs/photos.arkadi.one/crt.pem"
2026/05/13 17:38:47 [info] 97941#97941: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:65
2026/05/13 17:38:47 [info] 97941#97941: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:65
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
  • I changed arkadi to 127.0.0.1
  • rebooted
  • did sudo nginx -t again
2026/05/13 17:42:51 [warn] 7159#7159: duplicate extension "wasm", content type: "application/wasm", previous content type: "application/wasm" in /etc/nginx/conf.d/arkadi.one.d/nextcloud.conf:9
2026/05/13 17:42:51 [warn] 7159#7159: "ssl_stapling" ignored, no OCSP responder URL in the certificate "/etc/yunohost/certs/photos.arkadi.one/crt.pem"
2026/05/13 17:42:51 [info] 7159#7159: Using 116KiB of shared memory for nchan in /etc/nginx/nginx.conf:65
2026/05/13 17:42:51 [info] 7159#7159: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:65
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

FIXED! seems that nginx restarts itself like a good boy.

nginx: 
  configuration: valid
  description: Serves or provides access to all the websites hosted on your server
  last_state_change: 2026-05-13 17:42:09
  start_on_boot: enabled
  status: running

Thank you!