Table of Contents

Ampache Remote Catalogs

You can remotely connect one more more Ampache servers to one or more other Ampache servers. This is accomplished using XML-RPC. The below documentation will walk you through configuring two Ampache installs and connecting one to the other. This functionality is disabled by default.

What to setup first.

Ampache's Access Lists are by default Deny From All this means if we enable access_control without defining any ACL's we will be locked out of our own Ampache install. First we should create the ACL (Access Control List) on both servers.

Configure the ACL's on the server side.

Stream Access List

Name: Stream Access This is just the name of the ACL(Access List) so you can identify it later.
Start Address: 0.0.0.0 This is the start ip address of the range of ip addresses you're building the ACL for.
End Address: 255.255.255.255 This is the end ip address of the range of ip addresses you're building the ACL for.
User:NONE This is the login name of the user.
Level:Read This is the privilege level that the user gets.
ACL Type: Stream Access This is the ACL type.
Remote Key: <blank> This is the XML-RPC remote key to use. It's only used when creating on XML-RPC ACL with Read/Write Access.
<blank> <blank> In other words Server Side XML-RPC Acces List

Interface Access List

Name: Interface Access
Start Address: 0.0.0.0
End Address: 255.255.255.255
User: NONE
Level: View
ACL Type: Web Interface
Remote Key: <blank>

XML-RPC Access List

Name: XML-RPC <Remote Servername> eq XML-RPC REM_CATALOG
Start Address: “Remote Server Ip”
End Address: “Remote Server Ip” Use the same ip twice to define a single server
User:NONE
Level:Read/Write
ACL Type: XML-RPC
Remote Key: “remotekey” eq Vollmer_key01

Configure the ACL's on the remote side.

Stream Access List

Name: Stream Access This is just the name of the ACL(Access List) so you can identify it later.
Start Address: 0.0.0.0 This is the start ip address of the range of ip addresses you're building the ACL for.
End Address: 255.255.255.255 This is the end ip address of the range of ip addresses you're building the ACL for.
User:NONE This is the login name of the user.
Level:Read This is the privilege level that the user gets.
ACL Type: Stream Access This is the ACL type.
Remote Key: <blank> This is the XML-RPC remote key to use. It's only used when creating on XML-RPC ACL with Read/Write Access.
<blank> <blank> In other words Server Side XML-RPC Acces List

Interface Access List

Name: Interface Access
Start Address: 0.0.0.0
End Address: 255.255.255.255
User:NONE
Level:View
ACL Type: Web Interface
Remote Key: <blank>

XML-RPC Access List

Name: XML-RPC <Remote Servername> eq XML-RPC SRV_CATALOG
Start Address: “Local Server Ip”
End Address: “Local Server Ip” Use the same ip twice to define a single server
User: NONE
Level: View
ACL Type: XML-RPC
Remote Key: <blank> This can be left blank on the remote ACL it's only used by the server to verify sessions

Lets verify the ACL's

On the SERVER it should be:

NameStart AddressEnd AddressLevelUserKeyTypeAction
Stream Access0.0.0.0255.255.255.255Read<blank><blank>Stream AccessEdit/Revoke
Interface Access0.0.0.0255.255.255.255View<blank><blank>Web InterfaceEdit/Revoke
XML-RPC REM_CATALOG127.0.0.3127.0.0.3Read/Write<blank>Vollmer_key01XML-RPCEdit/Revoke

On the REMOTE it should be:

NameStart AddressEnd AddressLevelUserKeyTypeAction
Stream Access0.0.0.0255.255.255.255Read<blank><blank>Stream AccessEdit/Revoke
Interface Access0.0.0.0255.255.255.255View<blank><blank>Web InterfaceEdit/Revoke
XML-RPC SRV_CATALOG127.0.0.2127.0.0.2View<blank><blank>XML-RPCEdit/Revoke

Config requirements for the "SERVER" and "REMOTE"

Last but not least we have to enable XML-RPC in the ampache.cfg.php file on both servers. The settings below are required when you want to use XML-RPC and ampache.

; Use Access List
; Toggle this on if you want ampache to pay attention to the access list
; and only allow streaming/downloading/xml-rpc from known hosts by default
; xml-rpc will not working without this on.
; DEFAULT: false
access_control  = "true"
; Require Session
; If this is set to true ampache will make sure that the URL passed when
; attempting to retrieve a song contains a valid Session ID This prevents
; others from guessing URL's
; DEFAULT: true
require_session = "true"
; Use XML-RPC
; Allow XML-RPC connections, if you don't want _any_ possibility of your
; catalog being streamed from another location comment this out
; DEFAULT: false
xml_rpc         = "true"

Add The catalog to the REMOTE server.

Login as administrator at the REMOTE and use the menu to browse to the catalog setup. Click Admin > Catalog then Click Add Catalog.

Fill in the form with the following entry's

Catalog Name: XML-RPC SRV_CATALOG This is just the name of the Catalog so you can identify it later.
Path: http://127.0.0.2/ampache This is the URL to connect to the SERVER catalog
Catalog Type: Remote This is the type of catalog used
XML-RPC Key: Vollmer_key01 This is the key that you filled in at the SERVER XML-RPC access list

The rest of the option can be set as wished. They do not influence the working of the catalog.