Prerequisites:
- Node.js 18 or later
- A Decipher account
- A local dev server running on a known port (e.g.,
localhost:3000)
Step 1: Install the CLI
Install the tunnel CLI globally using your preferred package manager:Step 2: Authenticate
1
Start the login flow
Run the login command in your terminal:Your browser will open to the Decipher dashboard.
2
Copy your token
The dashboard displays a one-time authentication token. Click the copy button to copy it to your clipboard.
3
Paste the token
Switch back to your terminal and paste the token when prompted. You’ll see a success message confirming you’re logged in.
Step 3: Start a Tunnel
1
Start your local dev server
Make sure your app is running locally. For example:Confirm it’s accessible at
http://localhost:3000 (or whichever port you use).2
Open the tunnel
In a separate terminal window, run:Replace Incoming requests are logged in real-time so you can see test traffic as it arrives.
3000 with your local server’s port. The CLI will start the tunnel and display your public URL:3
Stop the tunnel
Press Ctrl+C in the terminal to stop the tunnel, or run:
Step 4: Use the Tunnel URL in Decipher
Once your tunnel is running, use the public URL as the Base URL when recording or running tests in the Decipher dashboard. Any test pointed at that URL will hit your local server through the tunnel.CLI Reference
Troubleshooting
Tunnel already running / port already in use
Tunnel already running / port already in use
Only one tunnel can be active at a time. Stop the existing tunnel first:Then start a new one with
decipher-tunnel forward -p <port>.'Not logged in' error
'Not logged in' error
Your session may have expired. Log in again:If the issue persists, log out first and then log back in:
502 errors in the tunnel logs
502 errors in the tunnel logs
This usually means your local dev server isn’t running. Make sure your app is started and accessible at the port you forwarded before sending traffic through the tunnel.
Need help? Contact our support team.