---
title: "Fly Friday - Flyctl and Ports"
description: "Flyctl adds a new -p option to flyctl apps create, allowing users to set an app’s internal port during initial creation. The numeric value is written to the generated fly.toml configuration, replacing the default port of 8080. This addresses workflows using prebuilt Docker images, where users may not control the port and previously had to create the app, edit fly.toml, and change the internal port manually. Available from Flyctl release 0.94, the flag removes that edit and is shown in the first Fly Friday video. The post defines the internal port as the port an application uses to communicate with the world, while the command-line setting supplies that value before deployment configuration is generated."
---

# Fly Friday - Flyctl and Ports

[Fly.io](https://yomu.fyi/company/fly-io) · Feb 14, 2020

**Type:** Announcement

## Summary

Flyctl adds a new -p option to flyctl apps create, allowing users to set an app’s internal port during initial creation. The numeric value is written to the generated fly.toml configuration, replacing the default port of 8080. This addresses workflows using prebuilt Docker images, where users may not control the port and previously had to create the app, edit fly.toml, and change the internal port manually. Available from Flyctl release 0.94, the flag removes that edit and is shown in the first Fly Friday video. The post defines the internal port as the port an application uses to communicate with the world, while the command-line setting supplies that value before deployment configuration is generated.

## Context

Prebuilt Docker images may use ports that app users cannot control, creating a workflow in which users must create a Fly app and then manually edit fly.toml to change the internal port from its default.

## Approach / What changed

Add a numeric -p option to flyctl apps create so the requested internal port is automatically written to the generated fly.toml configuration. The option is available starting with Flyctl release 0.94.

## Takeaways

- The -p flag is used when creating a Fly app for the first time and accepts a numeric internal-port value.
- Generated Fly configurations default to internal port 8080 when no different port is specified.
- The flag removes the need to edit fly.toml after app creation when using a prebuilt Docker image with a different port.

**Tags:** [Deployment](https://yomu.fyi/topic/deployment), [Docker](https://yomu.fyi/topic/docker), [Fly](https://yomu.fyi/topic/fly)

- Source: [Fly.io](https://fly.io/blog/fly-friday-flyctl-and-ports)
- Source URL: https://fly.io/blog/fly-friday-flyctl-and-ports
- Ingested by Yomu: 2026-09-02T11:58:35.379Z

[Read original post](https://fly.io/blog/fly-friday-flyctl-and-ports)
