Do you nohup?

When I’m testing a new build of the Kea DHCP server — especially one I compiled myself — I don’t always bother writing a systemd service right away. Sometimes I just want to launch it, throw traffic at it, watch the logs, and iterate on the config.

Here’s the simple way I do that:

nohup kea-dhcp4 -c /usr/local/etc/kea/kea-dhcp4.conf &

What’s Happening Here?

Let’s break it down:

nohup

Tells Linux: If I close this terminal, don’t kill this process.
Without nohup, when I close my SSH session or terminal window, the DHCP server would stop.

kea-dhcp4 -c /usr/local/etc/kea/kea-dhcp4.conf

This runs Kea’s DHCPv4 server, using the specified config file.

&

The ampersand says: Run this in the background.
So I get my shell prompt back and can do other things.


Why Run It This Way?

Normally, on a production server, you’d want this running as a service — managed by systemd — so that it starts on boot, restarts on failure, and logs cleanly.

But when testing:

  • The binary may not be packaged as a service yet
  • You may be tweaking the config constantly
  • You may want to kill/restart it quickly without writing a service file

That’s when nohup ... & is a handy shortcut.


Where Do the Logs Go?

When you launch it like this, Linux will tell you:

nohup: ignoring input and appending output to 'nohup.out'

That means:

  • The server’s output (logs, errors, status) will go to a file called nohup.out in your current directory.
  • You can check this at any time:
tail -f nohup.out

When Should You NOT Do This?

This is not how you should run a production service, because:

  • It won’t auto-restart if the server crashes
  • It won’t start on boot
  • The log file will grow forever if you don’t manage it

What I’m Doing Here

In this case, I’m testing a custom-compiled version of Kea-DHCP4. The systemd service isn’t written yet — that’ll come later in the project. For now, I just need to bring the server up so I can test my config and watch how it behaves under simulated load. This method gets me there quickly without a lot of extra setup.

--Create Wild Things
-Bryan