Global Flags
These flags work with all commands:--help, -h
Show help information for a command.
--version, -v
Show the installed version of Portless.
App Running Flags
These flags work withportless run and portless <name> commands:
--force
Override an existing route registered by another process.
--force, you’ll get an error if a route is already registered:
--force, the old route is replaced with the new one.
--app-port <number>
Use a fixed port for the app instead of automatic assignment (4000-4999 range).
- Your app requires a specific port
- You need to match a port in another config file
- You’re debugging port-related issues
--name <name>
Force the use of a specific app name, bypassing subcommand dispatch. Useful for using reserved names.
run, get, alias, hosts, list, trust, proxy
--
Stop flag parsing. Everything after -- is passed directly to your command.
Proxy Flags
These flags work withportless proxy start:
--port <number>, -p <number>
Port for the proxy to listen on (1-65535).
PORTLESS_PORT environment variable)
--https
Enable HTTP/2 with TLS using auto-generated certificates.
- Generates local CA
- Adds CA to system trust store (prompts for sudo on Linux)
- Generates wildcard certificate for
*.localhost
--cert <path>
Path to a custom TLS certificate in PEM format. Must be used with --key. Implies --https.
-----BEGIN CERTIFICATE-----.
--key <path>
Path to a custom TLS private key in PEM format. Must be used with --cert. Implies --https.
-----BEGIN PRIVATE KEY----- or similar.
--no-tls
Disable HTTPS even if PORTLESS_HTTPS environment variable is set.
--foreground
Run the proxy in the foreground instead of as a daemon. Useful for debugging.
Alias Flags
These flags work withportless alias:
--force
Override an existing route when creating an alias.
--remove
Remove an existing alias.
Get Flags
These flags work withportless get:
--no-worktree
Skip worktree prefix detection when generating the URL.
Flag Placement
Flags can appear in different positions depending on the command:Run Command
Named Mode
With --
-- is passed to your command untouched.
Examples
Multiple Flags
Flag Conflicts
See Also
- Environment Variables - Configure defaults for flags
- portless run - Run command reference
- portless proxy - Proxy command reference