Doctor | scotty | Spatie

 SPATIE

  Scotty
=========

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Scotty](https://spatie.be/docs/scotty/v1)  Advanced-usage  Doctor

 Version   v1

 Other versions for crawler [v1](https://spatie.be/docs/scotty/v1)

  Doctor
- [ Introduction ](https://spatie.be/docs/scotty/v1/introduction)
- [ Support us ](https://spatie.be/docs/scotty/v1/support-us)
- [ Getting started ](https://spatie.be/docs/scotty/v1/getting-started)
- [ Requirements ](https://spatie.be/docs/scotty/v1/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/scotty/v1/installation)
- [ Questions and issues ](https://spatie.be/docs/scotty/v1/questions-issues)
- [ Changelog ](https://spatie.be/docs/scotty/v1/changelog)
- [ About us ](https://spatie.be/docs/scotty/v1/about-us)

Basic Usage
-----------

- [ Your first deploy script ](https://spatie.be/docs/scotty/v1/basic-usage/your-first-deploy-script)
- [ The Scotty.sh format ](https://spatie.be/docs/scotty/v1/basic-usage/bash-format)
- [ Running tasks ](https://spatie.be/docs/scotty/v1/basic-usage/running-tasks)

Advanced Usage
--------------

- [ Doctor ](https://spatie.be/docs/scotty/v1/advanced-usage/doctor)
- [ File lookup order ](https://spatie.be/docs/scotty/v1/advanced-usage/file-lookup-order)
- [ Envoy compatibility ](https://spatie.be/docs/scotty/v1/advanced-usage/envoy-compatibility)
- [ Zero-downtime deployments ](https://spatie.be/docs/scotty/v1/advanced-usage/zero-downtime-deployments)

 Doctor
======

Before you run a deploy for the first time, it's a good idea to check that everything is set up correctly. That's what `scotty doctor` does:

```
scotty doctor
```

It runs through a series of checks:

1. **Scotty file exists** and can be found
2. **File parses successfully** without syntax errors, and shows how many tasks and macros were found
3. **Servers are defined** in the file
4. **Tasks are defined** in the file
5. **Macros reference valid tasks** so you don't get surprised mid-deploy by a typo
6. **SSH connectivity** to each remote server, including connection timing
7. **Remote tools** checks whether `php`, `composer`, `node`, `npm`, and `git` are available on each reachable server

![scotty doctor](https://github.com/spatie/scotty/blob/main/docs/images/scotty-doctor.jpg?raw=true)

This is especially useful after setting up a new server, when debugging connection issues, or before your first deploy to a new environment. If something is off, doctor will tell you exactly what.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
