In this guide, I’ll walk you through configuring OpenSim 0.9.2.2 in grid mode on Ubuntu 24.04. For the database setup, we’ll use the user opensim
with the password DB_Password
. Feel free to customize these credentials as needed. Also, remember to replace domain.com
with your actual domain name throughout the configuration.
Dependency Installation
Before installing OpenSim, you need to install Mono, MySQL, unzip and screen. Run the following commands:
sudo apt update
sudo apt dist-upgrade
sudo apt install mono-complete mysql-server unzip screen
MySQL configuration
Next, configure MySQL by editing the MySQL configuration file:
sudo nano /etc/mysql/my.cnf
Add the following lines after !includedir /etc/mysql/mysql.conf.d/
:
[mysqld]
default_storage_engine = InnoDB
disable_log_bin
innodb_buffer_pool_size = 2G
innodb_log_file_size = 256M
innodb_log_buffer_size = 16M
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0
innodb_buffer_pool_instances = 2
default-authentication-plugin=mysql_native_password
Restart MySQL:
sudo service mysql restart
sudo mysql_secure_installation -u root -p
Database creation
Create the OpenSim database and user:
sudo mysql
Within the MySQL shell, run:
mysql> CREATE DATABASE opensim;
mysql> CREATE USER opensim IDENTIFIED BY 'DB_Password';
mysql> GRANT ALL PRIVILEGES ON opensim.* TO 'opensim';
mysql> FLUSH PRIVILEGES;
Verify the opensim
account’s authentication method is mysql_native_password:
mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;
mysql> \q
Download and Extract OpenSim
Download and unzip the latest OpenSim build:
cd ~
wget http://opensimulator.org/dist/OpenSim-LastAutoBuild.zip
mkdir ~/HG
unzip OpenSim-LastAutoBuild.zip -d HG/
Grid configuration
Navigate to the configuration directory:
cd ~/HG/bin
cp Robust.HG.ini.example Robust.HG.ini
cp OpenSim.ini.example OpenSim.ini
cp config-include/GridCommon.ini.example config-include/GridCommon.ini
cp config-include/osslEnable.ini.example config-include/osslEnable.ini
Edit Robust.HG.ini
:
nano -c ~/HG/bin/Robust.HG.ini
Edit the lines 28 – 240 – 624 – 627 – 834
Uncomment 104 – 106 – 111 – 191 – 198 – 735
[Const]
28 BaseURL = "http://domain.com"
[ServiceList]
104 OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector"
106 GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector"
111 UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
[Hypergrid]
191 HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
198 GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
[DatabaseService]
240 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=DB_Password;Old Guids=true;SslMode=None;"
[GridInfoService]
624 gridname = "NOM DE LE GRID"
627 gridnick = "nom_de_la_grid"
[UserAgentService]
735 ShowUserDetailsInHGProfile = True
[UserProfilesService]
834 Enabled = true
Launch Robust
Start the Robust server to check for errors:
mono ~/HG/bin/Robust.exe -inifile=Robust.HG.ini
Create the first user in the Robust console:
R.O.B.U.S.T.# create user
First name [Default]: Ludo
Last name [User]: Davis
Password:
Email []:
User ID (enter for random) []:
Model name []:
Quit the Robust console:
R.O.B.U.S.T.# quit
Edit OpenSim.ini
Next, configure OpenSim.ini
:
nano -c ~/HG/bin/OpenSim.ini
Edit the lines: 53 – 1164 – 1168 – 1145 – 1206
Uncomment: 360 – 777 – 782 – 786 – 791 – 796 – 1156 – 1196 – 1280 – 1317
Comment: 1314
[Const]
53 BaseHostname = "domain.com"
[Map]
360 GenerateMaptiles = true
[Messaging]
777 OfflineMessageModule = "Offline Message Module V2"
782 OfflineMessageURL = ${Const|PrivURL}:${Const|PrivatePort}
786 StorageProvider = OpenSim.Data.MySQL.dll
791 MuteListModule = MuteListModule
796 ForwardOfflineGroupMessages = true
[Groups]
1145 Enabled = true
1156 Module = "Groups Module V2"
1164 ServicesConnectorModule = "Groups HG Service Connector"
1168 GroupsServerURI = ${Const|BaseURL}:${Const|PrivatePort}
1196 MessagingModule = "Groups Messaging Module V2"
1206 MessageOnlineUsersOnly = true
[UserProfiles]
1280 ProfileServiceURL = "${Const|BaseURL}:${Const|PublicPort}"
[Architecture]
1314 ; Include-Architecture = "config-include/Standalone.ini"
1317 Include-Architecture = "config-include/GridHypergrid.ini"
Edit GridCommon.ini
Now, edit GridCommon.ini
:
nano -c ~/HG/bin/config-include/GridCommon.ini
Edit the line19
Uncomment 16 – 49
Comment 9
[DatabaseService]
9 ; Include-Storage = "config-include/storage/SQLiteStandalone.ini";
16 StorageProvider = "OpenSim.Data.MySQL.dll"
19 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=DB_Password;Old Guids=true;SslMode=None;"
[Hypergrid]
49 GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
Start the Servers
Start the Robust server in a detached screen session:
screen -dmS "Robust" mono Robust.exe -inifile=Robust.HG.ini
Then start OpenSim:
screen -dmS "OpenSim" mono OpenSim.exe
Accessing the Screen Sessions
To reconnect to your running servers, use:
screen -d -r Robust
screen -d -r OpenSim
To detach from the screen, always use Ctrl + A
followed by D
.
Firewall configuration
If you’re using UFW as your firewall, be sure to configure it to allow the necessary ports.
If you haven’t installed it, you can skip this step.
sudo ufw allow "OpenSSH"
sudo ufw allow 8002/tcp
sudo ufw allow 9000/tcp
sudo ufw allow 9000:9100/udp
sudo ufw enable
Conclusion
Your OpenSim grid should now be running smoothly! Feel free to reach out if you encounter any issues or have questions about the setup.
Leave a Reply