Skip to main content

Overview

The ports section validates that specific network ports are available for use. This prevents conflicts when your application tries to bind to ports already in use by other services.

Configuration

The ports field is a simple array of port numbers (src/config.rs:14):
array<number>
default:"[]"
List of port numbers to check for availability. Each port should be a number between 1 and 65535.

Format

Ports are specified as a simple YAML array:

Examples

Single Port

Check that a single port is available:

Multiple Ports

Check multiple ports used by your application and services:

With Comments

YAML comments help document which service uses each port:

Real-World Examples

Common Port Numbers

Here are commonly used port numbers for development:

Validation Behavior

Port checks verify that ports are available (not in use). Validation will fail if:
  • A port is already bound by another process
  • The port number is invalid (< 1 or > 65535)
  • Insufficient permissions to check the port (typically ports < 1024 require elevated privileges)
Port availability checks verify that ports are not in use. If a required service should already be running on a port, use network checks instead to verify connectivity.
Port checks are particularly useful in development environments where multiple projects or services might conflict. Run envcheck before starting your development server to catch port conflicts early.

No Port Checks

If your project doesn’t need to validate port availability, simply omit the ports section entirely:
From src/config.rs:14, the ports field defaults to an empty array when not specified.