start-pnode
v1.0.11
Published
PNode agent (legacy package for Tunyl)
Maintainers
Readme
PNode Launcher
start-pnode is the legacy package name for Tunyl.
It continues to work against the current tunyl.com platform, but new integrations should prefer tunyl.
PNode allows you to securely expose local web applications, APIs, or development servers to the Internet.
It creates an encrypted tunnel from a public domain to your local machine using a lightweight agent — no firewall rules, NAT configuration, or VPS required.
PNode is well suited for:
- local backend APIs
- frontend development servers
- resource-intensive workloads (AI models, ML inference, etc.)
How it works
You run a local agent that forwards traffic from a public domain to a port on your machine.
PNode supports two modes:
- Anonymous mode — no account, temporary domain
- Authorized mode — fixed domain tied to your project
Anonymous Mode
Anonymous mode requires no registration and no credentials.
npx start-pnode@latest --port 3000- A temporary domain like
tmp-abc123.tunyl.comis assigned automatically - The domain is valid for 12 hours
- The port must be explicitly specified
Authorized Mode
Authorized mode uses a single Agent Token generated for your project.
The token identifies the project and grants access to its fixed domain.
export AGENT_TOKEN=your-agent-token
export LOCAL_PORT=3000
npx start-pnode@latestOr using CLI arguments:
npx start-pnode@latest --token your-agent-token --port 3000Authorized mode provides:
- a fixed public domain (e.g.
yourname.tunyl.com) - higher usage limits
- optional frontend / backend separation
Using in your apps
import { Tunnel } from 'start-pnode';
import { createServer, IncomingMessage, ServerResponse } from 'http';
const port = 3000;
const server = createServer((req: IncomingMessage, res: ServerResponse) => {
res.end('Hello world!');
});
server.listen(port, '127.0.0.1', () => {
const proxy = new Tunnel({
agentAccessToken: '<YOUR_TOKEN>',
localPort: port,
});
proxy.start();
proxy.on('stopped', () => server.close());
});Environment Variables
Anonymous Mode
No variables required.
Optional:
LOCAL_PORT— local forwarded port
Authorized Mode
AGENT_TOKEN— project access tokenLOCAL_PORT— local forwarded port
CLI Options
Options:
--token <token> Agent token (env: AGENT_TOKEN)
--port <port> Local forwarded port (env: LOCAL_PORT)
--host <host> Local forwarded host (default: "localhost", env: LOCAL_HOST)
-t, --test Test mode
-h, --help Display helpExample
Expose a local API running on port 5000:
node server.js --port 5000
npx start-pnode@latest --port 5000Or with a project token:
export AGENT_TOKEN=...
npx start-pnode@latest --port 5000Security
All traffic between the agent and Tunyl servers is encrypted. Only users with a valid Agent Token can start authorized tunnels.
Links
- Website: https://tunyl.com
- Documentation: https://tunyl.com/docs
