# Overview and Setup
Welcome to the Prefect Deployment Tutorial! This tutorial will cover:
- Setting up your environment to use either Prefect Cloud or Prefect Server
- Configuring and registering your first Flow
- Using a Prefect Agent to run that Flow
If you haven't yet, you might want to go through the Prefect Core Tutorial, which covers in greater detail how to write Prefect Flows.
# Install Prefect
Before starting the tutorial, you'll need a working install of the core Prefect library.
You can find installation instructions here.
# Select an Orchestration Backend
Prefect supports two different orchestration backends:
To use Prefect with either backend, you must first select that backend via the CLI:
$ prefect backend cloud
$ prefect backend server
Note that you can change backends at any time by rerunning the
prefect backend ... command.
# Authenticating with Prefect Cloud Cloud
If you're using Prefect Cloud, you'll also need to authenticate with the backend before you can proceed further.
# Create an API Key
To authenticate, you'll need to create an API Key and save it.
- Login to https://cloud.prefect.io
- Navigate to the API Keys page. In the User menu in the top right corner go to Account Settings -> API Keys -> Create An API Key.
- Copy the created key
- Save the key locally either in your
~/.prefect/config.tomlconfig file, or as an environment variable:
# ~/.prefect/config.toml [cloud] auth_token = <API_KEY>
# Create a Service Account Key
You'll need this token later in the tutorial. You can save it locally either in
~/.prefect/config.toml config file, or as an environment variable:
# ~/.prefect/config.toml [cloud.agent] auth_token = <SERVICE_ACCOUNT_API_KEY>