You must have a working installation of Docker.
Install "Docker Engine" following the official installation instructions:
Using the post-installation instructions defined by Docker, be sure to add your current user to the docker group if you want to be able to run Docker without root privileges.
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
To test you have a working version of Docker, you can run their "hello world" container. docker version.
docker run hello-world
Spin is set to run the latest version of Docker Compose (Version 2).
docker compose version
If you do not see version 2.x installed, you'll need to update. How to Install Docker Compose V2 →
spinRun the installer with this simple command in your terminal
bash -c "$(curl -fsSL https://raw.githubusercontent.com/serversideup/spin/main/tools/install.sh)"
The above script will install spin at the user level in ~/.spin, using less than 300KB of storage.
If you did not add spin to your PATH during the installation, you can manually add it to your PATH by adding this to your shell profile:
echo $0 in your terminal to figure out which shell you are using.# Add this to `~/.zshrc` or `~/.bash_profile`
export PATH="$HOME/.spin/bin:$PATH"
In order to apply the changes to your current terminal session, you will need to run the source command.
# If you're using ZSH
source ~/.zshrc
# If you're using Bash
source ~/.bash_profile
You should be able to run this and get a result 🥳
spin version
Install to Windows
Spin is able to run on any Windows machine that supports Windows Subsystem Linux v2 (WLS2). This is a feature developed by Microsoft that allows you to run a Linux distribution on your Windows machine. It is supported in updated versions of Windows 10 and Windows 11.
Install via Composer
Spin can be installed using Composer, a popular PHP package manager. This enables you to make Spin accessible without other developers doing any steps on their end.