Skip to content

Server Settings

This page covers server-specific settings for Jan’s local API. For general Jan settings, see the main Settings Guide.

Navigate to Settings in Jan to configure server-related options.

Configure the local API server at Settings > Local API Server:

  • Host & Port - Network binding configuration
  • API Key - Authentication for API requests
  • CORS - Cross-origin resource sharing
  • Verbose Logging - Detailed request/response logs

See our API Configuration Guide for complete details.

Configure llama.cpp engine at Settings > Model Providers > Llama.cpp:

  • Backend Selection - Hardware-optimized versions
  • Performance Settings - Batching, threading, memory
  • Model Defaults - Context size, GPU layers

See our Engine Settings Guide for optimization tips.

Monitor API activity in real-time:

  1. Enable Verbose Server Logs in API settings
  2. View logs at System Monitor > App Log
  3. Filter by [SERVER] tags for API-specific events
  • Location: Stored in Jan Data Folder
  • Retention: Automatically cleared after 24 hours
  • Manual Clear: Settings > Advanced > Clear Logs

For optimal server performance:

  • High Traffic: Increase parallel slots in engine settings
  • Limited RAM: Reduce KV cache quality (q8_0 or q4_0)
  • Multiple Models: Enable model unloading after idle timeout

Advanced networking options:

  • Local Only: Use 127.0.0.1 (default, most secure)
  • LAN Access: Use 0.0.0.0 (allows network connections)
  • Custom Port: Change from default 1337 if conflicts exist
  • Always set a strong API key
  • Rotate keys regularly for production use
  • Never expose keys in client-side code
  • Keep server on localhost unless LAN access is required
  • Use firewall rules to restrict access
  • Consider VPN for remote access needs

Server won’t start:

  • Check port availability (netstat -an | grep 1337)
  • Verify no other instances running
  • Try different port number

Connection refused:

  • Ensure server is started
  • Check host/port configuration
  • Verify firewall settings

Authentication failures:

  • Confirm API key matches configuration
  • Check Authorization header format
  • Ensure no extra spaces in key

For more issues, see our Troubleshooting Guide.