Update and upgrade your server

Keeping your system updated is vital for server management.

In Shipnix, you can do this with a lot of peace of mind. Especially if you test it on a staging server first 👈

Update packages

On your local machine, at the root of your repository, run

nix flake update

If this went without without error, you can commit, push and click the Deploy button on your Shipnix dashboard.

And if the deployment was successful, your server has been upgraded 🙂

Upgrade NixOS version

If a newer NixOS version has been released, you can go to your flake.nix file and find inputs.nixpkgs.url.

Change it to a newer version, for example like this:

inputs = {
- nixpkgs.url = "nixpkgs/nixos-22.05";
+ nixpkgs.url = "nixpkgs/nixos-22.11";

Then update the flake.lock:

nix flake update

Commit, push and click the Deploy button from your server dashboard.

Your NixOS server should have upgraded to the latest version.

You can SSH into your server and type nixos-version to verify that the upgrade was successful.