Accessing Raspberry Pi services via the Internet


For this article, I'm assuming you already have a home network set up. If you have the Raspbian or minimal Raspbian (Minibian) [8] distribution installed on your Rasp Pi, you should look for the necessary weavedconnectd package in the repositories and install it from there (Listing 1, line 2).

Listing 1


01 ### Installation under Raspbian/Minibian
02 $ sudo apt-get update && sudo apt-get install weavedconnectd
03 ### Manual Installation
04 $ wget deb/1.3-02/weavedconnectd-1.3-02.deb
05 $ sudo dpkg -i weavedconnectd-1.3-02.deb
06 $ sudo weavedinstaller

If you're using an Ubuntu-based ARM distribution, such as Ubuntu Mate or Snappy Ubuntu Core, you should first download the package from GitHub and install it via the command line (lines 4 and 5). The next step is to call the Weaved installer (line 6). During the setup process, it asks for your login data and for the Rasp Pi services, which should be accessible from outside the network.

The setup also asks for a name for the service. You should carefully select and remember the name: It will be used later for calling the services. In this example, I selected the name NAS-Pi to avoid any confusion among the multiple Rasp Pis that were put to use. Then, I activated SSH, which does not necessarily have to be attached to the default port 22 (Figure 2).

Figure 2: In the Protocol Selection Menu, you specify which service you want to use.


At the end of this procedure, the name of your device will appear when you call the URL from the web browser. You can now activate the device via a mouse click (Figure 3).

Figure 3: Activate the connection to the attached computer via the Weaved web front end.

The Weaved web interface then displays a value pair and a command for the command line (Figure 4). You should add both values to an SSH application (e.g., PuTTY). Use the following command-line example in the console:

ssh -l <Login> proxy<No> -p <Port>
Figure 4: After the connection is generated, the Weaved service displays the information necessary to connect.

Here, you should also substitute your Raspberry Pi username for <Login>. The number appearing after proxy and the port number will vary with each login. After entering the password, you can use the Rasp Pi from outside the network just as you would operating inside the network.

In addition to SSH (port 22), HTTP (port 80), and VNC (port 5901), services can be defined on randomly chosen ports. The SSH service established earlier already allows FileZilla and WinSCP to move files.

For example, in FileZilla, this is done by entering the proxy acquired for SSH (proxy<No> in the server field. You should specify SFTP as the protocol, in which case, the entire URL reads s In this example, you would specify the port 32340. WinSCP follows a similar procedure.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Welcome

    It is rumored that Thomas Edison tested thousands of filaments for an incandescent lamp before he produced the first commercially viable electric light bulb, and I imagine his is not a unique experience. Building mock-ups and working models exposes the weaknesses and strengths of a design, which prepares you to make a better version, then a better version, until you have found the right combination of materials, components, configuration, and cost.

  • Android Pi

    Your Android device can be a versatile companion for Raspberry Pi. We describe some useful apps to help you make this happen.

  • Installing FHEM on the Raspberry Pi

    The FHEM home automation software is not yet part of the Raspbian package sources. We show you how to install it manually on a fresh Raspbian system.

  • Testing a Pi UPS module

    When the Raspberry Pi is connected to a car ignition or the USB port on a TV, you run the risk of data loss with a hard shutdown. The Pi UPS bridges short lapses in the power supply and shuts down your Rasp Pi safely when the power remains off.

  • Converting the Raspberry Pi to a wireless print server

    Use a small and unobtrusive Raspberry Pi to convert your legacy USB printer to a new wireless network printer system.