Best way to keep Linode server updated

I’ve setup two website’s to run on the standard Debian install on Linode, what’s the best way to keep the software updated? Should I always restart the server when updating or does that just matter when a new kernel comes out? I’m just running the commands:

sudo apt-get update and sudo apt-get upgrade

Thanks, I’m new to sysadmin type things.

That should be enough to upgrade the packages in the system. And you should only need to completely reboot after upgrading the kernel. However, you may need to restart services that get upgraded (i.e. upgrade ssh then restart sshd). You may also want to look into unattended upgrades.

2 Likes

Thanks, I’ll look into that. I just did a reboot, all the services are working normally.

1 Like

yeah a reboot isn’t going to hurt anything necessarily (unless you disable a running service without stopping it, then you might be confused). The only thing is you could be introducing unnecessary downtime to your site/services. If running your updates only updates vim, then there’s no need to reboot and take down your nginx/apache site. Technically there’s away to do kernel live-patching, but that just sounds like changing your cars tire while you’re driving down the interstate, so I’ve been avoiding that, personally. But even after downloading a new kernel, you don’t HAVE to reboot right away. Just reboot whenever you want to start the new kernel.

TL;DR: you shouldn’t ever feel like you HAVE to reboot. Linux can have some pretty amazing uptime if you want it to.

1 Like