Skip to main content
Proper network configuration is essential for Nicotine+ to connect to the Soulseek network and accept incoming connections for file transfers.

Server Configuration

Server Address

Connect to the official Soulseek server:
The server address is a tuple containing the hostname and port number.

Authentication

Passwords are stored in plain text. Set restrictive file permissions on your config file:

Auto-Connect

When enabled, Nicotine+ automatically connects to the server on startup.

Port Configuration

Listening Port

Nicotine+ requires an open TCP port for incoming connections:
1

Configure Port Range

Format: [min_port, max_port]Use the same value for both to bind to a specific port.
2

Set via Command Line

Command line arguments override config settings.
3

Verify Port is Open

After connecting, check your port status in the GUI or visit:https://www.slsknet.org/porttest.php?port=2234
If portrange contains different values, Nicotine+ will attempt to bind to a random port within the range.

Common Port Issues

Ensure your firewall allows incoming TCP connections:Linux (ufw):
Linux (iptables):
Windows: Add an inbound rule in Windows Defender Firewall for TCP port 2234.
If behind a NAT router, you need either:
  1. Automatic forwarding using UPnP/NAT-PMP (recommended)
  2. Manual port forwarding in your router settings
Forward external port 2234 → your local IP:2234
Running multiple instances requires different ports:

Network Interface Binding

Bind to Specific IP

Useful for VPN connections or multi-homed systems:
1

Set Interface IP

Leave empty ("") to bind to all interfaces.
2

Override via CLI

3

Verify Binding

Check the debug log to confirm binding:
When using a VPN, bind to the VPN interface IP to ensure all Nicotine+ traffic routes through the VPN.

Finding Your Interface IP

Linux:
Windows:
Look for the IP address of your desired network interface (e.g., tun0 for VPN, eth0 for ethernet).

UPnP / NAT-PMP

Automatic Port Forwarding

Nicotine+ supports automatic port forwarding using UPnP and NAT-PMP protocols:
UPnP automatically configures your router to forward the listening port. This is the easiest way to accept incoming connections.

How It Works

1

Discovery

Nicotine+ discovers UPnP/NAT-PMP capable routers on your network using multicast discovery.
2

Port Mapping

Creates a port mapping rule on your router:
  • External port: 2234 (configurable)
  • Internal IP: Your local machine IP
  • Internal port: 2234
  • Protocol: TCP
  • Lease duration: 12 hours
3

Renewal

Automatically renews the port mapping every 2 hours (before the 12-hour lease expires).

Protocol Priority

  1. NAT-PMP - Tried first (faster, simpler)
  2. UPnP - Fallback if NAT-PMP unavailable
  • Standard port: UDP 5351
  • Request attempts: 2
  • Timeout: 0.25 seconds initially, doubles on retry
  • Discovers gateway via routing table
  • Discovery: SSDP multicast to 239.255.255.250:1900
  • Supported services:
    • WANIPConnection:2 (preferred)
    • WANIPConnection:1
    • WANPPPConnection:1
  • HTTP timeout: 5 seconds
  • Multicast TTL: 2

Troubleshooting UPnP

If UPnP fails, check the debug log for detailed error messages.
Common Issues:
Enable UPnP in your router’s administration panel. Usually found under:
  • Advanced Settings → UPnP
  • NAT → UPnP
  • Firewall → UPnP
Ensure your firewall allows:
  • Outbound UDP to 239.255.255.250:1900
  • Outbound TCP to router’s control URL
When using a VPN, UPnP won’t work with your local router. Options:
  1. Use VPN provider’s port forwarding (if available)
  2. Manual port forward on exit node
  3. Accept limited connectivity
Some routers only support permanent leases:
Nicotine+ automatically retries with lease_duration=0.

Manual Port Forwarding

If UPnP is unavailable:
1

Find Your Local IP

2

Access Router Admin

Navigate to your router’s IP (commonly 192.168.1.1 or 192.168.0.1) in a web browser.
3

Create Port Forward

Add a port forwarding rule:
  • Protocol: TCP
  • External Port: 2234
  • Internal IP: Your local IP
  • Internal Port: 2234
  • Description: Nicotine+
4

Disable UPnP in Nicotine+

Connection Testing

Port Checker

Test if your port is accessible from the internet:
Or visit in a browser:
The port checker URL is defined in pynicotine/__init__.py:

Debug Network Issues

Enable debug logging to diagnose connection problems:
Check debug logs for:
  • NAT-PMP: Portmap request attempt...
  • UPnP: SSDP request sent...
  • Binding socket to local IP address...

Advanced Settings

CTCP Messages

Enable Client-To-Client Protocol messages (rarely used).

IP Blocking

Network Performance

Connection Limits

While not directly configurable in network settings, connection behavior is influenced by:
See Downloads & Uploads for more details on managing transfers.

Bandwidth Management

Configure upload/download speed limits:
Use bandwidth limits to prevent Nicotine+ from saturating your connection.

VPN Configuration Example

Complete example for using Nicotine+ with a VPN:
Ensure your VPN provider supports port forwarding. Many VPNs do not allow incoming connections.

Docker / Container Networking

When running in containers:
Docker port mapping:
Manually forward port 2234 on your host to the container.

Network Configuration Validation

Verify your configuration:
1

Check Config Values

Ensure port range is valid:
2

Connect to Server

Successful connection confirms server settings are correct.
3

Test Port Access

Use the port checker to verify incoming connections work.
4

Monitor Debug Log

Enable debug logging and watch for network-related messages:
  • Port binding confirmations
  • UPnP/NAT-PMP status
  • Connection attempts