[In Depth] How To Make An Aternos Server?

Hi! I am writing this article to help people make their own aternos server. But before take a look about aternos.

What is aternos?

Aternos is a multimedia streaming server that can be controlled via its web interface (GUI) or via HTTP API . It’s written in C++ using the Qt framework for the GUI and libevent as well as OpenSSL for networking. It supports all major operating systems and CPU architectures like Windows, Linux, Mac OS X etc.

The Aternos project was created by Yann Verley , who still leads development of the project today.

The project itself however has been an active community effort from everyone who has submitted patches or bug reports which have helped make Aternos what it is today! An Aternos server is a program which runs on the Raspberry Pi.

Aternos server can be used to play videos, music or other media files (which are called items) to users around the world via an internet connection.

Items can be streamed by clients directly from the Raspberry Pi itself, but more commonly you’ll stream them remotely; your Raspberry Pi will act as a server and clients will connect to it over the internet.

Streaming works using what’s called multicast streaming . This means that only one copy of each item is stored on your network so you don’t have to worry about things like storage limits. The Aternos project was created by Yann Verley , who still leads development of the project today.

Pre-Requiresticks

First you will need the following:

  • Raspberry Pi (any model)
  • Raspbian Wheezy (or whatever the current distro is for raspberry pi, default kernel should work though).
  • miniSD card (4 GB+) w/ adapter (8GB+ preferred)
  • Network Cable / LAN Connection
  • USB Keyboard & Mouse
  • External Hard Drive or USB Flash Drive w/ at least 1 GB of space *(customer can use another usb device if they wish but it has to be powered by using the raspberry pi’s 5v supply – see below)*       Note1 : a good 500 GB external usb hard drive is around 30$
  • aternos Download from http://www.aternos.org  (customer can download from youtube or many other places, this article assumes customer has aternos already)
  • A PC to extract aternos zip file (customer can extract on raspberry pi or another computer and transfer the files to raspberry pi)

Steps to make an Aternos Server

Step 1: Raspbian Installation & Setup

After you have all your items, install raspbian onto the 4GB+ miniSD card using Win32DiskImager . After that go into Raspberry Pi Configuration and enable SSH in Boot Options then apply then reboot. You will need an ethernet connection for this step so make sure you have one.

After Raspberry pi is rebooted go ahead and login to raspberry pi either by using ssh or by connecting keyboard, mouse , monitor then rebooting again.

Now that you are logged into your raspberry pi type in ifconfig  then write down the ip address that is associated with eth0 which is ethernet here. Note : the default username/password for Raspbian is Username: “pi Password:” raspberry When finished writing down this information power off raspberry pi by holding in the physical power button until it turns off .

Step 2: Making a Shared Folder on your External Hard Drive or USB Flash Drive (Option A)

This step can be skipped if you don’t wish use an external hard drive or usb flash drive.

If you have a laptop or another raspberry pi, follow step 2-A then skip to step 3 , if not continue on with step 2-B .

a) On a different computer that is connected to the same network as your raspberry pi (or connect raspberry pi to your computer using an ethernet cable and use ssh or open terminal ifconfig eth0 will give you your ip address make sure it’s the same one from before), create a folder in /media called whatever you want (for this article we’ll call it ‘raspbmc’ but anything will do).

b) Go into the raspberry pi and type sudo mkdir /media/shares

c) Type in sudo chmod 777 /media/share or 777 /media/shares or chmod 777 /mnt/share or whichever directory you decided to use.

d) Type in cd /media/shares

e) Type in sudo cp -r /path/to/your/folder . Replace ‘/path/to’ with the path of your shared folder (i.e. ‘sudo cp -r /home/pi/Desktop/* ~/shares’)

f) Go back to the raspberry pi. To make it easy to get into this folder later type sudo nano etc then scroll down and find the hosts file delete everything inside then add <IP Address> <ShareName>. For example if your ip address was 192.168*.1 then it’d be this 192.168.1.2  raspbmc .

g) Type in sudo nano fstab then add the same <IP Address> <ShareName>.

For example if your ip address was 192.168*.1 then it’d be this 192.168.1.2  raspbmc . h) Then type in sudo mount -a which applies all these changes and mounts everything, to unmount type in sudo umount /media/share or whatever you called it before mounting.

To access your raspberry pi’s shared folder on another computer, open up a file explorer window and go to network , If there is nothing there use the drop down menu at the top to change “view” from simple to ‘show hidden items’ or ‘show all network locations’.

It may take a few seconds to load. When finished you should see your raspberry pi and the folders it has shared on it, double click and explore!

Step 2-A: On a Laptop (Option B) If you have a laptop that is connected to the same network as your raspberry pi then follow this step instead of Step 2-B . Create a folder on your computer somewhere (i.e. desktop) and copy everything from inside your raspberry pi’s shared folder (in step 7 step 5 above) into this newly created folder on your computer.

Now open up an explorer window and go to network , if there is nothing there use the drop down menu at the top to change “view” from simple to ‘show hidden items’ or ‘show all network locations’.

It may take a few seconds to load. When finished you should see your raspberry pi and the folders it has shared on it, double click and explore!

Step 3: Making an Aternos Server Folder (Option A)

This step can be skipped if you don’t want to make an aternos server folder. If you have a laptop or another raspberry pi , follow this step then skip to Step 4 , if not continue on with Step 3-A . 1) On your raspberry pi go into file manager by typing file manager then navigate to /home/pi/shares 2) Make a new folder inside shares called you want (for this article we will use aternos as an example) 3) Go to the raspberry pi and type sudo raspi-config 4) Use the arrow keys to navigate to advanced options 5) Navigate down until you find A5 – boot options and press enter then select n and press enter if it applies changes 6) Reboot your raspberry pi by typing sudo reboot

To make aternos, go into shares on your raspberry pi, navigate into aternos folder, then type in sudo nano start.sh . Then copy this code:

sudo python /home/pi/shares/raspbmc/python/Libary/xbmcplugin/default.py –standalone &

To out of nano press control+x then type y and press enter to save, then restart by typing sudo reboot

To connect to aternos server navigate into aternos folder on your raspberry pi and type in wget http://<IP Address>:8181/stream/play.m3u8 . Replace ‘<IP Address>’ with the IP address of your raspberry pi which you can find by going to raspberry pi’s network location or entering this command ifconfig from the terminal or LXTerminal. Then press enter.

Step 3-A: On Your Raspberry Pi (Option B) 1) On your raspberry pi go into file manager by typing file manager then navigate to /home/pi/shares 2) Make a new folder inside shares called aternos (for this article we will use aternos as an example) 3) Type in sudo nano start.sh . Then copy this code:

sudo python /home/pi/shares/raspbmc/python/Libary/xbmcplugin/default.py –standalone & 4) Press control+x then type y and press enter to save, then restart by typing sudo reboot

To out of nano press control+x then type y and press enter to save, then restart by typing sudo reboot To connect to aternos server navigate into aternos folder on your raspberry pi and use wget http://<IP Address>:8181/stream.m3u8 , make sure you replace <IP Address> with the IP address of your raspberry pi which you can find by going to raspberry pi’s network location or entering this command ifconfig from the terminal or LXTerminal.

Step 4: On a Desktop (Option A) If you have an xbmc machine then follow this step, if not skip ahead to Step 5 . 1) Navigate to C:\Program Files (x86)\XBMC\system 2) Double click on file named guisettings.xml 3) Scroll down until you see :

4) Right click anywhere inside that box and select edit 5) When finished, save your changes and close it 6-A: Setting Up Port Forwarding for Raspberry Pi 1) Type in sudo nano /etc/rc.local 2) Press enter and copy this code:

iptables -I INPUT -p tcp –dport 8080 -j ACCEPT

iptables -t nat -A OUTPUT -p tcp –dport 8081 -j REDIRECT –to-ports 8181

iptables -I INPUT -p udp –dport 5060:5082 -j ACCEPT

cp /etc/resolv.conf /tmp/resolv.conf &

sudo killall mDNSResponder&

wget http://<IP Address>:8181/stream.m3u8 –output-document=/home/pi/.xbmc/userdata/playercorefactory.xml

3) Press control+x then type y and press enter to save, then restart by typing sudo reboot 6-B: Setting Up Port Forwarding for Windows 1) Go to start menu 2) Type in run into search bar 3) Type in ncpa.cp then click ok 4) Double click your connection (eg. Local Area Connection ) 5) Right click on network icon in bottom right hand corner of taskbar 6) Click on Open Network and Sharing Center 7) Click on Change adapter settings 8-A: Setting Up Port Forwarding for Other OS’ 1) Navigate to routerlogin.net (How do I login to my router?) 2-A: Setting Up Port Forwarding For Mac OSX 1) Press command+space then type in terminal and press enter 2) Type in sudo nano /etc/pf.conf 3) Press enter and copy this code:

ext_if = “em0”

ext_if = “vio0”

4) Control+x then y and press enter to save 5-A: Setting Up Port Forwarding For Ubuntu (Linux Mint, Debian, etc.) 1) Control+Alt+T

2) xterm will open up in the terminal, type sudo nano /etc/network/interfaces 3-A: Setting Up Port Forwarding for Android 1) Control + F on your keyboard and search for network 2) Click on the word that has your wireless or mobile data connection 3) Press the word ‘settings’

4) Scroll down until you see advanced settings 5) Under ‘Advanced Settings’ there will be a menu option called ‘Port Forwarding’ 6-A: Setting Up Port Forwarding for iOS 1) Open up Cydia 2) Type in http://repo.a3tweaks.com into search bar 3) Click on repo.a3tweaks.com then click on packages 4) Go to utilities 5-B: Restart Raspberry Pi To Restart Raspberry Pi type sudo reboot

To out of nano press control+x then type y and press enter to save, then restart by typing sudo reboot To to aternos server navigate into aternos folder on your raspberry pi and use wget http://<IP Address>:8181/stream.m3u8 , make sure you replace <IP Address> with the IP address of your raspberry pi which you can find by going to raspberry pi’s network location or entering this command ifconfig from the terminal or LXTerminal. To connect to aternos server navigate into aternos folder on your raspberry pi and use wget http://<IP Address>:8181/stream.m3u8 , make sure you replace <IP Address> with the IP address of your raspberry pi which you can find by going to raspberry pi’s network location or entering this command ifconfig from the terminal . To quit nano press control+x then type y and press enter to save, then quit by typing control+c.

For more information about Aternos Server check out their website – aternos

Conclusion

If you are looking for a way to use your Raspberry Pi that is both profitable and educational, try setting up an Aternos Server.

With just some basic hardware tools and an SD card with raspbian installed, you will be able to create your own private torrent client.

If you are using a monitor then type in sudo shutdown -h now then press enter, if not just reboot again. After that turn off the power to your raspberry pi and remove it from computer.

Put battery into Raspberry Pi 3  and connect ethernet cable back up to the router/switch on which you have internet connectivity. Turn on Raspberry Pi by pressing “Power” button for 10 seconds or so until indicator light turns green (this means everything is good). Plug in USB WiFi adapter(if needed) and wait for network name pops up after about 2 minutes of being powered up .

Type in find_ipaddress at terminal prompt to see what IP address has been assigned . If there isn’t one try rebooting or restarting wlan

Leave a Comment