Tuesday 31 January 2012

Accessing Amahi apps over the Internet

If you love your Amahi server like I do, you'll really like it across the Internet. 
If you don't know what Amahi is, it's a "Home Digital Assistant", or a home server. The nicest thing about Amahi is that they have gone through great pains to make it easy to get installed and easy to use. You can visit http://www.amahi.org for info. 

First let's talk about your IP address. If you have a static IP address, I assume you know about how it works and can skip this section. If you're like me, you have a dynamic IP address (it changes from time to time). I have a dynamic DNS account. I subscribe to a service that will discover what my IP address is and assign it to a URL like user.linux.com. It detects when my ISP changes my IP address and updates accordingly. You will need the same. !!!Make sure they support wildcards!!! If not, this won't work. So now you have your dynamic DNS account and let's say it's called user.linux.com. 

You probably have a router/firewall on the edge of your network. You will need to make an entry to forward all traffic on port 80 (http) to the private IP of your Amahi server. Some devices call this NAT, some call it port forwarding. Check the documentation on your device on how to make this happen. 

To make the necessary changes in Amahi very easy, you will need to go to the app section and install Webmin. Read the instructions on how to set it up. Most of the apps in Amahi are one-click-installs. Webmin is one of the few that has a couple extra steps. 

Go to your webmin web page. On the left side, click servers, then Apache Webserver. 
For every app you have installed in Amahi, you'll see a Virtual Server. Look for the app you want to access across the Internet and click on the globe. 
Now you are in the Virtual Server Options page. Click on Networking and addresses. 
The only thing you need to do here, is add the URL that you are going to use with your dynamic DNS account in the Alternate Virtual Server Names box. The address you see there is internal to your network. Don't change it or delete it. Just go to the end of the line, press enter on your keyboard for a new line, and add your Dynamic DNS address. This is where the wild card comes in. 


For example. If you want to access your transmission app, and your dynamic DNS name is user.linux.com (from the example above), then the URL you add in the Alternate Virtual Server Names box is transmission.user.linux.com. Click the Save button. Click the Apply Changes link in the upper right hand corner. 
Now go to your neighbor's house and navigate to http://transmission.user.linux.com. 
If you want to access your Tin Can Jukebox app from work, go back to Apache Webserver, find the jukebox virtual server, click the globe, click Netowking and Addresses, add the URL jukebox.user.linux.com in the Alternate virtual server names box, click save, click apply changes. Next time you feel like rocking out at work, navigate to http://jukebox.user.linux.com. 

This will work for almost every app in Amahi. There are some apps that have special set ups. You can still make them work but it will require a little more advanced setup.

1 comment:

  1. You do not need to ad any dns entries for the other services like transmission or jukebox using your examples? You only need to have the dyn dns for the main host the hostname.yourhda.com?

    ReplyDelete