Configuration

OpenSim simulator configuration file
The region simulator configuration is managed using a file called OpenSim.ini. This file is used regardless of whether the sim is running in standalone or grid mode. This file includes some additional configuration information from the config-include/ directory. Detailed information on the options available for setttings in this file can be found here. Please note, that the name OpenSim.ini can be changed via command line arguments (see above). Also, note that the default download does not include an OpenSim.ini file, but rather provides an example file. To get started editing your ini file, please cd into opensim/bin/ and copy OpenSim.ini.example to OpenSim.ini.

It is also possible to distribute the inifile settings over two files. This is useful if you want to run several OpenSim processes where most of your settings are identical but some settings differ. The master file is read first, then the inifile is read. Settings given in the inifile overrule settings given in the master file. The master file has the same format and the same keywords as the inifile, so the same documentation applies.

Database
Opensim's supports the following database-engines:
 * SQLite (default - a lightweight database that comes bundled with OpenSim and can be used without requiring any extra configuration. It is mostly intended to get you up and running quickly, not for production use.  A few features here (such as attachment persistence) have not yet been fully implemented.)
 * MySQL (fully supported). This is the recommended database for any use beyond experimentation or small standalone applications.  See Mysql-config for configuration information.  The OpenSim.ini.example file and other .example files will also have example MySQL configuration strings.
 * MSSQL (partially supported - some recent OpenSim features may not yet be implemented)

More information on database support can be found on the OpenSim Database support page.

Standalone vs. Grid
We recommend that you first get OpenSim running in standalone mode before you attempt to connect it to a grid or run your own grid. An OpenSim configuration consists of regions (run by region simulators) and 5 core backend services (which manage users, the grid, assets, inventories, and grid-wide messaging, collectively known as UGAIM).

A system running in standalone mode (that is, one with OpenSim.ini where gridmode = false) runs everything (all UGAIM services and one or more regions) in a single executable (OpenSim.exe).

In grid mode, the five services (User, Grid, Asset, Inventory, Messaging, or UGAIM) are not part of the region server. Instead, they can be run separately either on the same machine or spread out across multiple computers. In this mode, the OpenSim.exe acts solely as the region server, serving one or more regions that communicate with the core servers for asset, inventory and other data management.

Naturally, this means that running in grid mode is more complicated than running in standalone mode. It requires an understanding of UUID, X,Y location, server handshake passwords, estates and estate owners, and a couple of other settings. These require more care and patience to set up.

If you want to run a grid of your own (either private or public) you would start the core services up before connecting a region simulator. If you want to connect your region server to a grid that someone else is running, you need only start the region server in grid mode (with the necessary security keys and location information mentioned in the last paragraph).

= Running OpenSim in Standalone mode =

Running OpenSim in standalone mode is relatively straitforward because OpenSim.ini.example is already set up to achieve this. All you need to do initially is copy OpenSim.ini.example to OpenSim.ini before starting OpenSim and following the rest of the command prompts. Here's the full procedure assuming that you have a binary distribution of OpenSim (if you have a source distribution then you will need to build it first).

 Go the bin/ directory in the OpenSim distribution Copy OpenSim.ini.example to OpenSim.ini Start OpenSim Windows OpenSim.exe or OpenSim.32BitLaunch.exe if using the ODE physics plugin under 64 bit Windows Linux mono OpenSim.exe

OpenSim.exe (or OpenSim.32BitLaunch.exe if using the ODE physics engine under 64 bit Windows)

 When you first start OpenSim in standalone mode, it will ask you several questions at the console. These will set up a single region for you. The configuration will be placed at bin/Regions/Regions.ini which you can then go and edit later on.

Many of the questions have defaults. Here are some explanations of the questions asked.

 New region name - the name for your region. Don't leave this blank! Region UUID - the unique ID of your region. In pretty much all cases you will want to accept the randomly generated default in the square brackets. The only time when you wouldn't is if you were trying to set up a configuration to point to pre-existing region data. But in this case you are probably better off editing the Regions.ini file directly anyway Region Location - this is the location of the region on the grid. In standalone mode you can safely leave these as the default (1000,1000). If you were to set up additional regions later on in Regions.ini then they would need different grid co-ordinates (e.g. 1000,1001). OpenSim regions can be placed anywhere on a 65536 by 65536 grid. Internal IP address - This should always be 0.0.0.0 (0.0.0.0 means "listen for connections on any interface", basically a wildcard) if you want to access this server from the internet or another server on your internal network, this should be the IP address assigned to the OpenSim Server. You should also set up the server to Use a Static IP address, and not DHCP Internal port - This is the IP port for all incoming client connections. The name is a bit misleading since it will be used externally (by a Second Life viewer, for instance) as well as internally. You can make this any port you want, but it is safe to leave at the default 9000. Each region on your server must have a unique port</li> Allow alternate ports - This is currently experimental. Please leave it at the default of False.</li> External host name - If you leave this at the default 'SYSTEMIP' then this will become the LAN network address of the machine (e.g. 192.168.1.2). This is fine if you are connecting only from within your LAN. If you want to connect to it from a client on the internet, this should be the External IP Address of your router. Fully Qualified Domain Names (FQDNs) should also work.

Be aware of loopback problems when Running viewer &amp; server(s) on the same machine (LAN) by using the "external" configuration. ( You might notice endless waiting for region handshake .) See also troubleshoot hints. If you're having Connectivity problems. Be sure to read the Network Configuration Page. This is important if you see Region handshake issues</li>

See Configuring_Regions for information about the Regions.ini file that these questions generate.

</ul>

 To create a user type </li>

create user in the server console.

This will ask you a series of questions for creating a user (such as first name, last name and password).

 To connect to your new sim with your user, start up a Second Life viewer with the following command line switches: </li>

Client on same machine as OpenSim: -loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login Client on same LAN as OpenSim: -loginuri http://lan_ip:9000/ -loginpage http://lan_ip:9000/?method=login Client on different machine or internet: -loginuri http://external_ip:9000/ -loginpage http://external_ip:9000/?method=login

Then enter the user name and password you set up in the previous step and your new user should hopefully login.

</ol>

= Running OpenSim in Grid mode =

Running OpenSim in grid mode is considerably more complicated. Grid services need to be set up and the region simulator configuration needs to be changed to use these instead of the built-in standalone mode ones.

Configuring the grid services
NOTE: The grid servers are in the process of being redesigned. Some services are now run in a common 'ROBUST' (Basic Universal Server Technology) server shell while others are still run as separate legacy servers. More Details on ROBUST are Here --&gt; ROBUST   &lt;--  including Conversion From UGAIM To UGRM (0.6.6 -> 0.6.7) and UGRM to URM (0.6.7 -> 0.6.8)

As of OpenSim 0.6.8, R.O.B.U.S.T. has connectors for the asset (A), grid (G) and inventory (I) functionality. The legacy servers are still required for user (U) and messaging (M) functionality. The steps below will get you up and running. We'll assume that your current directory is bin/ within the OpenSim distribution.

<ol> Configure the user server</li> <ul> Start OpenSim.Grid.UserServer.exe</li> You will be asked a number of configuration questions. If the grid servers are all on one machine, most defaults are safe to use. The configuration is stored in the UserServer_Config.xml file which can be changed afterwards if necessary.</li> The user server will then load and display it's prompt:</li> User# </ul>

Configure R.O.B.U.S.T.</li> <ul> Copy OpenSim.Server.ini.example to OpenSim.Server.ini. Don't forget to change ConnectionString for your database settings. (on version 0.6.6 copy OpenSim.Services.ini.example to OpenSim.Services.ini - then use OpenSim.Services instead OpenSim.Server) </li> Linux bin$ cp OpenSim.Server.ini.example OpenSim.Server.ini Windows C:\OpenSim\bin> copy OpenSim.Server.ini.example OpenSim.Server.ini Start OpenSim.Server.exe</li> The server will start up it's asset, inventory and grid components and display the R.O.B.U.S.T prompt:</li> R.O.B.U.S.T.# For more information on the R.O.B.U.S.T. configuration file and more information if you are migrating from an earlier release of OpenSim, refer to R.O.B.U.S.T.</li> </ul>

Configure the messaging server</li> <ul> Start OpenSim.Grid.MessagingServer.exe</li> Answer the configuration questions. Again, if all servers are run on the same machine, it's safe to press enter for all questions. The configuration is stored in MessagingServer_Config.xml.</li> <li>The server will start and present you with it's prompt:</li> Messaging# </ul>

</ol>

For information on running the legacy servers, particularly if you're using an older version of before 0.6.7 that doesn't contain the ROBUST framework, see LegacyServers

Summary of commands for running grid service executables
 Windows  cd bin OpenSim.Grid.UserServer.exe OpenSim.Server.exe OpenSim.Grid.MessagingServer.exe

 Linux / Mac OS X  cd bin mono OpenSim.Grid.UserServer.exe mono OpenSim.Server.exe mono OpenSim.Grid.MessagingServer.exe

Configuring regions
When first run, a new OpenSim installation will ask you a series of questions to set up one region. If you want to change these settings or set up multiple regions, please see Configuring_Regions

Configuring and Starting the region simulator
<ol> <li>Find the [Architecture] section, comment out the line that says</li> Include-Standalone   = "config-include/Standalone.ini" and uncomment the line saying Include-Grid        = "config-include/Grid.ini

<li>save OpenSim.ini, and go into the config-include directory.</li> <li>copy the following files</li> GridCommon.ini.example to GridCommon.ini CenomeCache.ini.example to CenomeCache.ini FlotsamCache.ini.example to FlotsamCache.ini

<li>Open all these files (Grid.ini, GridCommon.ini, CenomeCache.ini and FlotsamCache.ini) and edit to suit your needs</li>

<li>You should now be ready to start up your sim. The mode that OpenSim.exe starts in is normally controlled by a setting in your OpenSim.ini. It defaults to standalone mode if that setting is not specified or the file is not found. If you wish, you can force opensim to start in gridmode on the command line as follows:</li> OpenSim.exe -gridmode=true or if using the ODE physics plugin under 64 bit Windows OpenSim.32BitLaunch.exe or: mono OpenSim.exe -gridmode=true With any luck, everything will come up without too many errors.

If you have problems using the OpenDynamicsEngine on *nix, try setting your stack reserve level higher than the default with the following command; <tt>ulimit -s 262144</tt> Or, run the opensim-ode.sh to start up OpenSimulator.

<li>Go to the UserServer console, and type 'create user' to create a new avatar. It will prompt you for the name and password, and the X and Y of the sim that should be his home location. Use 1000 and 1000, or wherever you told your sim to live when you brought it up in standalone mode. At the console of any of these servers, you should be able to type 'help' to get a list of commands.</li>

<li>You should now be able to connect to your new grid with your secondlife client. You need to tell your client to point at the UserServer rather than directly at the sim, though:</li> secondlife -loginuri http://127.0.0.1:8002/ 8002 is the default port for the UserServer, and that IP address should be changed to the server you are running the UserServer on, if they are not all on the same box. Happy OpenSimming! ''Note: if you are using Windows Vista, remember to start servers as Admin. If not it will prompt you an error in console like "Error - Access denied"'' </ol>

Attaching your sim to someone else's grid
To set up the region server (i.e., <tt>OpenSim.exe</tt>) to connect to an external grid, you should edit the <tt>OpenSim.ini</tt> file in the <tt>bin</tt> directory. In that file, there is a <tt>[Network]</tt> section with URLs for the grid, user, and asset servers, as well as send and receive keys (for a basic level of security). The addresses and send/receive keys will vary depending on the grid you are connecting to, and the grid operator should tell you what values to use.

The other file you may have to change is in your <tt>bin/Regions</tt> directory. This is where your individual region config files are. If you only have one region, it will by default be called <tt>Regions.ini</tt> in OpenSim 0.6.7 and later and <tt>regions.xml</tt> in OpenSim 0.6.6 and earlier.

This can be edited with any text editor. The grid owner may tell you what X and Y location you can place your sim at (you can't have multiple sims at the same location on the grid). If so, the fields you will need to change in this file are <tt>sim_location_x</tt> and <tt>sim_location_y</tt>. And the <tt>external_host_name</tt> should be set to the hostname or IP address of your simulation server (i.e., the machine that is running <tt>OpenSim.exe</tt>). A list of public grids that you can attach your sim to is at OpenSim: Grids

Running OpenSim 0.6.7 and onwards in 64 bit Windows
As of OpenSim 0.6.7, the default physics engine for OpenSim was changed to the ODE engine. This is because ODE is by far the most advanced physics engine plugin currently in OpenSim. Unfortunately, it has the drawback in that it's library is not compilable under 64bit in Windows. Therefore, 64 bit Windows users may need to run

OpenSim.32BitLaunch.exe

instead of

OpenSim.exe

To launch their region simulator.

An alternative is to use the basicphysics engine instead or one of the other alternative physics engines bundled with OpenSim, though all these are far less functional than the ODE plugin.

Note About Mono
If you're using mono, you should increase the value of the mono environment variable MONO_THREADS_PER_CPU from its default of 5 to some number that works for your sim. The exact number depends on many factors including: the number of CPUs in your machine, what else you use that machine for, how many regions you have in your sim, how many of them are adjacent, how many scripts you have, and how many avatars you expect to serve at the same time. As a reference, Wright Plaza in OSGrid, which is running as a single region on a sim and routinely hosts meetings with 20 avatars, uses the value 125.

If this number is too low, the operation of your sim will start to break in all sorts of different ways. A common symptom is the freezing of all activity upon login of a new avatar. Other symptoms are a lot more subtle.

For example: $ export MONO_THREADS_PER_CPU=125

Legacy Configuration Information
These are some pages containing some legacy configuration information of unknown accuracy.

OpenSim 0.6.6 legacy configuration information

OpenSim.exe command line options
OpenSim.exe has command line options which allow you to perform actions such as reading configuratio nfiles from a different directory. See OpenSim.exe Command Line Options for more details.

Script engine
OpenSim supports multiple script engines. See ScriptEngines for details. If you don't know what this means then the default script engine will be fine.

Permissions Configuration
OpenSim has a quite elaborate set of permissions. See OpenSim:Permissions(Server) for details. By default, permissions are not active on region simulators.

Logging
By default, OpenSim logs information to a file called OpenSim.log in the bin directory. See Logging for details on how to further configure this if required.

Configuration of region modules

 * IRCBridgeModule
 * Freeswitch_Module
 * Offline Messaging

Configuration of Metaverse Exchange Protocol (MXP)

 * Metaverse Exchange Protocol

Configuration of Web Server and Pages
OpenSim contains a web server that can serve up a variety of pages. Some which come from external files and some are generated internally.
 * External Files
 * Internally Generated