The Pond
An old silent pond
A frog jumps into the pond–
Splash! Silence again.
    Matsuo Basho


Blog post on my little diversion on:

  • Running Haiku
  • Setting up an Nginx webserver
  • And putting up this blog
  • Casual observations on Haiku

Installing Haiku

TierHive has Haiku as a deployable OS. I installed it there with 512MB ram, 5GB disk and all low settings for CPU, Network and DiskIO. A TierHiveDeploy

Once installed, the console will show the desktop. However, trying to use Haiku from the TierHive console is painful… Let’s install VNC server on Haiku instead.
Login to your instance of Haiku. In TierHive the ssh key used during installation is tied to the “user” user
A TierHiveDeploy Install vncserver
A TierHiveDeploy Setup the VNC hook A TierHiveDeploy Configure the horribly short VNC password. We will not directly expose the VNC server on the internet, but through an ssh proxy. A TierHiveDeploy Start up VNC! You might want to add an “&” to run the server in the background A TierHiveDeploy Proxy the VNC server port (5900) over your ssh connection. I’m using putty so it’s configured on the menu.
“ssh -L 5900:localhost:5900 -P xxxx user@your_vps_ip” for command line folks.
You might want to leave the terminal session running vncserver alone, and start up another terminal session with the VPS with these proxy setting A TierHiveDeploy On your laptop, run tightvnc and connect to the proxied vncserver port. A TierHiveDeploy If everything went well, you’ll see the Haiku desktop! A TierHiveDeploy All the interesting stuff is on the top right corner. Try clicking on the gauges to see stuff like memory and processes. A TierHiveDeploy Install Apps by clicking on the feather and navigating to “HaikuDepot” A TierHiveDeploy Does it run Doom? A TierHiveDeploy Yes! But with horrible performance :(, since we are running from a VPS on low settings 10,000+KM away A TierHiveDeploy


Setting up a Nginx webserver

Let’s do something more productive… Install Nginx
You could install it using “pkgman”, but let’s try using the GUI instead A TierHiveDeploy After installation, Nginx does not seem to be started. Nothing on port 80 A TierHiveDeploy Let’s look at the nginx config file. Hmm… vi is not present. Let’s trying using the inbuilt lpe editor instead. A TierHiveDeploy A TierHiveDeploy Ah…. a GUI editor pops up on the desktop. No thanks… Let’s install vim. A TierHiveDeploy The Nginx config file looks ok. Just need to start Nginx up. A TierHiveDeploy Since our VPS is has NAT mapped ports, map port 80 to an external port. A TierHiveDeploy Fire up your browser! It works! A TierHiveDeploy Let’s add Nginx to the bootup to make our life easier.
You could also add in “vncserver &” too, so that it also autostarts on boot. A TierHiveDeploy A TierHiveDeploy Plain old http is a bad idea, so let’s configure Nginx for https. First create some self signed keys. Great! openssl is already installed. Note the location where the certs are created! A TierHiveDeploy In the Nginx configuration, uncomment out the https section, and change the location of the keys. A TierHiveDeploy A TierHiveDeploy Verify the config and restart Nginx A TierHiveDeploy Again, since our TierHive VPS is has NAT mapped ports, map port 443 to an external port. A TierHiveDeploy Fire up your browser and connect via https instead. It works! Your browser will, of course, complain about self signed certs being insecure.

Note: TierHive has a nice HAProxy setup to easily create good certs, allowing you to skip the entire https setup process on Nginx. Of course, you’ll need to bring a domain name. A TierHiveDeploy


Putting up a blog

I put together this blog using Hugo and will only mention how the entire static site is added to nginx. Not much to do. Basically sftp the entire compiled site into a directory, and point nginx to it. A TierHiveDeploy A TierHiveDeploy Change owner of the directory to nginx and restart A TierHiveDeploy Blog Page! A TierHiveDeploy


Casual observations on Haiku

  • You can run real applications on it, my instance of Nginx being an example
  • The directory structures will be pretty unfamiliar to *nix folks
  • Common *nix commands are available, but have unfamiliar options (e.g. -a is not a option for netstat)
  • It runs Doom! :)
  • The WebPositive browser harkens to the days of Netscape.
  • Probably because of the 512MB of ram, but it crashed and hung the VPS when challenged with running the browser and a file decompression task.
  • The desktop UI looks better than Windows 3.1 (though not by much). Of course BeOS looked like this too.