# How do I keep a VPS updated?

> How to keep a VPS updated when it runs your VPN: apt by hand, unattended-upgrades every 1 day, a reboot plan for kernels, and a tunnel that returns.

- URL: https://tunnelvps.com/guides/how-to-keep-a-vpn-server-updated/
- Last updated: 2026-11-16
- Publisher: TunnelVPS (https://tunnelvps.com)

Security fixes installed every day without you, a monthly look at what needs a reboot, and a VPN tunnel that comes back on its own afterwards.

**Quick answer — How do I keep a VPS updated?**

Here is how to keep a VPS updated: run `apt update` and `apt upgrade` after the first login, then let `unattended-upgrades` install security fixes every 1 day. On a **TunnelVPS** server, enable `wg-quick@wg0` so the VPN returns after a reboot, and reboot when a new kernel asks for it. Check the logs once a month.

**In brief**

- **By hand**: `apt update`, then `apt upgrade`, as root.
- **Automatic**: `unattended-upgrades`, installed by default on Ubuntu, added with apt on Debian.
- **Reboots**: off by default; kernels need one to take effect.
- **VPN after reboot**: `systemctl enable wg-quick@wg0` brings the tunnel back.

## What are the steps to keep the server patched?

*Keeping a TunnelVPS VPN server updated, 5 steps, from Ubuntu Server docs and the Debian wiki read 16 November 2026*

| Step | Where | What to do |
| --- | --- | --- |
| 1 | Server | Run `apt update` then `apt upgrade` after the first login. |
| 2 | Server (Debian) | Install `unattended-upgrades` and run `dpkg-reconfigure unattended-upgrades`. |
| 3 | Server | Check `/etc/apt/apt.conf.d/20auto-upgrades` holds the two daily settings. |
| 4 | Server | Run `systemctl enable wg-quick@wg0` so the VPN returns after a reboot. |
| 5 | Monthly | Read `/var/log/unattended-upgrades/` and reboot if a kernel was updated. |

## Why does a VPN server need regular updates?

**Because it faces the internet all day, and fixes for OpenSSH, the kernel and libraries arrive often.** Every TunnelVPS server runs Debian 13, Debian 12, Ubuntu 24.04 LTS or Ubuntu 22.04 LTS. All four receive security updates through apt.

The server is yours to maintain. TunnelVPS builds it and keeps the network running; updates inside it are the owner's job. That is why knowing how to keep a VPS updated matters as much as the VPN setup.

*Update by hand (as root)*

```bash
apt update
apt upgrade
```

## How do automatic security updates work?

**The `unattended-upgrades` package installs updates on a schedule set in `20auto-upgrades`.** TunnelVPS read the Ubuntu Server docs on 16 November 2026: the package is installed by default there. Each setting counts days; 1 means daily and 0 turns it off.

On Debian, the wiki gives `sudo dpkg-reconfigure unattended-upgrades` to turn it on, and recommends `apt-listchanges` as a companion. `sudo unattended-upgrade -d` runs it once with debug output, handy to confirm it works.

*Debian: install and enable, then check the settings*

```bash
apt install unattended-upgrades apt-listchanges
dpkg-reconfigure unattended-upgrades
cat /etc/apt/apt.conf.d/20auto-upgrades
# APT::Periodic::Update-Package-Lists "1";
# APT::Periodic::Unattended-Upgrade "1";
unattended-upgrade -d
```

## When does the server need a reboot?

**After a kernel update, because the running kernel only changes at boot.** The Ubuntu docs show the option `Unattended-Upgrade::Automatic-Reboot` in `50unattended-upgrades`. It defaults to false. Set to true, the server reboots without asking after an update run that requested one.

On Ubuntu, the file `/var/run/reboot-required` appears when a reboot is pending. A manual reboot at a quiet hour is the alternative; everyone on the VPN loses the tunnel for a minute or two.

## Will the VPN come back after a reboot?

**Yes, if its service is enabled at boot.** `systemctl enable wg-quick@wg0` starts WireGuard at every boot. Outline runs in Docker, which its install script enables. Check after the first reboot with `wg show`.

A reboot from inside with `reboot` is quickest. Reboot, reinstall and delete are sent from the dashboard and carried out by a person; a reinstall erases the disk, VPN keys included. The [Linux client guide](https://tunnelvps.com/guides/how-to-use-wireguard-on-linux/ "How do I use WireGuard on Linux?") shows the same systemd unit on a laptop.

## What about major release upgrades?

**Treat a jump such as Debian 12 to 13 as a project: back up `/etc/wireguard` first.** No plan includes backups; daily backups kept 7 days can be added at checkout for 15% of the plan price. Without them, keep a copy of the VPN configuration and keys off the server. A failed upgrade may need a reinstall, which erases the disk.

Sometimes a fresh server on the newer image is simpler than an in-place upgrade. Copy the WireGuard folder across and devices reconnect with the same files. Either way, how to keep a VPS updated comes down to a habit, not a tool. The [SSH hardening guide](https://tunnelvps.com/guides/how-to-secure-ssh-on-a-vpn-server/ "How do I secure SSH on a VPS?") is worth redoing on the new system. Service changes at TunnelVPS are posted on the [updates page](https://tunnelvps.com/updates/ "What has changed at TunnelVPS?").

## Update questions

### How often should I update a VPN server?

Security fixes daily through unattended-upgrades, and a manual `apt upgrade` plus a look at reboots once a month.

### What is the best way to keep a VPS updated in 2026?

Automatic security updates with `unattended-upgrades`, a planned reboot for kernels, and the VPN service enabled at boot.

### Does TunnelVPS update my server for me?

No. TunnelVPS builds the server and keeps the network up; packages inside the server are the owner's to update.

### Where are the update logs?

In `/var/log/unattended-upgrades/`, with package changes also in `/var/log/dpkg.log`.

### Can an update break WireGuard?

Rarely, since it runs in the kernel. Check `wg show` after each reboot and keep a copy of `/etc/wireguard` off the server.

**Verdict**

- **Daily automatic fixes plus a monthly reboot check** keep a VPN server patched with little effort.
- **Enable `wg-quick@wg0`** so reboots never leave the family offline.

## Sources

1. [Ubuntu Server: automatic updates](https://ubuntu.com/server/docs/how-to/software/automatic-updates/) — Canonical (read 2026-11-16)
2. [Debian wiki: UnattendedUpgrades](https://wiki.debian.org/UnattendedUpgrades) — Debian (read 2026-11-16)
3. [wg(8) manual page](https://man7.org/linux/man-pages/man8/wg.8.html) — man7.org (read 2026-11-16)

**Start on a current LTS image** Pick Ubuntu 24.04 LTS or Debian 13 at checkout. Home costs $6.37 a month on 12 months. [Order Home for 12 months](https://tunnelvps.com/app/checkout/?plan=home&term=12m&image=ubuntu-24.04&from=guides-how-to-keep-a-vpn-server-updated&lang=en) · [Secure SSH next](https://tunnelvps.com/guides/how-to-secure-ssh-on-a-vpn-server/ "How do I secure SSH on a VPS?")

---

TunnelVPS: TunnelVPS rents Linux KVM servers for a personal VPN (WireGuard, Outline or AmneziaWG) in New York, Dallas, Los Angeles, London, Amsterdam and Frankfurt, paid in crypto with no ID document. 5 plans from 2 to 16 GB of RAM and 2 to 6 TB of traffic a month cost the same in all six cities; on the 12-month term each is priced at least 25% under a named comparable plan of a no-KYC crypto host, read on 16 November 2026. The operator is DomaineGoat LLC, Panama.
