<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

Running multiple servers

From SqueezeboxWiki

Revision as of 03:36, 8 August 2011 by Soulkeeper (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To run multiple Squeezebox Server (SBS) instances on one server machine, each running instance needs to listen on its own IP address.

By default an SBS instance will listen on all addresses using localhost (127.0.0.1). This can be overridden by setting the IP address using command line options. There are four of them:

   --playeraddr <ip address>
   --streamaddr <ip address>
   --httpaddr <ip address>
   --cliaddr <ip address>

The only one that gets written to server.prefs is httpaddr. It can be changed in the server.prefs file, but it's not necessary if you're going to use --httpaddr command line argument to start the SBS instance.

The above needs to be done for all SBS instances running on the machine, not just the 'extra' ones. If an SBS instance is not configured to listen on a specific IP Address, it will interfere with others, preventing one of them from running.

Additionally, from the command line you'll want to designate the directory locations unique to each instance of the server:

   --prefsdir <directory>
   --cachedir <directory>
   --logdir <directory>

It is possible to clone preferences from one SBS instance for use with another. Cloning is nice because you'll have all of your old server and player settings. Do the following:

  • Give the server/library a different name (libraryname preference).
  • Remove the server UUID (server_uuid). Remove the line from the server.prefs file, and a new unique ID will be generated when the server is started.
  • If the two SBS instances use different program installation directories, change the paths to the IR maps (irmap entries). There will be one entry for each client saved in the file.
  • Change the music folder location (audiodir) if necessary. This can be specified on the command line, but may be best to configure in the SBS Web UI settings, otherwise the command line option will override this preference whenever the server is restarted.
  • Each server must have its own database. If you're running either the bundled MySQL or SQLite, the database will automatically be created by default in the cache folder. If you want to configure an SBS instance to use your own DB instance, change the database name (dbsource). The dbpassword and dbusername entries are only used for MySQL. Set them as needed.

Preventing player firmware swaps

If you run different versions of the server and will be connecting your players to them, you probably don't want firmware upgrading and downgrading all the time. Players will work just fine with the most recent firmware version connecting to an older server.

Designate one server as the master server.

First, copy the server/Firmware directory from the main server installation to each additional server installation so that all servers have the same ip3k firmware.

For SqueezePlay firmware, which is downloaded when available, only allow the main server to download firmware updates automatically.

Any additional servers should have updates disabled in server.prefs. Set the following preferences:

   checkVersion: 0
   autoDownloadUpdate: 0

See also