Hosting 1999 On A Raspberry PI
by Frank McPherson Saturday, October 8, 2016

One of the cool things about server apps written in node.js is that they are relatively simple to implement and they have relatively low hardware requirements. To build a site all you really need is a computer running node.js that has a network connection. It is fairly simple to set up a site with a computer running Linux.

While I am hosting this site on a server hosted by CloudAtCost running Ubuntu, I also have a test site running on a Raspberry Pi3 connected to my home network. While I can only access the test site from computers on my home network, it does provide a way to test new things without messing up this site.

Raspberry Pi is an affordable, small computer. Node.js is included in the default Raspberian operating system, as is git. If you follow the instructions for installing nodestorage, you will need to install npm and forever. 

My Raspberry Pi3 server is not going to blow the performance doors off, but I am running River5 and nodestorage on it, with no noise and low power consumption. I am also running Docker.  

The Raspberry Pi was created for teaching computer science in elementary and high schools, and makers use it for a wide range of projects. I recommend you spend some time browsing the Raspberry Pi blog archive to get an idea of what one can do with the device.

In regards to setting up a 1999 test Twitter app, if you are running 1999.io on a computer running on a home network, you can use the address that your home network assigns to that computer for the website and callback URLs. 

For example, if you have a Raspberry Pi that has an IP address of 192.168.1.100 provide 192.168.1.100:1999 as the web site and callback URLs in order to generate the twitterConsumerKey and twitterConsumerSecret values that are needed in the site's config.json. 

If you set up a Raspberry Pi as a server on your home network you may want to configure DHCP on your home network so that the same IP address is assigned to it every time the computer is booted. Most home network access points or routers that provide IP addresses provide a way to reserve addresses to specific MAC addresses. Look for the instructions for IP address assignment in your router's help. 

Alternately, you can manually assign an IP address outside the range of addresses that DHCP provides, and I assume if you know this you have probably already done so and ignored the previous paragraph.

I have to admit, I wasn't sure whether using a private IP address would work for a Twitter app, but has been working for me.