Hosting your own Planet server




A. Conditions to open a Planet server

In which cases can you host your own planet server?

1. you want a private planet to build alone

In this case, install the planet server on your PC. You can build there alone, even without an internet connection. You can bring your constructions later on the public planets via your inventory. Connect with planet://127.0.0.1/#my_planet and browse the group with http://127.0.0.1

2. you want to create a public planet

2.1 You will not have any control

You should know that planets have public access, i.e. you can't control who comes to build on your particular server. Having your own planet won't protect you from having undesirable neighbors next to your land.

This choice was made so that Planet would offer players a large, neutral and uniform universe in which to build, rather than a list of planets each with their own rules dictated by their administrators.

We don't want players to have to worry too much about which server they're on. All public terrains from all servers appear mixed together in the search list without indicating which server they are on.

2.2 first form a group of friends, not after

We would like to caution you that it is very possible that your server will not have any visitors, even if you build a beautiful scenery yourself.

If you are alone, please do not start your own planet. The servers are designed to host up to 1000 people, so if you're alone it's far too big for you.

Don't expect to attract people to your land by having your own planet, it will be the other way around: you will have even less people than if you stay on one of the other planets which already has its regular residents.

What you have to do is first to create a group of friends who have been building for several weeks on the other planet servers and who agree to follow you for a common project.

2.3 Online 24/7 for several months

We want public planets to remain online 24 hours a day, for a long time (several months), to offer players land where they can build without fear of losing their work if the server closes.

Therefore, to open a public planet, you need to rent a dedicated server from an Internet provider. Each server has reliability statistics that players can consult.

2.4 backups

The management of the server brings a chore, that of regularly (every day or at least every week) taking a backup of the database, so that in case of failure of your machine you can start again from a new installation and your last backup, to avoid the losses of creations and angry users.

It's a good idea to install an automatic job that takes daily backups of the database to another server in another building. If you don't have the computer knowledge to guarantee reliability at this level, please don't start your own public planet.

2.5 independence of your server

Your server is totally independent and contains everything you need to run your planet. If the Planet Samuro site should ever close your server will continue to function.

2.6 create a website

To bring visitors to your planet we advise you to create your own website with lots of beautiful pictures.


B. Rent a dedicated server

You need to rent a dedicated server from an internet provider.

Here are the minimum requirements: i3 processor, 8 GB RAM, 240 GB SSD hard disk, 100 Mb/s internet access.

Choosing an SSD hard disk (and not an HDD hard disk !) is recommended otherwise you will have delays, for example a 0.25 second wait or more when clicking on a chair before sitting down. If you could get only an HDD, we advise you to defragment it at least once a week, it helps a little.

To run the Planet server (which is a Windows software) you can choose between :

Windows Distribution

You can connect to your server using the Windows Remote Desktop.

To share a folder on your PC, use the MS-DOS command :

  net use z: \\TSCLIENT\C

To start task manager, type :

  taskmgr.exe

To stop the planet server, select it in the task manager and click 'end task'.

To open UDP port 13000 and TCP port 80, open a DOS box with administrator privilege and type :

  netsh advfirewall firewall add rule name="UDP Port 13000" dir=in action=allow protocol=UDP localport=13000
  netsh advfirewall firewall add rule name="TCP Port 80" dir=in action=allow protocol=TCP localport=80

Linux Distribution

Here is some information for specialists who want to risk installing Planet on Linux.
We have tested with Ubuntu Server 18.04 distribution

It should be noted that running Windows programs with Wine always involves risks of compatibility problems. We have tested with Wine 7.0 and everything seems to work fine.

To connect from your Windows PC:

  ssh -o ServerAliveInterval=30  root@xxx.xxx.xxx.xxx

Create a planet directory

  mkdir planet

Go to the planet directory

  cd /planet

Copy planet_server.exe from your PC to the server

  scp planet_server.exe root@xxx.xxx.xxx.xxx:/root/planet/planet_server.exe

To install Wine 7.0,
see the instructions on the site https://wiki.winehq.org/Download

Start the planet server in background
for info, the nohup is used so that linux doesn't stop planet when you close your session, the & is used to start in background. You need to run planet as root, otherwise it won't have access to TCP port 80 and the website won't work.

  nohup wine planet_server.exe &

See the running processes

  ps -e

Stop the planet process

  kill 4566  (replace 4566 by the PID of the planet process)

C. The Planet Server software

The Planet server software runs on Windows. It supports a maximum of 1000 connected users and needs about 50 GB of hard disk space to store the users' 3D creations.

At the first startup, the software creates a large planet with 90% of oceans and 10% of empty building lands composed of islands of random position and size. While it is daytime on one side of the planet it is night on the other side. It takes 20 minutes to fly around it.

The users connect to the server on the one hand via the port UDP 13000 with the planet software, and on the other hand via the port TCP 80 with an internet browser to consult the group, the help manual, the message forum, and the mini-chat.


D. How to install the Planet Server software

To get the Planet Server software, take a copy of planet.exe (which is normally on your hard disk if you have installed the planet software), and simply rename planet.exe into planet_server.exe

Create a folder on the hard disk of your server, put planet_server.exe in it and start it.

Open the ports UDP 13000 and TCP 80 so that your server is accessible publicly on the Internet. To test, give the IP of your server to a friend so that he can connect with the planet software via a link planet://xxx.xxx.xxx.xxx or via an internet browser by giving a link http://xxx.xxx.xxx.xxx

Database

The server will create a database "planet_server_database.db" which contains the whole 3D world and the groups. The database file is always locked since it is actively updated. It is not possible to take a copy, this is normal.

Every night at 5am, the server creates a file "planet_server_database.db.BACKUP" which is a copy of the database. The previous copy is renamed in "planet_server_database.db.OLD-BACKUP". So you have at any time 3 files:

planet_server_database.db            : the active (blocked) database
planet_server_database.db.BACKUP     : the copy of the previous day
planet_server_database.db.OLD-BACKUP : the copy from 2 days ago

It is your responsibility to regularly take a copy of the backup files. After a reinstallation, simply rename the most recent backup file to "planet_server_database.db" so that it becomes the active database again.

It is possible, via a planet_server.ini file, to specify a folder where the server stores the backup files:

  # planet_server.ini
  [settings]
  backup_folder = e:/backup/            # the pathname must end with /

Defragmentation

It is possible that at the start of the server you cannot connect to it immediately. If you see a file "planet_server_database.db.DFRG" it means that the server is defragmenting the database. You have then to wait between 5 and 15 minutes.

Double Start

If you start planet_server.exe while it is already running, the second planet_server.exe will not start.

What to do in case of error

If the server stops with an error window, you can try to restart it. The error is recorded in a CRASH-REPORT.TXT file that you should send to marcsamu@hotmail.com for correction.

Administration

The server manager(s) can enter their avatar name in the planet_server.ini file, as follows:

  # planet_server.ini
  [settings]

  # administrators who can change colors and ban a domain
  admin   = Samuro
  admin_2 = Ingrid
  admin_3 = Ursula

They then gain access, in domain info, to a button for choosing Planet's standard colors, as well as another button for banning a domain (in the very rare event that the domain or its group contains illegal content).

Manual Backup

One or more trusted persons can be authorized to manually take a copy of the server database, to enable shared responsibility and server continuity in the event of illness or death.

To do this, enter the avatar names in the planet_server.ini file, as follows:

  # planet_server.ini
  [settings]

  # avatars that can manually take a copy of the database using the F10 key
  backup_op   = Samuro
  backup_op_2 = Ingrid
  backup_op_3 = Ursula

To take a copy of the server database, log in with your avatar on the correct server and press F10. A file is then copied to the hard disk in the Planet directory.

It's not a good idea to open several copies of the same planet at the same time: teleportation will then send you to one of the servers at random.

Summary of planet_server.ini options

  # planet_server.ini
  [settings]

  # administrators who can change colors and ban a domain
  admin   = Samuro
  admin_2 = Ingrid
  admin_3 = Ursula

  # path on the server to which the database copies are moved
  backup_folder = e:/backup/         # the path must end with a /

  # avatars that can manually take a copy of the database using the F10 key
  backup_op   = Samuro
  backup_op_2 = Ingrid
  backup_op_3 = Ursula


Appendix: learning IPv6 under Windows

In the Windows Start menu, select "Windows PowerShell(admin)" and click Yes.

Type the following command:

netsh interface ipv6 show addresses

A list like this one appears:

  Interface 20 : Ethernet 2

    Addr Type  État DAD    Vie valide Pers. Fav.   Adresse
    ---------  ----------- ---------- ----------   ------------------------
    Dhcp       Préféré            55s        25s   2a02:2788:764:ac9:213:3bff:fefb:63ff
    Temporaire Préféré        4d3h37m 4d3h35m32s   2a02:2788:764:ac9:d94c:d1b5:7c35:f84
    Public     Préféré    13d23h59m43s 6d23h59m43s 2a02:2788:764:ac9:e591:aa85:3fea:4081
    Autre      Préféré       infinite   infinite   fe80::a829:560b:6cb8:4944%20

The first thing to look for is the interface number, here 20. This number represents the network card used to connect to the Internet, of which there may be several.

Next, you'll see that there are 4 IPv6 addresses. Each address is made up of 8 groups of digits separated by a colon. The one starting with fe80 doesn't interest us, as it's valid only on the local LAN, and can't pass through your router.

The other 3 addresses have a limited lifespan: often between 1 minute and 24 hours. In other words, Windows changes them frequently. If you're surfing the web, Windows will use the temporary IPv6.

If you want to install a server on your PC, none of these addresses is suitable, so you need to create a new one that doesn't change.

You're not totally free to choose the IPv6 you want. Your Internet provider always provides you with the first 4 groups of digits, so here

2a02:2788:764:ac9:

As you can see, this prefix is common to all 3 addresses above.

Some routers (e.g. sfr) automatically set the first 7 groups of digits. The exact procedure may therefore vary, and should be checked with your router.

Here we'll show you how to add an Ipv6 simply. You take the prefix and you add a suffix 1, which gives :

2a02:2788:764:ac9::1

The ::1 is an abbreviation for :0:0:0:1

To create this address, type :

netsh interface ipv6 add address 20 2a02:2788:764:ac9::1

Note that 20 is the interface number.

If you type :

netsh interface ipv6 show addresses

You'll see this address added with an infinite lifetime:

    Addr Type  État DAD    Vie valide Pers. Fav.   Adresse
    ---------  ----------- ---------- ----------   ------------------------
    Manuel     Préféré       infinite   infinite   2a02:2788:764:ac9::1
    Dhcp       Préféré            58s        28s   2a02:2788:764:ac9:213:3bff:fefb:63ff
    Temporaire Préféré     4d3h35m33s  4d3h34m5s   2a02:2788:764:ac9:d94c:d1b5:7c35:f84
    Public     Préféré    13d23h59m46s 6d23h59m46s 2a02:2788:764:ac9:e591:aa85:3fea:4081
    Autre      Préféré       infinite   infinite   fe80::a829:560b:6cb8:4944%20

If you've made a mistake, you can delete the line by retyping the above command but replacing add with delete.

To connect to planet, use the link :

planet://[2a02:2788:764:ac9::1]

If this doesn't work, you should also open the IPv6 firewall on your router, or on some routers, redirect incoming calls from UDP port 13000 and TCP port 80 to the IPv6 on your PC.

Don't use the other temporary IPv6s as Planet link. This works at first, and these IPv6s will then be registered in the Planet system. But when the lifetime of these addresses has expired your users will complain that your server is no longer reachable when teleporting, and these expired addresses will remain in the Planet system for up to a week.