Configuration

OpenSim Command line options
To run OpenSim in somewhat customized environments it's often helpful to modify the programs behaviour via command line arguments. OpenSim knows a just a few of these as most parts of the behaviour are controlled via an .INI-File (see below).

The following command line switches are known:

OpenSim configuration file
The 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. 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.

0.6.6 Release Information
This release had some bugs with default automatic configuration on the first startup of OpenSim.exe. bin/Regions/default.xml (region configuration file) is not automatically created in the main directory. Therefore, you must manually create this file. Here is an example.    You must change UUID, NAME, IP_ADDRESS_OF_SERVER, DNS_NAME_OF_SERVER, FIRST_NAME, SECOND_NAME and PASSWORD to your own values. (I noticed than IP_ADDRESS_OF_SERVER should be set to real IP not to 127.0.0.1)

Summary:


 * Run OpenSim0.6.6Setup.exe and install OpenSim in Windows
 * Run OpenSim.exe and enter default values - record them!
 * Shutdown simulator (command: shutdown)
 * Create default.xml with copy of above
 * Change values in default.xml with recoded values
 * Be sure default.xml be in main directory (same with OpenSim.ini)
 * Run again OpenSim.exe
 * Connect with viewer

Running OpenSim 0.6.7 and onwards in 64 bit Windows
In Git revision 077d01, the default physics engine for OpenSim was changed to the ODE engine. This is because ODE is by far the most advanced physics engine. Unfortunately, it has the drawback in that it's library is not compilable under 64bit. 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 ODE.

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.)
 * MySQL (fully supported)
 * MSSQL (partially supported - some recent OpenSim features may not yet be implemented)
 * Postgresql (fully supported - Still in Beta phase but working)

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, either your own grid or a public 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 configured such that gridmode = false) -- also known as "sandbox mode" -- runs everything (all UGAIM services and one or more regions) in a single executable (OpenSim.exe). External regions cannot be added to an OpenSim running in this mode.

In grid mode, the five services (User, Grid, Asset, Inventory, Messaging, or UGAIM) are not part of the region server. This means that they can be run either on the same machine or spread out across multiple computers. In this mode, OpenSim.exe serves one or more regions, which communicate with the core servers. This mode even allows region servers run by other people on their own machines to connect, if you wish.

Naturally, this means that running in grid mode is somewhat 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 are not difficult, but do require a little more care in setting things 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).

OpenSim.exe responds to various command line arguments. These include "-inifile", "-configfile", "-gridmode", "-physics", "-config" & "-noverbose". When starting OpenSim in either Windows or Linux, one could, for example, add "-physics=OpenDynamicsEngine" to run the OpenDynamicsEngine instead of basicphysics, or use "-gridmode=true" to force opensim.exe to run as a region server (the rest of the grid services have their own executables). As many of these settings are normally controlled by OpenSim.ini, most users (especially in standalone mode) will not add any command line arguments.

Standalone mode
When you start OpenSim in standalone mode, it will ask you several questions at the console. The first set of prompts that start with "NETWORK SERVERS INFO", you can just hit return to accept the defaults if you will be running in standalone mode. The prompts that start with "DEFAULT REGION CONFIG" are where you need to start paying attention. Some are self-explanatory. Here are explanations for the others:


 * Grid Location. OpenSim regions can be placed anywhere on a 65536 by 65536 grid. In standalone mode, it is safe to leave these X and Y locations at their defaults for the first region (additional regions will need different coordinates, of course).
 * Filename for local storage. Safe to leave at default.
 * 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 IP port for incoming UDP client connection. 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
 * External host name. If you will only be attaching to your sim from a SecondLife client on the same machine, you can leave this at the default 127.0.0.1. If you will be wanting to connect to it from a client on another machine or the internet, this should be the External IP Address of your router, not the Domain Name. (Hmm - Tried hostname (the one resolved by dns) and it worked out oke.)
 * 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 your having Connectivity problems. Be sure to read the Network Configuration Page. This is important if you see Region handshake issues.

To connect to your new sim, start up secondlife with the following command line switches:

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

To create a user:

type create user &lt;first&gt; &lt;last&gt; &lt;password&gt; &lt;x_loc&gt; &lt;y_loc&gt; in the server console.

Grid mode
You want to run your own grid. Great! Assuming that you already got your sim running in standalone mode, here is what you need to do: 1. Current builds of OpenSim grid mode are using mysql to store the grid information. You must have this installed and configured if you want to run your own grid. See mysql-config for more information. NOTE: The grid servers are in the process of being redesigned. Therefore, there is a "legacy" way and a new way of starting things. The most up to date information can be found in the configuration file examples in your OpenSim kit. The new system consists of services and connectors that are run in a server shell (Basic Universal Server Technology, R.O.B.U.S.T.)

For information on running the legacy servers, see LegacyServers

Starting the grid services
Currently (as of OpenSim 0.6.7), R.O.B.U.S.T has connectors for the asset and inventory functionality. Therefore, some of the legacy servers are still required to run. Following the steps below will get you up and running in no time!


 * Configure the user server
 * Start OpenSim.Grid.UserServer.exe
 * You will be asked a number of configuration questions. If the grid servers are all on one machine, most defaults are safe to use, just press enter for all questions except fot the defult inventory server. The default inventory server needs to be given as http://127.0.0.1:8003, because R.O.B.U.S.T uses only one port.
 * The user server will then load and display it's prompt:

User#
 * Configure the grid server
 * Start OpenSim.Grid.GridServer.exe
 * Again, you will be asked a few questions and it's safe to accept the defaults if all servers are run on one machine. You will then see the grid server prompt:

Grid#
 * Configure R.O.B.U.S.T.
 * Copy OpenSim.Server.ini.example to OpenSim.Server.ini
 * (on version 0.6.6 copy OpenSim.Services.ini.example to OpenSim.Services.ini - then use OpenSim.Services instead OpenSim.Server)
 * Don't forget change ConnectionString accordingly your database settings.

Linux bin$ cp OpenSim.Server.ini.example OpenSim.Server.ini Windows C:\OpenSim\bin> copy OpenSim.Server.ini.example OpenSim.Server.ini 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.
 * Start OpenSim.Server.exe

The server will start up it's asset and inventory components and display the R.O.B.U.S.T prompt: R.O.B.U.S.T.#
 * Configure the message server
 * Start OpenSim.Grid.MessagingServer.exe
 * Answer the configuration questions. Again, if all servers are run on the same machine, it's safe to press enter for all questions
 * The server will start and present you with it's prompt:

Messaging#

Starting the regions
When using R.O.B.U.S.T., a setting that was not needed in standalone mode needs to be changed from it's default. Open OpenSim.ini and find the section titled [Network]. Change the inventory_server_url to read http://127.0.0.1:8003. [Network] inventory_server_url = "http://127.0.0.1:8003"

Next, find the [Architecture] section, comment out the line that says Include-Standalone   = "config-include/Standalone.ini" and uncomment the line saying Include-Grid        = "config-include/Grid.ini

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

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

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: OpenSim.exe -gridmode=true or: mono OpenSim.exe -gridmode=true With any luck, everything will come up without too many errors.

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.

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: 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"''

Multiple regions
Using Physical Prim with the OpenDynamicsEngine on *nix, it's recommended that you set your stack reserve level higher then default with the following command; ulimit -s 262144 Or, run the opensim-ode.sh to start up OpenSimulator.

A powerful region generator is available at: RegionGenerator

For running multiple regions on the same box, you simply make multiple copies of the 'default.xml' file inside the bin/Regions/ directory. You can do this by typing create region at the OpenSim command prompt, using the script make.php in share/regions, or you can generate the files by hand.

If you want to create the files by hand:


 * first copy the default.xml file in the bin/Regions directory, and name them anything you want (I name mine region.x.y.xml, where region is the name of the region, and x and y are the grid coords.)
 * Open each xml file and edit the uuid (a generator can be found at uuidgen webpage or on unix, use the uuidgen command), region name, x & y positions, and internal IP port.

IMPORTANT! Regardless of the method you use to create your new region, the UUID, name, and grid coordinates must be unique for each region on a grid. The port assignment must be unique for each region that is running on a particular machine. The internal IP address and external host name must be the same for all regions.

Note that sim_location_x</tt> and sim_location_y</tt> should be adjacent integers if you want your regions to be adjacent, so you can run back and forth between them. 'IMPORTANT: THESE GRID COORDINATES ARE NOT'' IN METERS. THEY ARE SIM POSITIONS.''' (1000, 1000) is next to (1001,1000), (1000, 1001), and so forth. 1256, 2000, 2048 and similar values are not adjacent to 1000, they are very far away, so you would not see your sims from one another.

Once you have 2 or more xml files in the bin/Regions folder, running a single copy of OpenSim.exe</tt> will start up all of your sims! If you come across any errors, there is most likely an error in your xml files.

As of 6-Feb-2008, take care NOT to leave editor backup copies of the files in this directory e.g. emacs style backup names like Regionname.xml~. These are loaded by opensim.exe as if they are legitimate region descriptions, and will therefore give errors indicating you are trying to re-use the socket for that region.

Attaching your sim to someone else's grid
To set up the region server (i.e., OpenSim.exe</tt>) to connect to an external grid, you should edit the OpenSim.ini</tt> file in the bin</tt> directory. In that file, there is a [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 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 default.xml</tt>.

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 sim_location_x</tt> and sim_location_y</tt>. And the external_host_name</tt> should be set to the hostname or IP address of your simulation server (i.e., the machine that is running OpenSim.exe</tt>). A list of public grids that you can attach your sim to is at OpenSim: Grids

StandAlone
 Windows  cd bin OpenSim.exe On Windows Vista, it may be necessary to explicitly "Run as administrator" for opensim.exe to accept connections from a client, even when running as an administrator user. Navigate to the opensim\bin directory, right click opensim.exe, and select "Run as administrator". Connect: opensim://localhost:9000, or opensim://127.0.0.1:9000, or opensim://myipadress:9000

 Linux  cd bin mono OpenSim.exe

 OSX  cd bin mono OpenSim.exe

Local Grid
 Windows  cd bin OpenSim.Grid.UserServer.exe OpenSim.Grid.GridServer.exe OpenSim.Grid.AssetServer.exe OpenSim.Grid.InventoryServer.exe OpenSim.Grid.MessagingServer.exe OpenSim.exe

 Linux  cd bin mono OpenSim.Grid.UserServer.exe mono OpenSim.Grid.GridServer.exe mono OpenSim.Grid.AssetServer.exe mono OpenSim.Grid.InventoryServer.exe mono OpenSim.Grid.MessagingServer.exe mono OpenSim.exe

 OSX  cd bin mono OpenSim.Grid.UserServer.exe mono OpenSim.Grid.GridServer.exe mono OpenSim.Grid.AssetServer.exe mono OpenSim.Grid.InventoryServer.exe mono OpenSim.Grid.MessagingServer.exe mono OpenSim.exe Connect: opensim://myipaddress:9000

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.

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