This tutorial takes you through the process of hosting a public, standalone OpenSim server running Debian 4 Linux at the cost of $15/month. Major credit to Adam Zaius and his [HOWTO] Get OpenSim running on OSgrid.org for cheep cheep without which this tutorial never would have existed.
Unlike my OpenSim server on Windows this is not really guide for non-developers. To succeed you need to be familiar with things like Unix/Linux comand line, jed, ssh, putty, screen, and apt-get. However, I have tried to give you enough detail that you have some hope of success, but no gaurantees offered. So, let’s get started on the journey.
After spending some time in my new Windows Vista hosted region, I started to get lonely and well bored. Perhaps there was some Second Life builder who could stop by and whip up a scripted sailboat I could use. Trying to give someoneelse access to Sim from my home PC-based had a few challanges and the reality of hosting your own virtual world started to emerge. The challanges mainly took the form of Comcast and their “high-speed” broadband internet access (quotes intended).
It may be high-speed for downloading, but it is more like low-speed narrowband internet access going the other way. Coupled with the additional costs of a static IP address and punching a hole in my wireless router led me to the conclusion I needed to host the region in the cloud. So, I went in search of cheap but reliable and fast, hosted server which would fit into a hobbiest budget.
Step 1 - Find a Place to Host Your Region
A dedicated Blade for $60/month — Almost all cheap web hosting options do not allow you to upload and manage a customish application like OpenSim so I started to look for a basic server hosting solution. A good friend of mine pointed me at http://www.cari.net where you can get your own dedicated blade for the extreme deal of $60/month. This gets you dedicated hardware, a single core Celeron D processor, 1 GB of RAM, Fedora Core 7 OS, and 160GB Disk and 4Mbps burstable to 100Mbps up to 1300GB a month. Now thats pretty great for $60 a month. However Windows was +$20 a month another gig was +$20 a month and so on.
Other options considered:
- Co-location (some services allow you to buy a machine and rent space in their datacenter)
- Amazon EC2 (more on this in a future post)
- Get IT friend to sneak your machine into their companies datacenter
I finally decided to start with Cari, but couldn’t stomach an extra $20 a month to run Windows. However, before I committed to Linux I need to convince myself that my rusty *nix skills were up to the task. This is when I found Adam’s excellent HOWTO referenced above.
Step one of Adam’s tutorial pointed me at TexTonic and a Virtual Private Server virtualization at work. The barebones, unmanaged VPS is $15/month or 4x less than Cari’s bottom shelf. By comparision this gets you 294MB dedicated RAM, 30GB disk space, CPU burstable to 25% of available CPU, and 500GB of monthly transfer. Note, no meantion of what type of CPU is behind the 25%. But at $15 a month I figured I could risk it.
In the time it has taken me to write what I did in Step 1, I had an e-mail message with my new IP address and root password. A very easy and quick setup. I picked Debian linux and based on my experience following Adam’s tutorial I think the Linux flavor you pick does impact the exact steps required for success. I suggest you pick the one you are most familiar with as Ubuntu and CentOS were both options. Otherwise, I suggest you pick Debian.
NOTE: I also picked a 32-bit operating system. OpenSim supports 64-bit the process is much more complicated.
Step 2 - Login to Your New Server
To login to your sever you need a secure shell (or SSH) client. The most widely used, reliable, and free is Putty download here. One of the things I love about Putty is when you download it, there is just one file and it is NOT a zip, it is an executable. Put it somewhere and double click it and it runs. None of this run an installer, agree to terms and conditions, unpack and copy a bunch of crap to my harddrive, then twiddle registry keys so your presence on my machine can never be fully purged. Nope, just one simple file.
When putty comes up, simply enter your new IP address in to the field as shown below, leave the port to 22 and hit Open.
Step 3 - Login and Load an Editor
When the login screen comes up enter ‘root’ for the user and the password TexTonic provide you. You should arrive at the command line of your newly dehydrated virtual server. Before you get all the packages you need to build and run OpenSim it is necessary at least on a TexTonic clean Debian 4 linux to update where you look for packages in order to get the right version of a little program called mono.
WARNING: The wrong version of mono caused me extreme problems trying to build OpenSim and several hours of debugging so follow carefully.
Type the following to ensure your catalog of software is up to date.
apt-get upgrade && apt-get dist-upgrade
Then load the jed editor (or another editor of your choice) with:
apt-get install jed
You can now add one location to where your server looks for software to ensure you get the latest version of mono.
Step 4 - Add to and Update Your Package Distribution List
I won’t get into how to use JED, if it is not obvious try some docs here. Type the following:
cd /etc/apt
jed sources.list
Add the following line at the top of the sources.list file
deb http://debian.meebey.net/etch-backports /
There is a space between backports and the last backslash. I discovered this little gem obscurely on the opensim site under http://opensimulator.org/wiki/Monodevelop. Under troubleshooting for Debian 4 there is a section which suggestions you use all “unstable sources” which can’t be a good thing.
Hit ctrl-x ctrl-s to save and ctrl-x ctrl-c to exit. Now reload the sources for your packages with:
apt-get upgrade && apt-get dist-upgrade
Step 5 - Load the Necessary Packages
Using “apt-get install packagea packageb packagec” load all the following packages.
apt-get install subversion nant, monoSubversion is only required if you want to pull directly from the source code repository.
OpenSim Documentation lists the following required packages for Debian 4
- mono
- libmono-corlib2.0-cil
- libmono-sqlite2.0-cil
- libmono-system-web2.0-cil
- libmono-microsoft8.0-cil
- libmono-system-runtime2.0-cil
Adam recommends a bit larger set including:
- subversion
- nant
- mono-gmcs
- libgdiplus
- libmono-i18n2.0-cil
I ended up with many more once it was all said done, but never got the libmono-i18n2.0-cil which may be one of those “unstable sources”.
Once everything is installed which may take a little bit, check some versions with the following commands:
svn --version (mine was 1.4.2 (r22196))
nant --version (mine was 0.85)
mono --version (mine was 1.9.1)
WARNING: The version of mono should be 1.9.x, I could not build OpenSim 0.5.8 or the latest turn using mono 1.2.2.1
Step 6 - Download and Build the OpenSim Source
To download 0.5.8 (latest stable):
cd /var svn co http://opensimulator.org/svn/opensim/tags/0.5.8-release opensim cd opensim ./runbuild.sh nant
To download the latest and greatest trunk version substitute:
http://opensimulator.org/svn/opensim/trunk opensim
With lots of luck, you will get a clean build. If you have issues many common build problems are documented in Opensimulator Troubleshooting (your mileage may vary).
Step 7 - Edit the OpenSim.ini file Spin It Up
First you need to create a new ini file and edit it to use the OpenDynamicsEngine or else you will be able to just walk through prims.
cd bin cp OpenSim.ini.example OpenSim.ini
jed OpenSim.ini
Comment out the line: physics = basicphysics and uncomment out the line physics = OpenDynamicsEngine. Ctrl-x Ctrl-s saves, Ctrl-x Ctrl-c exits. Now spin it up.
mono OpenSim.exe
Then answer the questions thusly:
- Region Name [Opensim Test]:
- The name of the your new Sim, you can safely change this but keep it short and one or two words, I no evidence to suggest it would not work with a long sentence, but based on SL sim naming conventions I’m suggesting you adhere to this if you are not a developer.
- Grid Location (X Axis) [1000]:
- Grid Location (Y Axis) [1000]:
- Starting location in the world for your avatar. Keep defaults.
- Internal IP Address for incoming UDP client connections [0.0.0.0]:
- Should remain 0.0.0.0
- Internal IP Port for incoming UDP client connections [9000]:
- Modify only if you are planning to use a different port or expose your sim to the internet
- External Host Name [127.0.0.1]:
- WAKE UP HERE! Put in the external IP address to your server
- First Name of Master Avatar [Test]:
- First name of your main avatar
- Last Name of Master Avatar [User]:
- Last name of your main avatar. Yes, you can pick this in Opensim :-).
- (Sandbox Mode Only)Password for Master Avatar Account [test]:
- Password for your avatar
At this point the Opensim server should be up and running
Step 8 - Login From Somewherelse and Test with your SL Client
You can’t just login with your Second Life client because it has no way of knowing about your Opensim server. You need to launch the SL client with some command line parameters to tell it to use Opensim vs. the SL grid. Open a command window and navigate to the directory where you installed Second Life. You should find SecondLife.exe You can then type in:
SecondLife.exe -loginuri http://<YOUR IP HERE>:9000/
Start Building. Or if you are so inclined learn how to create your own custom terrain here.
Step 9 - Keep OpenSim Running After You Log Out
The final step is getting OpenSim up and running even after you log out of your Putty/ssh session. To do this first shutdown OpenSim by typing “shutdown”. Then enter the following sequence:
screen mono OpenSim.exe ctrl-a ctrl-d
You should now be able to logout and your region will still be up and running. Try it!


21 comments
Comments feed for this article
Trackback link
http://www.virtualwhite.com/wp-trackback.php?p=82
August 14, 2008 at 2:10 pm
Pingback from Tutorial: A Public OpenSim Linux Server for $15 a month | SL Blogs
December 14, 2008 at 11:20 pm
Pingback from Recent Links Tagged With “opensim” - JabberTags
February 14, 2009 at 8:09 pm
Pingback from randomhumanity » Blog Archive » Alpha is the new Beta
December 16, 2009 at 8:06 pm
Pingback from My experiences with OSGrid and OpenLifeGrid | Reflections
August 18, 2008 at 4:49 am
Justin Clark-Casey
Nice tutorial Rich! I may well use it as a guide myself when I need to start running a non-home hosted OpenSim - good work!
August 18, 2008 at 7:04 am
AlexM
Your blog is interesting!
Keep up the good work!
August 21, 2008 at 2:02 pm
Doug Schomaker
Thanks you for one of the most useful online tutorials I’ve seen in a long time. I’m running 3 sims on the $15 unmanaged plan and they seem to work well. When I tried 4 there must have been a memory shortage because they started behaving rather strangely.
I wish I could find a Windows server at this price, RealXtend seems to require it.
August 21, 2008 at 2:26 pm
Brian White
Thanks Doug, appreciate the kuddos. I’m starting to poke at OpenSim scalability. Have you tried adding more avatars?
August 30, 2008 at 10:41 pm
Doug Schomaker
I finally got 4 regions to work well in OSGrid by using one instance of OpenSim to run all 4 regions.
Actually it’s very hard to get my friends to visit me in my sims. It looks like they need an easy to use intergrid teleport as part of the standard viewer. I’ve gotten a few individuals to use the RealXtend viewer but it looks like most people would rather just use one viewer for everything.
September 5, 2008 at 8:32 pm
Drax Lemieux
Thank you Brian for a great tutorial..I am having a problem with running the sim. I keep getting an error Can not open assembly OpenSim.exe
Pior to the build I had problem running runbuild.sh I instead ran runprebuild.sh.. not sure it that was right or wrong.
September 6, 2008 at 7:44 pm
Brian White
Take a look in the log file and see what is there. Did you get a clean build? I did not at first.
Also, look at opensim.org under troubleshooting, several tips and tricks there.
September 16, 2008 at 2:44 pm
Urs
Thank you Brian! This tutorial is great and all worked fine with a Debian VPS.
What minimum security steps would you recommend for such a virgin server, only used for a standalone OpenSim to meet with friends? Could you give hints where to begin?
I’ve started to read documentations about server security … and will need a lot of time.
Thank you!
November 19, 2008 at 2:46 am
Dutchie
I’ve been in OSGrid for several months now, since beginning of August and I have been searching for a sailboat (or any vehicle script for that matter) for opensim and it seems (according to the devs mailinglist) that there is someone who actually managed to get a sailboat working in OpenSim.
However who it is and the actual script are unknown to me, if I knew I would have posted it here.
If you happen to find out, can you please let me know?
Great post by the way.
You’re missing the apt-get update step in: apt-get upgrade && apt-get dist-upgrade
Also, you can pickup the mono packages from lenny/sid safely nowadays.
November 23, 2008 at 9:46 pm
Personman
Would it be possible to link together multiple grids on diferent servers?
December 6, 2008 at 5:17 pm
Tasman Perth
The mono build went fine on Debian Etch, however running it, with the Ode physics, gets an exception which appears to be saying it can’t find ode.dll, which is def in opensim/bin.. Soo I try switching back to basic physics, and it blows up with an exception complaining about a “system.data.oracleclient”… WTF??
December 30, 2008 at 5:31 pm
RandomAvatar
I’m getting the same problem tasman- does anyone know of a quick fix to the system.dllnotfoundexception for ode?
December 30, 2008 at 8:47 pm
RandomAvatar
I managed to wipe out the dll not found exception on debian by getting the libode-dev from aptitude.. but now i see Exception: System.EntrypointNotFoundException: dInitODE, followed by termination of the application
any suggestions on clearing this up woould be hugely appreciated
February 21, 2009 at 5:15 pm
Tasman Perth
This is Tasman Perth again… The fix to get ODE to work on a Debian Etch vps was to upgrade to unstable/lenny… That cured the ODE problem, but now I’m stuck with what seems to be a permanent ghosty avatar… The OpenSim mantis alludes to some bugs that exhibit this symptom, but I’ve not been able to resolve it yet.. Other than this problem, OpenSim runs fantastic on one of these Tektonic $15 vps….
Tas
March 24, 2009 at 9:35 pm
Magneto CartWheel
Thank you very much for you great tutorial, Brian, it has been very usefull to me. Other opensim working 24h in a virtual server! Thanks to you and http://www.slicehost.com.
May 6, 2009 at 6:44 am
Maria Korolov
Brian — Its been several since you first set it up. How is it working for you? Are you happy with your original host? Have you linked your region to other grids, such as the OSGrid, or switched to the Hippo client? Thanks! — Maria
May 6, 2009 at 10:26 am
bwhite
Hi Maria. Honestly the experiment stalled out for me primarily because I went through two acquisitions and now into Amazon. Will be a while before I free up enough time to unearth my sim. Without having full confidence that I can backup/restore the sim, I did not think it worth while inviting a bunch of people in to start building.