Prepare the VPS
Choose a supported Ubuntu image with WireGuard kernel support, administrator access and an address reachable by your clients. Pick a UDP listening port and a tunnel subnet that does not overlap your client networks. Keep SSH access available while modifying firewall rules.
Install WireGuard and define peers
On Ubuntu, install the package with sudo apt install wireguard. Follow Quick Start to generate a separate key pair for the server and each peer. Keep each private key on its own device. Assign each client a distinct tunnel address and configure AllowedIPs for the routes that client should use.
Bring up the interface and test a client
Allow the configured UDP port. Bring up the tunnel using the upstream instructions and point a client at the VPS address and port. Use sudo wg show to check the handshake, then verify access to the intended resource. Enable forwarding and configure routing only if clients need access beyond the VPS.
Remove unused peers
Remove lost or retired devices from the server configuration. Back up the configuration securely and check the endpoint, port, public keys and routes if a peer cannot connect.