Loading...
Loading...
Set up and use portless for named local dev server URLs (e.g. http://myapp.localhost instead of http://localhost:3000). Use when integrating portless into a project, configuring dev server names, setting up the local proxy, working with .localhost domains, or troubleshooting port/proxy issues.
npx skill4agent add vercel-labs/portless portlessEADDRINUSElocalhost.envlocalhost:3000npm install portlesspnpm add portlessnpxnpm install -g portless# Install globally
npm install -g portless
# Start the proxy (once, requires sudo for port 80)
sudo portless proxy
# Run your app
portless myapp next dev
# -> http://myapp.localhost{
"scripts": {
"dev": "portless myapp next dev"
}
}sudo portless proxypnpm devnpm run devportless myapp next dev # http://myapp.localhost
portless api.myapp pnpm start # http://api.myapp.localhost
portless docs.myapp next dev # http://docs.myapp.localhostPORTLESS=0PORTLESS=skipPORTLESS=0 pnpm dev # Bypasses proxy, uses default portsudo portless proxy--portportless <name> <cmd>PORThttp://<name>.localhost.localhost127.0.0.1/etc/hostsPORT| Command | Description |
|---|---|
| Run app at |
| Show active routes |
| Start the proxy daemon on port 80 |
| Start the proxy on a custom port |
| Stop the proxy daemon |
| Show help |
| Show version |
portless <name> <cmd>sudo portless proxyportless proxy --port 8080 # No sudo needed for ports >= 1024PORT--port $PORTprocess.env.PORTsudosudosudo portless proxy # Port 80, requires sudo
portless proxy --port 8080 # Port 8080, no sudo needed
sudo portless proxy stop # Stop requires sudo if started with sudo