Know Your Ports

localhost:1337 - Jan Local AI Port Guide

Updated on Oct 24, 2026

localhost:1337

Jan Local AI Server Port

Open localhost:1337

Access your Jan local AI model server running on port 1337

Localhost:1337 is the default port for Jan, a privacy-focused open-source alternative to ChatGPT that runs 100% offline on any Windows, Mac, or Linux computer. The number “1337” (historically spelling “leet”, as in “elite”) gives a nod to hacker culture, making it an instantly memorable API endpoint.

Jan exposes an OpenAI-equivalent API natively. It spins up a local server on port 1337 with the identical layout as api.openai.com/v1, making it exceptionally easy for developers to plug Jan into applications meant for ChatGPT simply by changing the base URL.


Access localhost:1337 from Other Devices

Use Pinggy tunnel to share your Jan server globally:

ssh -p 443 -R0:localhost:1337 free.pinggy.io

This allows other applications on foreign networks to communicate securely with your local Jan models.

Jan’s API rejects requests whose Host header isn’t localhost, a local IP or an entry in its Trusted Hosts setting (403 Invalid host header), so rewrite the header when you tunnel: ssh -p 443 -R0:localhost:1337 -t free.pinggy.io "u:Host:localhost:1337".


Services and Software That Use Port 1337

Jan AI Ecosystem

  • Jan Desktop: The core UI and AI engine server
  • Jan API: The OpenAI-compatible local AI serving endpoint

Legacy / General

  • Game Servers: Often used in vintage gaming setups
  • Various Peer2Peer Clients: Traditional fallback port

When Jan boots up its inference server, replacing the endpoint inside your Python or Node tools with http://localhost:1337/v1 immediately pipes your traffic securely into your offline machine rather than OpenAI’s servers.


How to Troubleshoot Localhost:1337

If you can’t access localhost:1337, here’s how to diagnose and fix common Jan development server issues:

Step 1: Check if Jan is Running

Action: Confirm that Jan application is active.

How to check: Ensure the Jan desktop app is open and the local API server feature is enabled in its settings.

Step 2: Resolve Port Conflicts

Action: Ensure no other program is using port 1337.

How to fix: Use lsof -i :1337 (macOS/Linux) or netstat -ano | findstr :1337 (Windows) to see if another process is taking the port.

Step 3: Test the Connection

Action: Verify that the local API is accessible.

How to test: Run curl http://localhost:1337/v1/models to see if it responds with a list of models. If you set an API key in Jan, add -H "Authorization: Bearer YOUR_API_KEY", otherwise you get 401 Unauthorized.


Common Problems and Solutions

Here are typical issues with localhost:1337 and how to resolve them:

"Connection Refused" Error

Problem: Jan's API server is down.

Solution: Open Jan Desktop and ensure the local API server button is switched on in the settings.

"Port Already in Use" Error

Problem: Another application is occupying port 1337.

Solution: Find the conflicting process (often a local dev server or game server) and stop it, or configure Jan to use a different port if needed.

Model Not Loading

Problem: The API responds but requests time out or fail to generate.

Solution: Ensure a model is downloaded and actively loaded into Jan's memory before sending API requests.


Summary

  • What it is: localhost:1337 is the default port for the Jan offline local LLM.
  • Who uses it: AI engineers testing open-source capabilities using existing OpenAI SDK integrations.

Quick Start Commands

# Connect OpenAI SDK to Jan
export OPENAI_BASE_URL="http://localhost:1337/v1"