Updating Your Server

Keeping your server up to date is important for security and performance. Spin makes it stupid-easy to update your server.

Background

Running an out of date server stack can lead to security vulnerabilities and performance issues. Spin makes it easy to keep your server up to date. There are two categories of updates:

  • Application Stack Updates
  • Server Updates

spin maintain focuses on server updates. Here's a quick look at what that looks like:

Spin Maintain Command

Application Stack Updates

What we mean by application stack updates are things like Redis, Postgres, Node, PHP, etc. These are things you'll want to look at in your docker-compose.*.yml, composer.json, package.json, etc. Whenever you make a change, it will be version controlled so you can easily test and revert if needed.

Server Updates

Server updates are things like the underlying operating system, Docker, etc. It's important to keep these packages up to date as well. Thankfully Spin includes the spin maintain command which will take care of the heavy lifting for you.

Upgrade your servers

# Update all servers
spin maintain

# Update a specific environment
spin maintain production

The above command will:

  • Connect to your server(s)
  • Update the all operating system packages
  • Update Docker
  • Reboot the server (if needed)