Skip to content

Multiplayer and silver-server daemon with default ports are in conflict #1984

@hypnoticpattern

Description

@hypnoticpattern

Describe the bug
When a user runs the multiplayer command to enable multiplayer mode, it creates a persistent job that automatically restarts when the server starts. However, when subsequently running sliver-server daemon, the daemon fails to start because both the persistent multiplayer job and the daemon attempt to bind to the same port (31337 by default), resulting in a "bind: address already in use" error.

To Reproduce

  1. Use the latest version from master available as of 2025/08/10 and compile the server
  2. Start the sliver server normally: ./sliver-server
  3. Enable multiplayer mode: multiplayer
  4. Exit the server: exit
  5. Try to start the server in daemon mode: ./sliver-server daemon. The same applies if the daemon is started through the config file in .sliver/config/server.json enabling "daemon_mode": true
  6. See error: [!] Failed to start daemon listen tcp :31337: bind: address already in use

Expected behavior
The sliver-server daemon command should start successfully without port conflicts. The daemon should either skip conflicting persistent multiplayer jobs or use the existing multiplayer listener to serve the same purpose.

Screenshots

./sliver-server

 	  ██████  ██▓     ██▓ ██▒   █▓▓█████  ██▀███
	▒██    ▒ ▓██▒    ▓██▒▓██░   █▒▓█   ▀ ▓██ ▒ ██▒
	░ ▓██▄   ▒██░    ▒██▒ ▓██  █▒░▒███   ▓██ ░▄█ ▒
	  ▒   ██▒▒██░    ░██░  ▒██ █░░▒▓█  ▄ ▒██▀▀█▄
	▒██████▒▒░██████▒░██░   ▒▀█░  ░▒████▒░██▓ ▒██▒
	▒ ▒▓▒ ▒ ░░ ▒░▓  ░░▓     ░ ▐░  ░░ ▒░ ░░ ▒▓ ░▒▓░
	░ ░▒  ░ ░░ ░ ▒  ░ ▒ ░   ░ ░░   ░ ░  ░  ░▒ ░ ▒░
	░  ░  ░    ░ ░    ▒ ░     ░░     ░     ░░   ░
		  ░      ░  ░ ░        ░     ░  ░   ░

All hackers gain improvise
[*] Server v0.0.0 - c6bbba16e15abc8a044c62f2cd4a4bbdbbe459e1 - Dirty
[*] Welcome to the sliver shell, please type 'help' for options

sliver > jobs

 ID   Name   Protocol   Port   Domains
==== ====== ========== ====== =========
 1    mtls   tcp        8443

sliver > multiplayer

[*] Multiplayer mode enabled!

sliver > jobs

 ID   Name        Protocol   Port    Domains
==== =========== ========== ======= =========
 1    mtls        tcp        8443
 2    grpc/mtls   tcp        31337

sliver > exit

Exiting...
f785616ee887:/app$ ./sliver-server daemon
[!] Failed to start daemon listen tcp :31337: bind: address already in use
f785616ee887:/app$

Desktop (please complete the following information):

  • OS: Debian
  • Version: 12

Additional context
The issue occurs because:

  1. The multiplayer command saves a persistent job to the database that binds to port 31337
  2. When sliver-server daemon starts, it first attempts to restart all persistent jobs (including the multiplayer job)
  3. The daemon job tries to bind to port 31337 and fails because the multiplayer already has a bind on the same port
  4. This causes the daemon startup to fail with a port binding error

Both the multiplayer listener and daemon serve the same purpose (allowing operators to connect via mTLS), so having both running simultaneously is redundant and causes this conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions