Ask Steves · Daily notes · VPS, 20% off · AI Profit Lab · SEO · Money Hub

8 September 2026 · One command a day

How do I reload nginx without dropping connections?

The systemctl reload nginx command tells the running nginx to read its configuration again and start serving with the new settings. Existing connections are not cut off, so visitors do not notice. You reach for it every time you edit a file under /etc/nginx, whether that is a new server block, a changed proxy target or a renewed certificate.

The command

sudo systemctl reload nginx

sudo runs the command as root, which you need to control system services. systemctl is the tool that manages services under systemd, which is how Ubuntu 24.04 starts and stops nginx. reload asks the service to re-read its configuration rather than stop and start. nginx is the name of the service unit. Behind the scenes systemd runs nginx -s reload, which sends a signal to the nginx master process. The master checks the new configuration, starts fresh worker processes with it, and tells the old workers to finish their current requests and then exit.

What you will see

On success the command prints nothing. To confirm the reload happened, check the service status.

user@host:~$ sudo systemctl reload nginx
user@host:~$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Sat 2026-08-15 06:02:11 UTC; 3 weeks 2 days ago
       Docs: man:nginx(8)
    Process: 48213 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
   Main PID: 1187 (nginx)
      Tasks: 3 (limit: 38192)
     Memory: 24.6M (peak: 31.2M)
        CPU: 1min 12.348s
     CGroup: /system.slice/nginx.service
             ├─ 1187 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             ├─48219 "nginx: worker process"
             └─48220 "nginx: worker process"

The Process line shows the reload ran and exited with status 0, which means success. The Active line still shows the original start time, because the master process never stopped. The worker process IDs are new and much higher than the master, which tells you fresh workers have taken over.

When to use it

Watch out for

If the new configuration has a mistake, the reload fails but nginx keeps running with the old configuration. You will see Job for nginx.service failed because the control process exited with error code. The site stays up, so it is easy to assume your change went live when it did not. Run sudo nginx -t first, as covered in how to test your nginx config before reloading it. If the reload still fails, journalctl -u nginx -n 20 shows the exact line nginx objected to.

Questions people ask

What is the difference between reload and restart?

Restart stops nginx completely and starts it again, so any request in flight is dropped and the site is briefly unreachable. Reload swaps the configuration under a running master process and keeps every connection open, so it is the right choice for routine changes.

Do I need to reload nginx after renewing a Let's Encrypt certificate?

Yes. nginx reads certificate files only at start or reload, so a renewed file on disk is not used until you reload. Certbot's nginx plugin does this for you, and other setups can add --deploy-hook "systemctl reload nginx" to the renewal command.

Reloading a web server in place, while dozens of sites keep answering, is only possible when you control the machine it runs on. You can get the same VPS with 20% off at https://asksteves.co.uk/vps. Affiliate link.

Everything on this blog runs on one Hostinger KVM 8. This link takes 20% off the same box.

GET A VPS, 20% OFF →

Affiliate link.

More daily notes: How do I test my nginx config before reloading it? · How do I see which process is using a port on Linux?