In this guide, I’ll walk you through configuring OpenSim 0.9.3.0 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 .Net, MySQL, unzip and screen. Run the following commands:
sudo apt update
sudo apt dist-upgrade
sudo apt install libgdiplus dotnet-sdk-8.0 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-0.9.3.0.zip
unzip opensim-0.9.3.0.zip
Grid configuration
Navigate to the configuration directory:
cd ~/opensim/bin
cp Robust.HG.ini.example Robust.HG.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 ~/opensim/bin/Robust.HG.ini
Edit the lines 27 – 268 – 652 – 655 – 872
Uncomment 132 – 134 – 139 – 219 – 226 – 767
[Const]
27 BaseURL = "domain.com"
[ServiceList]
132 OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector"
134 GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector"
139 UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector"
[Hypergrid]
219 HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
226 GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
[DatabaseService]
268 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=DB_Password;Old Guids=true;SslMode=None;"
[GridInfoService]
652 gridname = "NOM DE LE GRID"
655 gridnick = "nom_de_la_grid"
[UserAgentService]
767 ShowUserDetailsInHGProfile = True
[UserProfilesService]
872 Enabled = true
Launch Robust
Start the Robust server to check for errors:
dotnet ~/opensim/bin/Robust.dll -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 ~/opensim/bin/OpenSim.ini
Edit the lines: 53 – 1210 – 1225 – 1187 – 1248
Uncomment: 66 – 408 – 827 – 832 – 836 – 841 – 846 – 1198 – 1238 – 1322 – 1359
Comment: 64 – 1356
[Const]
53 BaseHostname = "domain.com"
64 ; PublicPort = "9000"
66 PublicPort = "8002"
[Map]
408 GenerateMaptiles = true
[Messaging]
827 OfflineMessageModule = "Offline Message Module V2"
832 OfflineMessageURL = ${Const|PrivURL}:${Const|PrivatePort}
836 StorageProvider = OpenSim.Data.MySQL.dll
841 MuteListModule = MuteListModule
846 ForwardOfflineGroupMessages = true
[Groups]
1187 Enabled = true
1198 Module = "Groups Module V2"
1210 ServicesConnectorModule = "Groups HG Service Connector"
1225 GroupsServerURI = ${Const|BaseURL}:${Const|PrivatePort}
1238 MessagingModule = "Groups Messaging Module V2"
1248 MessageOnlineUsersOnly = true
[UserProfiles]
1322 ProfileServiceURL = "${Const|BaseURL}:${Const|PublicPort}"
[Architecture]
1356 ; Include-Architecture = "config-include/Standalone.ini"
1359 Include-Architecture = "config-include/GridHypergrid.ini"
Edit GridCommon.ini
Now, edit GridCommon.ini
:
nano -c ~/opensim/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" dotnet Robust.dll -inifile=Robust.HG.ini
Then start OpenSim:
screen -dmS "OpenSim" dotnet OpenSim.dll
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