Install on Ubuntu¶
Installing Vapor on Ubuntu only takes a couple of minutes.
Vapor supports the same versions of Ubuntu that Swift supports.
Visit Swift.org's Using Downloads guide for instructions on how to install Swift on Linux.
Double check the Swift installation was successful by printing the version.
You should see output similar to:
Apple Swift version 4.1.0 (swiftlang-900.0.69.2 clang-900.0.38) Target: x86_64-apple-macosx10.9
You can also use Swift's official Docker images which come with the compiler preinstalled. Learn more at Swift's Docker Hub.
Now that you have Swift installed, let's install the Vapor Toolbox. This CLI tool is not required to use Vapor, but it includes helpful utilities.
On Linux, you will need to build the toolbox from source. View the toolbox's releases on GitHub to find the latest version.
Vapor 3 compatible versions of the toolbox are semver major 3.
git clone https://github.com/vapor/toolbox.git cd toolbox git checkout <desired version> swift build -c release --disable-sandbox mv .build/release/vapor /usr/local/bin
Double check the installation was successful by printing help.
You should see a list of available commands.
Now that you have installed Vapor, create your first app in Getting Started → Hello, world.