Running Murmur

From Mumble Wiki
Revision as of 10:45, 23 September 2009 by DD0T (talk | contribs) (Manual configuration using DBus)
Jump to: navigation, search

Murmur is the server component for Mumble.

  • Please note that in this page there are some commands that are very long. It will go beyond the margin of your screen. Therefore double click the command so it will highlight, and then copy paste it.

Distribution-specific Murmur

By default, murmur is configured to run from a regular user account, and on Windows and OSX this is the only way it works. However, on distributions with prepackaged murmur (Debian/Ubuntu), murmur is configured to run as a sytem service, just like your webserver, mailserver and whatever else you've got running. This "global" installation is a ready, turn-key solution, most of the information here does not apply to you. Most packages also include the 'murmur-user-wrapper' script, which does all of the below for you if you want to run as a regular user (including starting DBus).

So, on these systems, you can still run murmur manually, but you will then not benefit from the extensive care that has gone into preparing those packages.

If you need to register users or change the settings of a virtual server, read the section on Advanced Configuration.

Basic configuration

The default settings for a murmur server are configured in murmur.ini. Here you can configure the welcome text, port number and other settings. However, these are just default settings and can be overwritten via the Ice RPC without changing the .ini; if you're running multiple virtual servers, each virtual server has it's own configuration, which is maintained internally by Murmur (see below).

The default port for a Murmur server is UDP and TCP 64738. Have a look at URLs to see how to publish links to your server.

Adding an authenticated user can be done through various means, read below for instructions on using DBus to add a user. You can use Ice or DBus or you can directly edit the database (highly discouraged because of the potential problems associated with doing this, do this if you have absolutely no other way to add a user).

Setting the SuperUser password

Until you've set a password for the SuperUser, the account will be disabled. You don't need the SuperUser account to run a simple server, but you do need it if you want to give your regular user account any privileges. To set the password on Linux run

murmurd -supw <password>

This will set the password and return immediately. To run the server remove this parameter. If you are on a debian based system, you may also run

sudo dpkg-reconfigure mumble-server

If you're on Windows, then you set the password by running

"C:\Program Files\Mumble\murmur.exe" -supw <password>

Running Murmur as a regular user

If you are on Win32, you can simply start murmur.exe from the command line, or even easier just start it from the Start Menu.

DBus on Linux/OSX

For full functionality, murmur requires either a working DBus daemon or Ice being enabled. For DBus we need an isolated daemon, different from the one running under, say, a X11 session, so we specifically spawn our own. The following small shell script will ensure a deamon is ready (copied from murmur-user-wrapper):

#! /bin/bash
DIR=$HOME/murmur
DBUSFILE=$DIR/.dbus.sh
DBUS_SESSION_BUS_ADDRESS=invalid:/
[ -f $DBUSFILE ] && . $DBUSFILE
if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / org.freedesktop.DBus.GetId 2> /dev/null > /dev/null; then
  echo "Launching D-Bus session"
  dbus-launch --sh-syntax > $DBUSFILE
  . $DBUSFILE
  if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / org.freedesktop.DBus.GetId 2> /dev/null > /dev/null; then
    echo "Failed to launch session DBUS, bailing out."
  fi
fi

Before running this for the first time, make sure ~/murmur exists

mkdir $HOME/murmur

And to use it

source <pathtoscript>

You should always source this script before starting murmur, and you also need to run it before using any DBus commands.

Running the daemon

To run murmur, simply type

murmurd

For debugging, you might want to add -fg -v to the command line, which will stop the program from running in the background and.

By default murmur opens it's configuration file, database file and logfile in your current directory. The configuration file can be overridden with the -ini parameter, and the database and logfile can be set form the ini file.

Administration

This section contains different ways of administrating a murmur Server.

Note: Most of these interfaces are created and maintained by third parties and the Mumble developers have no influence on the stability and/or security of these projects.

Web-Interfaces

There are several browser based interfaces which can be used to administrate the Murmur server. If you need something very basic or want to create your own interface you should take a look at Murmurs script folder which contains some basic web-interface examples which use Ice or DBus. Additionally the following table contains a collection of more elaborate Web-Interfaces:

Name Technology DBus Ice Murmur version Comment Weblink
Mumble PHP Interface PHP No Yes 1.1.8 User and Admin functionality [1]
MurmurCP ASP.NET + ICE No Yes 1.1.8 Multiple Virtual Servers, Registration, Server Status, Forgot Password [2]
Simpleregister PHP No Yes 1.1.8 Extended script from the sample folder [3]
Mumble Admin Ice PHP PHP No Yes 1.1.8 Admin functionality [4]
Mumble-Django Python + Django Yes Yes 1.1.8 + 1.2.0 Channel viewer, admin panel, multiserver, registration, textures [5]
MAP - Mumb1e Admin Plugin PHP Yes No 1.1.8 Webinterface to manage Server User, Plugin User and Servers; useful for Server hosting [6]

Note: We recommend using an preferably Ice or at least DBus capable interface.

Standalone applications

Name OS DBus Ice Comment Weblink
Murmur Admin Console Windows Yes No Add, edit and delete players over SSH [7]

Commandline-Interfaces

Name OS DBus Ice Comment Weblink
MurmurCL multi-platform No Yes Commandline interface written in Python win32 exe / python source
mice multi-platform No Yes Helper script written in Python [8]
RegMum Windows Yes No Bat script [9]

Manual configuration using DBus

If you are not able to use an additional application for administrating Murmur there is still the possibility of manually communicating with the server using DBus. First make sure Murmur is running and that you have contact with DBus. For Win32, you don't need to do anything, on all other platforms you should complete the DBus on Linux/OSX section first.

Showing the default configuration

This is just to verify we have contact with DBus, and to print out the default configuration.

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getDefaultConf

(if you're running a system DBus based configuration, add --system before all the other parameters)

This should print out the default configuration.

Virtual Servers

Listing the servers:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getAllServers

Adding a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.newServer

Removing a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.deleteServer int32:<serverid>

Starting a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.start int32:<serverid>

Stopping a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.stop int32:<serverid>

Server configuration

Each virtual server has it's server-specific configuration. If a particular confiuration item is empty, it will fall back to the default configuration, which is specified in the ini file.

Listing the configuration:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getDefaultConf
dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getAllConf int32:<serverid>

Setting a configuration item:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.setConf int32:<serverid> string:"<key>" string:"<value>"

User management

If you can run CGI scripts from your user account, the murmur.pl script contains user self-management. Just copy it to your webserver and make it executable (you might need to rename it to murmur.cgi), and it should contain everything needed. If not, this is what you'll need:

Adding a new registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.registerPlayer string:"<username>"

Fetching an existing registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.getRegistration int32:<userid>

or

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"<username>"

Updating a registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.setRegistration int32:<userid> string:"<username>" string:"<email>" string:"<password>"

Detailed explanation of user management

  • Note you must be running > 1.1.5 Murmur Stable for these commands to work.
  • If you are running Murmur from a session DBus, then remove the --system from the dbus-send commands


<serverid> is a digit number of the server you have. For instance if you had fifty Murmur servers running, the first server you started would be 1, and the fiftieth server you started would be 50.

<userid> is also a digit number such as 4 or 30, depending on how many people are registered in the database. For instance when you run

 dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

you will see after you run this command "int32" and some other text. There will be a number to the right of "int32". This number is the user's UserID.


So for instance you want to register a user, that user's name was Name, his password was passwrd, and you have one server running.

On Linux you would run

 dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

You will then see some text. In it you will see "int32". Let's say you already had 5 users registered^. The number next to "int32" in the terminal would be 6. Remember this number.

Now run

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Name" string:"<user's email address>" string:"passwrd"

On Windows you would run

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

You will then see some text. In it you will see "int32". Let's say you already had 5 users registered^. The number next to "int32" in the command prompt would be 6. Remember this number.

Now run

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Name" string:"<user's email address>" string:"passwrd" 

You now have a registered user. "Name" can now login with the username Name and the password passwrd.

If you want to change Name's registration, do the following command: (let's change Name's name to "Unnamed" and his password to "nopasswrd")

For Linux do

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Unnamed" string:"<user's email address>" string:"nopasswrd"

For Windows do

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Unnamed" string:"<user's email address>" string:"nopasswrd"

If you cannot remember the int32 of a player, simply run this command

Linux

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"<username>"

Windows

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"<username>"

If you have just started a new Murmur server, the first user you create will have a UserID of 1. The first UserID, 0, is the SuperUser.

Step-by-Step Guides

If you are not an advanced user or you are having trouble understanding how to set up a working Murmur server, you can read this guide for Windows.