Install OpenSim 0.9.3.0 in Hypergrid Standalone mode on Alpine 3.21

This guide walks you through configuring OpenSim 0.9.3.0 in Hypergrid Standalone mode on Alpine 3.21. We will use the database user opensim with the password DB_Password. You can customize these credentials as needed. Also, replace domain.com with your actual domain name throughout the configuration.

I decided to give Alpine Linux a try, and it quickly impressed me with its unique advantages.

  • Security-Oriented: Alpine Linux is designed with security in mind, utilizing features like PaX, grsecurity patches, and position-independent executables (PIE) to minimize vulnerabilities.
  • Lightweight: The entire ISO file is only 64MB—yes, you read that right! Despite its small footprint, it delivers a fully functional Linux environment.
  • Minimalist and Efficient: Unlike bloated distributions, Alpine provides only the essential components, allowing you to install exactly what you need. This makes it perfect for running a lightweight OpenSim server without unnecessary dependencies or resource-heavy packages.

With its small size, security focus, and efficiency, Alpine Linux is an excellent choice for a lean and optimized server setup.

Dependency Installation

First, enable the community repository. Edit the repositories file using vi or nano (vi is pre-installed):

vi /etc/apk/repositories

Uncomment the following line:

http://dl-cdn.alpinelinux.org/alpine/v3.21/community

Refresh the package list:

apk update

Now, install the required dependencies:

apk add dotnet8-sdk libgdiplus mariadb mariadb-client unzip screen

MariaDB configuration

Comment out skip-networking in MariaDB’s configuration file:

vi /etc/my.cnf.d/mariadb-server.cnf

Run the following commands to set up and start MariaDB:

/etc/init.d/mariadb setup
rc-service mariadb start
rc-update add mariadb default
mysql_secure_installation

Use the following options when prompted:

Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Database creation

Login to MariaDB:

mysql

Run the following commands to create the database and user:

CREATE DATABASE opensim;
CREATE DATABASE opensim;
CREATE USER opensim IDENTIFIED BY 'DB_Password';
GRANT ALL PRIVILEGES ON opensim.* TO 'opensim';
FLUSH PRIVILEGES;

Verify that opensim uses mysql_native_password:

SELECT user, authentication_string, plugin, host FROM mysql.user;

Expected output:

| User     | authentication_string                     | plugin                | Host      |
|----------|-------------------------------------------|-----------------------|-----------|
| opensim  | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | mysql_native_password | %         |

Exit the database shell:

MariaDB [(none)]> \quit

Download and Extract OpenSim

cd ~
wget http://opensimulator.org/dist/opensim-0.9.3.0.zip
unzip opensim-0.9.3.0.zip

Navigate to the configuration directory:

cd ~/opensim/bin

Configuring OpenSim

Edit OpenSim.ini

vi ~/opensim/bin/OpenSim.ini

Edit the lines: 53
Uncomment: 1357
Comment: 1356

	[Const]
53		BaseHostname = "domain.com"

	[Architecture]
1356	; Include-Architecture = "config-include/Standalone.ini"
1357	Include-Architecture = "config-include/StandaloneHypergrid.ini"

Edit StandaloneCommon.ini

vi ~/opensim/bin/config-include/StandaloneCommon.ini

Edit the line 19 – 229 – 232
Uncomment 18 – 50
Comment 9

	[DatabaseService]
9		; Include-Storage = "config-include/storage/SQLiteStandalone.ini";
18		StorageProvider = "OpenSim.Data.MySQL.dll"
19		ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=DB_Password;Old Guids=true;SslMode=None;"

	[Hypergrid]
50		GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
        [GridInfoService]
229             gridname = "SHEIKAH"
232             gridnick = "SHEIKAH"

Start OpenSim

Run OpenSim in a screen session to keep it active in the background:

screen -dmS "OpenSim" dotnet OpenSim.dll

Accessing the Screen Sessions

To reconnect to your running servers, use:

screen -d -r OpenSim

To detach from the screen, always use Ctrl + A, then D

Conclusion

Your OpenSim Hypergrid Standalone setup should now be running! If you encounter any issues or have questions, feel free to reach out.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *