opening soon
Help

When something goes wrong

Find the message you got, read what it means and what to do. Below that: answers to common questions, and where to write when this page did not help.

First checks

Most problems are one of these four. Go through them in order before reading further.

  1. Is your app running? Open http://localhost:<port> in a browser on the same machine. If that does not load, the tunnel has nothing to show.
  2. Is it the right port? Use the port your dev server printed when it started, not the one you expected.
  3. Is the client still running? A tunnel lives only while portmole http, portmole console or the agent session that opened it is running.
  4. Is the address exactly right? It is <name>-<your GitHub name>.portmole.dev, with https:// in front. Copy it from the client instead of typing it.

Messages that visitors see in the browser start with portmole:. Messages in your terminal or from your agent start the same way or are listed below as they appear.

Installing and starting

portmole: command not found, or "is not recognized"
The program is not on your PATH. After npm install -g portmole, open a new terminal window. If you downloaded the program from the releases page, put it in a folder that is on your PATH. Without installing anything, npx -y portmole version runs it once.
portmole: cannot run "…" as given
The command or its arguments are not ones portmole knows; the list of commands is printed under the message. portmole http needs a port and takes at most one name: portmole http 3000 demo.
invalid port "…"
The port must be a whole number from 1 to 65535.
invalid name "…"
The name you passed has no letter or digit in it. Use letters, digits and hyphens.
unsupported protocol version, update portmole
The client is too old for the server. With npx -y portmole you always get the current one; otherwise run npm install -g portmole again.
server refused connection: …
portmole answered, but would not take the connection; the reason follows the colon. 503 with "the server cannot check tokens right now" is a problem on our side that passes by itself: try again in a minute.
A network error, such as "no such host" or "connection refused"
The client could not reach portmole.dev. Check your internet connection and whether a firewall or proxy blocks outgoing HTTPS. If PORTMOLE_SERVER is set in your environment, the client is talking to that server instead; unset it.

Signing in

The terminal keeps waiting after I signed in to GitHub
Signing in has two confirmations. GitHub asks first; then a portmole page shows your name and the code, with an Approve button. The machine is signed in only after you press that button. Go back to the browser tab and press it.
The page shows a different code than my terminal
That page belongs to an earlier attempt. Close it and open the link the client printed last. Never approve a code you do not see on your own machine.
That code is not valid or has expired.
A link works for 10 minutes and only once. Run the command, or ask your agent for the tunnel, again to get a new one.
This sign-in link has expired. / This sign-in has expired. / This request has expired.
Too much time passed between the steps. Start again from your terminal or agent; the page says the same.
sign-in expired, start again
The client waited 10 minutes without an approval. Run the command or call the tool again for a new link.
server refused to start sign-in (status 429)
Five sign-ins started from your network are still waiting for approval, usually because the command was run over and over. Approve one of them, or wait: an unused link expires after 10 minutes.
the server rejected the token
The token was revoked, for example by portmole logout on this machine or by us. With a stored token the client starts a new sign-in by itself. With PORTMOLE_TOKEN, replace the token.
this account has been closed by the operator, so tunnels cannot be opened
We closed the account, normally after an abuse report. Signing in again does not help, and the client keeps your sign-in for the case that the account is reopened. If you think it is a mistake, write to hello@portmole.com and name your GitHub account.
signed out locally, but the server could not be reached to revoke the token
portmole logout removed the token from this machine but could not tell the server. Run portmole login and then portmole logout again when you are online, or write to us to have the account's sign-ins ended.
I signed in with the wrong GitHub account
Run portmole logout, sign out of GitHub in your browser or switch account there, then run portmole login.

Opening a tunnel

the free plan allows 2 tunnels at a time, close one first
Two tunnels are already open on your account, possibly on another machine, in the console or in another agent session. Close one with Ctrl+C, the console's Close button or tunnel_close.
too many connections for this account, close one first
Each running portmole http, console and agent session with a tunnel holds one connection, and an account may hold four at once. Stop one you no longer use.
tunnel name is in use by another session
The same name is open from another machine or another command on your account. Pass a different name, or close the other one. Agents get a name with four random characters added instead, and say so.
tunnel "…" is already open in this session
This command or session already has a tunnel with that name. Use it, or close it first.
the name "…" is taken by localhost:… in this session, pass another name
In one agent session, a name can stand for one port. Ask the agent to open the second port under another name.
invalid tunnel name: use a-z, 0-9 and -
Names may contain lower-case letters, digits and hyphens, and must start and end with a letter or digit. The client cleans names for you, so this appears only with a client that was changed.
tunnel name is too long
Name and GitHub name together must fit in 63 characters. The client cuts names at 26 characters, which always fits.
basic_auth must be user:password
The value needs a user name, a colon and a password.
unknown kind of bot "…": use search, ai_crawlers, ai_assistants, all or none
The list after --bots= or in allow_bots has a word portmole does not know. Separate the kinds with commas.
this account has used its data allowance for today
5 GB went through your tunnels today, so no new tunnel opens. It works again after midnight UTC.
too many requests, slow down
The client asked the server more than 120 things in a minute, which only a script opening and closing tunnels in a loop does. Wait a minute.
the session with … ended (its time limit was reached or the token was revoked); run the command again
The command stops when the 2 hour session is over. Run it again; the address will be the same.

What visitors get

These are shown to whoever opens the address, with the status in brackets.

portmole: nothing is listening on localhost:<port> (502)
The tunnel works, your app does not answer. Start the dev server, or check that the port is the one it printed. A server that listens only on another network interface must be told to listen on localhost.
portmole: no tunnel is open at this address (404)
Nobody has this address open right now. The client was stopped, the session ended, or the name in the link is misspelled. Open the tunnel again; the address will be the same.
portmole: the tunnel did not answer (502)
The tunnel was open but the connection to your machine broke during the request. The client reconnects by itself within seconds; try again.
portmole: this tunnel asks for a user name and password (401)
The tunnel is password protected and the request had no credentials or wrong ones. After 10 wrong answers in a minute that visitor is locked out for the rest of the minute, even with the right password.
portmole: this tunnel does not admit this kind of bot (403)
The visitor introduced itself as a crawler the tunnel keeps out. If it is a tool of your own with such a name in its User-Agent, open the tunnel with that kind admitted; see bots and crawlers.
portmole: too many requests, try again in a minute (429)
One visitor passed 120 requests in a minute, the tunnel passed 1200 in total, or 200 requests were in flight at once. It clears by itself, and the answer carries Retry-After: 60. A page that polls several times a second will hit this.
portmole: this account has used its data allowance for today (429)
5 GB went through your tunnels today. Transfers in progress are cut. Tunnels work again after midnight UTC.
A notice titled "You are leaving the public web"
That is the visitor notice every tunnel shows on the first browser visit, not an error. Continue to the site opens your page. See what visitors see.
The page loads without styles, or scripts fail
Your app probably links its files with an absolute address such as http://localhost:3000/app.css, which a visitor's browser cannot reach. Use relative addresses, or set the public address in your dev server's configuration.
My dev server answers "Invalid Host header" or "Blocked request"
Some dev servers refuse requests for names they do not know. Add your tunnel's name to the server's list of allowed hosts; its documentation says where.

Limits

The free plan's numbers, as they are today. The docs say what happens at each.

LimitValue
Tunnels open at once2 per account
Requests120 a minute from each visitor on each tunnel; 1200 a minute per tunnel in total
Requests in flight200 at once, per tunnel
Data5 GB a day per account, both directions, until midnight UTC
Session length2 hours, then the client stops and you start it again
Connections4 per account

Coding agents

The agent does not have the tools
MCP servers are loaded when an agent session starts. Start a new session after adding portmole, and check that npx -y portmole version runs in a terminal.
The desktop app cannot start the server
Desktop apps do not always find npx, which happens on Windows. Install portmole with npm install -g portmole and use portmole with the argument mcp as the command; the docs show the entry.
Sign-in needed. Ask the user to open …
Not an error: this machine has no token yet. Open the link, approve the code, then ask the agent for the tunnel again.
The agent opened a tunnel with a name I did not expect
Without a name, the folder the agent works in names the tunnel. A second port of the same project gets the port in its name, and a name already open from another machine gets four random characters. Tell the agent the name you want.
no open tunnel named "…"
The tools take the tunnel name, such as my-shop, not the full address. tunnel_list shows the names. After a session ended, the tunnels are gone; open them again.
The tunnel closed when I closed the agent
Tunnels opened by an agent live as long as its session. For a tunnel that stays, run portmole http 3000 in a terminal of its own.

The console

The console is not at port 4040
Something else uses 4040, so the command picked a free port. Use the address it printed after Console:.
The page is empty or stops updating
The portmole console command was stopped, or it is reconnecting. Look at the terminal it runs in; start it again if it ended.
wrong host / not from the console page (403)
The console answers only at 127.0.0.1 or localhost with its own port, and takes changes only from its own page. Open it at the address the command printed, not through another name or a proxy.
a tunnel named "…" is already open
You renamed a tunnel to a name another tunnel in the console has. Pick another name.
I do not see the tunnel my agent opened
The console shows only the tunnels opened in it.

Questions and answers

What does it cost?

Nothing. There is one plan today and it is free. Paid plans are not available yet.

Do I need an account?

You sign in with GitHub. There is no separate portmole password, and portmole asks GitHub only who you are.

Will my address be the same tomorrow?

Yes, as long as you open the tunnel with the same name. Without a name the folder names the tunnel, so the same project gets the same address every time.

Can I choose the whole address, or use my own domain?

You choose the first part. The part after the last hyphen is your GitHub name and is fixed when you first sign in. Names without it and your own domain are not available yet.

Can I open more than one port?

Two at a time on the free plan: for example a frontend and an API. An agent opens both in one session; in a terminal, run portmole http twice with two names, or open both in the console.

Does it work for webhooks?

Yes. Requests that are not page views in a browser go straight to your app, without the visitor notice, and the request log shows what arrived, with headers.

Do WebSockets and large uploads work?

Yes. WebSockets pass through, and uploads and downloads have no size limit of their own; they count toward the daily data allowance.

Can I tunnel a database, SSH or another protocol?

No. A tunnel carries HTTP and WebSockets.

Can I switch off the notice visitors see first?

Not on the free plan. It is shown once a day per browser and never to webhooks, scripts or API calls.

Will my development site end up in Google?

Not unless you ask for it. By default a tunnel turns search crawlers away, marks every answer as not to be indexed and serves its own robots.txt.

Can portmole read my traffic?

It passes through our server in the clear, because the server has to read each request to route it. Request and response bodies are never stored. The security model and the privacy page say exactly what is kept.

Does it open a port on my machine or router?

No. The client makes one outgoing connection over TLS and needs no admin rights. The console is the one thing that listens, and only on your own machine.

I use two computers. Do I sign in twice?

Yes, each machine has its own token. The limit of two tunnels counts across all of them.

How do I close a tunnel?

Press Ctrl+C in the terminal that runs it, use the console's Close button, ask your agent to close it, or end the agent session.

How do I use it in CI or a script?

Set PORTMOLE_TOKEN to a token. With it set, the client never starts a sign-in.

Is the code open?

The client, the program that runs on your machine, is open source under Apache-2.0 on GitHub. The hosted service is not.

How do I delete my account?

Run portmole logout on your machines, then write to hello@portmole.com. The privacy page says what proof we ask for and what is kept for how long.

Where to write

hello@portmole.com
Questions, problems this page did not solve, account requests.
abuse@portmole.com
A tunnel used for phishing, malware or other harm. The abuse page says what to include.
security@portmole.com
A security problem in portmole itself. Please give us time to fix it before publishing.
GitHub issues
Bugs and ideas for the client, in the open repository. Do not post tokens or private addresses there.

A report we can act on has four things in it:

  • The output of portmole version and your operating system.
  • The command you ran, or what you asked your agent.
  • The exact message, copied, not retyped.
  • The time it happened, with your time zone.

Never send your token or the contents of credentials.json. We do not need them and will not ask.