You are on page 1of 6

Installation Guide

Planet 9
Release 2.x
About
This guide contains all needed technical information on how to install, operate and upgrade
Planet 9 server. Planet 9 will be delivered as an executable file, including all needed
resources like node.js.

Since 2.x release do not support filesystem, an upgrade from filesystem is not possible. We
recommend you install Planet 9 in a different location and deploy artifacts from 1.x to 2.x
release. The replacement for filesystem is SQLite DB.

Prerequisites for a new Installation

Database

All data, ranging from your configuration, apps and application data are persisted in the
Planet 9 Database. By default, the embedded SQLite database is configured and used.
There is also support for PostegreSQL (and more to come).
If you switch between databases, all data present in the previous database shall not be
available anymore within the Planet 9 installation. Therefore, it is advised, when you set up a
new Planet 9 installation to first, above all, configure your database (Settings > System >
Database), restart Planet 9 and then do all other configuration.

PostgreSQL

If you are planning on using the PostgreSQL database, you need to create a new database
the first time and planet9 schema:
CREATE DATABASE planet9;

CREATE SCHEMA planet9;

On initialization, Planet9 will create all the needed tables under this schema. For the default
SQLite database nothing is needed.

NPM

To be able to install and use NPM modules in Planet 9, you have to make sure that NPM is
installed on your machine.
Url: https://www.npmjs.com/get-npm
Installation and Upgrade

▪ Extract the ZIP file


▪ Move the planet 9 server file and the SQLite file to your preferred directory. For
upgrade you replace the existing planet 9 server file with the new one.
o Mac/Linux, if the file is not executable:
▪ Open terminal
▪ cd <path to planet9>
▪ chmod +x ./planet9-macos

▪ Normal startup:
o Linux
▪ planet9-linux
o Windows
▪ planet9-win
o Mac
▪ planet9-macos

▪ First time you start Planet 9 – or when you upgrade, start with these parameters:
o Linux
▪ planet9-linux --upgrade
o Windows
▪ planet9-win --upgrade
o Mac
▪ planet9-macos --upgrade

Installation on Mac

After the download is finished, open the download folder and check the filename. There are
some issues with Safari. The Browser adds ".dms" to the filename. Rename the file and
delete the extensions .dms .
Open Console and go to the folder where the file is located. Then make a command with
"chmod +x ./planet9-macos"

Post Upgrade Activities

▪ Check for Launchpad updates in the Store and download new version if available.
▪ Start Cockpit->Security->Role and check ACL for new functions delivered in the new
version.
Defaults

When Planet 9 is started, open a browser and navigate to the URL corresponding to your
server:
Local PC: http://localhost:8080
Server: http://serverURL:8080
Default username: admin/admin

Running in Production

When you deploy a Planet 9 instance on a remote system, there are some concerns to be
addressed.

• You should not run the Planet 9 instance as a “admin”, “root” or any other super
admin-type privileged user.

• As the Planet 9 instance should not run as any super admin-type of user, Planet 9
probably (depending OS) is not be able to bind by default to port 80 (HTTP) or 443
(HTTPS). To bind Planet 9 to these default ports, we advise to use a web server like
NGINX which can bind to port 80 and 443 that forwards requests to the Planet 9
instance.

You can also use NGINX to cache any media request, so less load is put on the
Planet 9 instance for serving static assets like images. NGINX has a free open
source version available for commercial use.

• We advise to create a folder where all your custom NPM modules will be installed,
after you’ve created this folder, configure the Planet 9 instance to use this folder in
“settings > Customizing > General”.
Running on an external system

If you want to run it on a remote system, you need to be able to disconnect from the system
without detaching (and killing) the process. There are 2 ways to do this:

1. Fork it so that it can run as a background process or run as a service. The benefit of
running as a service is that the Planet 9 instance can restart in the event of a Planet
9 application crash and auto start on bootup. Do make sure that the Planet 9 service
then runs with a user that can access the custom NPM folder, has the path to NPM
set, and you have allowed the proper permissions for the Planet 9 executable (see
installation step)

An example configuration for a Linux service:

[Unit]
Description=Planet 9

[Service]
ExecStart=/var/planet9/planet9-linux
Restart=always
User=MyUser
Group=nobody
# Notice the NPM path
Environment=PATH=/home/MyUser/.nvm/versions/node/v10.16.3/bin:/usr/
bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/var/planet9

[Install]
WantedBy=multi-user.target

2. Use a terminal multiplexer like “screen” or “TMUX”, (see below).

TMUX

Here is a quick guide of how to do this using tmux on linux:

1. Start tmux the first time: tmux


2. Start Planet9.From this point on, even if you are disconnected from the server, it will
continue running
3. When you are done, you can disconnect from tmux: c-b d (or c-space d). d stands for
disconnect
4. The next time you connect and want to continue where you were, enter the server,
type tmux ls to see the running tmux sessions, and type tmux attach to attach to it

Note that you can run Planet 9 without doing this, but as soon as you lose the connection to
the remote system, the parent process will die, and only the forked system processes will
continue running (so you won't see the systems processes running inside Planet9 etc).

Install TMUX – Linux


sudo yum install tmux
Neptune Store

To have access to our Store, please open connection from Planet 9 server to
https://template.neptune-software.com

Resources

• Documentation: https://community.neptune-software.com/documentation
• Community: https://community.neptune-software.com/
• Courses: https://elearning.neptune-software.com/courses/p9-rockstar-developer

You might also like