Pi My Life Up

Raspberry Pi OwnCloud: Your Own Personal Cloud Storage


In this project we’re going to make a Raspberry Pi Owncloud server this can act as your very own personal cloud storage.

As the protection of your privacy becomes harder and harder you may be thinking of moving your files to a private cloud storage. If this is the case the then this tutorial is perfect for you. It is important to remember that since your data will be stored on your local network you will end up with using more bandwidth if uploading and downloading files from outside your network.

In this tutorial will take you through everything you need to know to get it setup and accessible.

If you’re curious and want to learn more about Owncloud be sure to check out their website over at Owncloud.org.

If you’re a visual person and would like to see our video on how to put this together then check out our video below. It will take you through everything you need to know get your Raspberry Pi Owncloud server up and running.

Equipment

I used the following equipment for this personal cloud storage setup.

Recommended:

Raspberry Pi

4 GB SD Card (8 GB+ Recommended) or Micro SD Card if you’re using a Raspberry Pi 2 or B+

Ethernet Cord or Wifi dongle

External Hard drive or USB Drive

Optional

Raspberry Pi Case

USB Keyboard

USB Mouse

Note: It is highly likely that the USB ports on the Raspberry Pi will be unable to power an external hard drive so you may need to invest in a powered USB hub.

Setting up The Raspberry Pi Owncloud Server

Firstly, you will need to have a Raspberry Pi with Raspbian installed. If you haven’t installed Raspbian then check out our guide on how to install Raspbian via NOOBS (New Out of the Box Software).

There are quite a few ways you’re able to install Owncloud onto your Raspberry Pi. In this particular tutorial we’re going to be downloading a web server (nginx) and Owncloud.

1. Firstly, in either The Pi’s command line or via SSH we will need to update the Raspberry Pi and its packages, do this by entering:

sudo apt-get update
sudo apt-get upgrade

2. Now we need to open up the Raspi Config Tool to change a few settings.

sudo raspi-config

3. In here we will need to change a few settings.

Change Locale to en_US.UTF8 in internationalization options -> change local.

Change memory split to 16m in Advanced options -> Memory split.

Change overclock to medium.

4. Add the www-data user to the www-data group.

sudo usermod -a -G www-data www-data

5. Now we need to install all the required packages.

sudo apt-get install nginx openssl ssl-cert php5-cli php5-sqlite php5-gd php5-common php5-cgi sqlite3 php-pear php-apc curl libapr1 libtool curl libcurl4-openssl-dev php-xml-parser php5 php5-dev php5-curl php5-gd php5-fpm memcached php5-memcache varnish

6. Now we need to create an SSL certificate you can do this by running the following command:

sudo openssl req $@ -new -x509 -days 730 -nodes -out /etc/nginx/cert.pem -keyout /etc/nginx/cert.key

Simply just enter the relevant data for each of the questions it asks you.

7. Now we need to chmod the two cert files we just generated.

sudo chmod 600 /etc/nginx/cert.pem
sudo chmod 600 /etc/nginx/cert.key

8. Let’s clear the server config file since we will be copying and pasting our own version in it.

sudo sh -c "echo '' > /etc/nginx/sites-available/default"

9. Now let’s configure the web server configuration so that it runs Owncloud correctly.

sudo nano /etc/nginx/sites-available/default

10. Now simply copy and paste the following code into the file. Replace my IP (192.168.1.116) at server_name (There is 2 of them) with your Raspberry Pi’s IP.

upstream php-handler {
    server 127.0.0.1:9000;
    #server unix:/var/run/php5-fpm.sock;
}
server {
    listen 80;
    server_name 192.168.1.116;
    return 301 https://$server_name$request_uri;  # enforce https
}

server {
    listen 443 ssl;
    server_name 192.168.1.116;
    ssl_certificate /etc/nginx/cert.pem;
    ssl_certificate_key /etc/nginx/cert.key;
    # Path to the root of your installation
    root /var/www/owncloud;
    client_max_body_size 1000M; # set max upload size
    fastcgi_buffers 64 4K;
    rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
    rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
    rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
    index index.php;
    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
        deny all;
    }
    location / {
        # The following 2 rules are only needed with webfinger
        rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
        rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
        rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
        rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
        try_files $uri $uri/ index.php;
    }
    location ~ \.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        fastcgi_pass php-handler;
   }
   # Optional: set long EXPIRES header on static assets
   location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
        expires 30d;
        # Optional: Don't log access to assets
        access_log off;
   }
}

11. Now simply save and exit.

12. Now that is done there is a few more configurations we will need to update, first open up the PHP config file by entering.

sudo nano /etc/php5/fpm/php.ini

13. In this file we want to find and update the following lines. (Ctrl + w allows you to search)

upload_max_filesize = 2000M

post_max_size = 2000M

14. Once done save and exit. Now we need to edit the conf file by entering the following:

sudo nano /etc/php5/fpm/pool.d/www.conf

15. Update the listen line to the following:

listen = 127.0.0.1:9000

16. Once done save and then exit. Now we also need to edit the dphys-swapfile. To do this open up the file by entering:

sudo nano /etc/dphys-swapfile

17. Now update the conf_swapsize line to the following:

CONF_SWAPSIZE = 512

18. Restart the Pi by entering:

sudo reboot

19. Once the Pi has restarted you will need to install Owncloud onto the Raspberry Pi. Do this by entering the following commands:

sudo mkdir -p /var/www/owncloud
sudo wget https://download.owncloud.org/community/owncloud-9.1.0.tar.bz2
sudo tar xvf owncloud-9.1.0.tar.bz2
sudo mv owncloud/ /var/www/
sudo chown -R www-data:www-data /var/www
rm -rf owncloud owncloud-9.1.0.tar.bz2

20. We also need to make some changes to .htaccess file and the .user.ini file over in the Owncloud folder. Enter the following command to change directory and open up the .htaccess file.

Note: Editing files inside the owncloud directory such as the edits below will throw warnings. These are only viewable if you’re an admin.

cd /var/www/owncloud
sudo nano .htaccess

21. In here set the following values to 2000M

php_value_upload_max_filesize 2000M

php_value_post_max_size 2000M

php_value_memory_limit 2000M

22. Save and exit, Open up the .user.ini file

sudo nano .user.ini

23. In here update the following values so they are 2000M:

upload_max_filesize=2000M

post_max_size=2000M

memory_limit=2000M

24. Now that is done we should be able to connect to Owncloud at your PI’s IP address.

Before you set up the admin account you might want to mount an external drive so you have lots of disk space for your Raspberry Pi Owncloud Server. Simply follow the instructions in the next section.

Mounting & Setting up a drive

Setting up an external drive whilst should be relatively straight forward but sometimes things don’t work as perfectly as they should.

These instructions are for mounting and allowing Owncloud to store files onto an external hard drive.

1. Firstly if you have a NTFS drive we will need to install a NTFS package by entering the following:

sudo apt-get install ntfs-3g

2. Now let’s make a directory we can mount to.

sudo mkdir /media/ownclouddrive

3. Now we need to get the gid, uid and the uuid as we will need to use them soon. Enter the following command for the gid:

id -g www-data

4. Now for the uid enter the following command:

id -u www-data

5. Also if we get the UUID of the hard drive the Pi will remember this drive even if you plug it into a different USB port.

ls -l /dev/disk/by-uuid

Copy the light blue letters and numbers of the last entry (Should have something like -> ../../sda1 at the end of it).

6. Now let’s add your drive into the fstab file so it is booted with the correct permissions.

sudo nano /etc/fstab

7. Now add the following line to the bottom of the file, updating uid, guid and the UUID with the values we got above. (The following should all be on a single line)

UUID=DC72-0315 /media/ownclouddrive auto nofail,uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0

8. Reboot the Raspberry Pi and the drives should automatically be mounted. If they are mounted we’re all good to go.
Note: If you get an error stating the Pi is in emergency mode at boot up then this likely means a problem with the fstab entry. Simply edit the fstab file (sudo nano /etc/fstab) and remove the added line or look for a mistake and fix it.

Basic First Setup

I will briefly go through the basics of setting up Owncloud Raspberry Pi here. If you want more information I highly recommend checkout out the manuals on their website, you can find them here.

1. In your browser enter your Pi’s IP address in my case it is 192.168.1.116.

2. Once you go to the IP you’re like to get a certificate error, simply add this to your exception list as it will be safe to proceed.

3. When you first open up ownCloud you should be presented with a simple setup screen and no errors.

4. Enter your desired username and password.

5. Click on storage & database and enter your external drive /media/ownclouddrive (Skip this step if you didn’t setup an external drive).

6. Click finish setup.

If you ever need to update and you find the internal updater is not working this likely means you will need to do it manually. You can find a detailed process on how to update over at owncloud’s update manual page.

Port Forwarding & External Access

If you want to have access to your cloud drive outside your local network, then you will need to setup port forwarding and make a few changes to our config files.

Firstly, we need to go back into the default file and change the server_name values (There is 2 of them). Update these to your external IP address. You can get your IP at what is my IP.

If you have a dynamic IP you may want to setup a dynamic DNS and use that as your address. You can find information on this in my guide to port forwarding.

Enter the following to bring up our default server file:

sudo nano /etc/nginx/sites-available/default

Once you have updated the IP’s in the server file you will need to add the external IP to your trusted IP list and make sure owncloud doesn’t overwrite it. To do this open up the Owncloud config file and enter:

sudo nano /var/www/owncloud/config/config.php

In here add a new item to the trusted domains array (This will be your external IP address). Your new entry should look something like this (x are just placeholders).

1 => 'xxx.xxx.xxx.xxx',

Finally update the URL of the overwrite.cli.url line to your IP Address. It should look something like this.

'overwrite.cli.url' => 'https://xxx.xxx.xxx.xxx',

Below is an example of the completed config.txt file.

Once done restart the nginx service by entering the following:

sudo service nginx restart

Be sure to check out my guide on port forwarding and use the following port 443 for internal and I recommended a random port for the external port. Make sure when setting up the external port that it isn’t already reserved by a certain program.

When connecting to the owncloud server externally you will need to make sure you use https otherwise you will get a invalid request in your browser.

Setting up port forwarding is super easy to do and allows you to have access to your personal cloud on the go. Also after you have done this you can still connect via your local IP as well.

I hope this tutorial has helped you make your very own Raspberry Pi OwnCloud. If you have any troubles, want to leave feedback or if I have missed anything feel free to drop us a comment below.

242 Comments

Franklin on September 2nd, 2015 at 1:45am
Thanks for a wonderful tutorial. Does anyone know how long a Hard Drive will last as a cloud server before breaking? Franklin
laperb on November 16th, 2016 at 1:29am
I use an external 1TB USB drive and configure the Pi to use spin down. Works great ! http://www.htpcguides.com/spin-down-and-manage-hard-drive-power-on-raspberry-pi/
Ana on September 2nd, 2015 at 4:30am
Hi, I followed your steps and when I try to access the owncloud app, I get this error: 504 Gateway Time-out nginx/1.2.1 I try to access it this way: https://192.168.0.100/owncloud Do you have an idea why this error occurs? Thanks, Ana
Gus on September 3rd, 2015 at 10:03pm
Hi Ana, Have you tried accessing using just https://192.168.0.100/ Let me know how you go!
Pascal d'Hermilly on September 3rd, 2015 at 12:59am
I feel that backup steps are missing. If you are going to put your data on this - you want to know that it's not going to disappear because the usb-stick was bad or whatever. Also - "mounting a drive" step 7 code for fstab looks like two lines - it should be in one line.
Matt Sawyers on June 4th, 2016 at 3:25am
I agree. @Gus, Could we get a tutorial on how to do this with Duplicati possibly? :D
Dave on September 3rd, 2015 at 3:53pm
Awesome tutorial, thanks. Everything was good up to the point where I create the admin account on the owncloud page in my browser. It comes up with an error saying "Can't create or write into the data directory /media/ownclouddrive". I included the correct uuid for my external drive in the fstab file, so I'm not sure where I'm going wrong. Any pointers?
Gus on September 3rd, 2015 at 10:10pm
Hi Dave, Sounds like something is wrong with the drive mount. Is the data you added to the fstab file all on the one line ? (The website forces it to be on two lines in the tutorial but should be kept on the same line. I have added a note for that step now.) Let me know how you go!
sam on September 9th, 2015 at 3:49am
I'm getting a 502 Bad Gatway when I try to access from a browser. Any ideas?
sam on September 9th, 2015 at 3:55am
Nevermind, my fat fingers missed a 1 in my ip. Thanks for the tut!
Travis on September 10th, 2015 at 3:15am
I'm not able to switch Database/ Storage as in step 5 to my external drive. WD My Book, 3tb. When rebooting the Pi I get a line 4 in fstab is bad. And somewhere in there it says the UUID is invalid. Triple checked everything to make sure it was in correct. Anyone have any ideas?
Halvar on September 10th, 2015 at 6:36am
Hi¡ Another one, I’m getting a 502 Bad Gatway when I try to access from a browser. Any ideas?
Halvar on September 10th, 2015 at 7:08am
Now Works¡ I edit: /etc/nginx/sites-available/default upstream php-handler { #server 127.0.0.1:9000; server unix:/var/run/php5-fpm.sock; }
ZN on September 14th, 2015 at 5:14am
Did anyone try to connect outside of the local network? Following the steps about the port forwarding (http://pimylifeup.com/raspberry-pi-port-forwarding/), I am getting server_time_out... Any suggestions ?
Gus on September 29th, 2015 at 8:08pm
Hi Zn, I have made some corrections to the port forwarding part within this Pi Owncloud tutorial. If you follow these new instructions it should now work correctly.
Gary S on February 12th, 2016 at 2:04am
I've tried this and I get a web page appear. However, it sticks with the dialog about being on a untrusted domain. I did follow the instructions in the section "Port Forwarding & External Access". I've checked the config files, and they do appear correct. Anyone got any ideas?
Dave on September 18th, 2015 at 5:12am
At 4. Add the www-data user to the www-data group. I get the following: pi@RaspberryPi ~ $ usermod –a –G www-data www-data Usage: usermod [options] LOGIN what am I doing wrong?
Gus on September 18th, 2015 at 10:11am
Hi Dave, There was a slight error to do with the - before the letters. It should now be corrected. sudo usermod -a -G www-data www-data
Bell on September 20th, 2015 at 2:30am
I'm having issues with ownership of the data on my external hard drive. It says I don't have permission to upload or create files here.
Gus on September 29th, 2015 at 8:04pm
Hi Bell, It sounds like that the external hard drive hasn't been mounted properly thus the Raspberry Pi owncloud can't use it. I would recommended checking back through the steps in the mounting & setting up a drive section. A common mistake is placing the fstab line on two lines. (step 7)
Jeremy on September 23rd, 2015 at 3:34am
I have the same issue. I followed everything and I can only access through the local network. It appears that the port forwarding is working as it replaces my hostname:external_port with the IP address of the PI. Please help.
Gus on September 29th, 2015 at 8:06pm
Hi Jeremy, I have updated the port forwarding section of the owncloud tutorial with new instructions that should fix this problem.
Emi on September 26th, 2015 at 5:48am
Hi there, I´ve a little problem: To install ownCloud I followed all steps and ownCloud is working now fine, but only on my local home network. I´ve installed like it´s shown in another Tutorial by Pimylifeup an Dynamic-DNS Client on the raspberry pi. Every time I try to access my pi from school I get connected to the local IP-Adress of my pi at home. I type my address in Safari (the address is *********.zapto.org and I get connected with 192.168.2.119) and Safari can´t load the page because it is searching an server on my school´s network with the IP 192.168.2.119. So what can (or should) I do? I would be really happy if you could help me Thanks in advance, Emi
Gus on September 29th, 2015 at 8:00pm
Hi Emi, I have located the issue and added a solution to the tutorial above under the external & port forwarding section. Please let me know how you go
Emi on October 4th, 2015 at 7:57pm
Thank you very much, It works totally fine!
Tupolev on April 9th, 2017 at 1:35am
Hey, Exact same problem with mine!
Simon on September 27th, 2015 at 12:52am
I can´t connect to the server outside of my local network. I have portforwarded and the port is open. When I connect to the server via the ip, not the local ip for the pi, it connects and then changes the url to the local ip of the pi. Because the pi is not on the local network it doesnt work.
Gus on September 29th, 2015 at 8:05pm
Hi Simon, I have looked into this and have updated the port forwarding section with how to get it working externally.
Chris on September 29th, 2015 at 9:57am
At the initial own cloud set up page right after mounting drive, I get a message when i try to put in the storage path that "Can't create or write into the data directory /media/ownclouddrive" please advise
Gus on September 29th, 2015 at 6:20pm
Hi Chris, It sounds like the drive probably hasn't been mounted correctly. I would run back through the steps in the mounting & setting up a drive section. The most common mistake is putting the fstab line on two lines. (Step 7)
benny on October 1st, 2015 at 8:31am
Hi, i've an issue, instead of having my owncloud page when i write the rasp pi ip adress i have the page of Apache 2 saying "it works" Maybe i made a wrong typing somewhere, can you help please Thanks:)
Gus on October 1st, 2015 at 9:25pm
Hi Benny, Sounds like owncloud hasn't successfully been copied into the www folder. I would suggest running back through step 19. You can also check to see what is in the www folder by running ls /var/www/owncloud
Erdem on October 11th, 2015 at 10:10pm
I have got a some error trusted ips. When ı want to reach my externel ip with using no.-ip it says you need to add trusted ips. But it already have added. When click the button its dupliceted my ip adress
William on December 20th, 2015 at 9:09pm
Hey Erdem, I had the same problem. I fixed with the following code. sudo nano /etc/network/if-up.d/secure-rmc Add these lines: iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT iptables -A INPUT -p tcp --dport [replace with your random external port] -j ACCEPT iptables -A INPUT -i $IFACE -j DROP Save and exit sudo reboot Hope it helps!
Matt on October 14th, 2015 at 4:49am
Hi, Great project, thanks for the instructions! When I log in to my owncloud account, it tells me there is an update 8.1.3 available. On the controlpanel there is an update function, but it can not update its version this way. Is it possible to do this from the command line and how? (without messing up my owncloudserver)
tom on October 19th, 2015 at 1:00am
When T go to my pi's IP address for owncloud i get the error: Data directory (/media/usb/ocdata/) is readable by other users Please change the permissions to 0770 so that the directory cannot be listed by other users. How do I change the permissions to 0770
Richard on October 31st, 2015 at 12:59pm
Thanks for the detailed instructions. I had to refer back and forth from the written and the video instructions, which helped quite a bit. When I followed the written instructions only, I wasn't sure if I was making the software change to the pi or to the ownCloud (cd /var/www/owncloud). I did confirm with the video. This ownCloud is doing everything I was looking for, automatic upload from my phone camera, using the ownCloud app (99 cents, well worth it!). So by adding the ownCloud app, I did NOT have to do the Port Forwarding & External Access section (which made me nervous).
ziv on November 1st, 2015 at 12:39am
Great tutorial. Finally it worked after several attempts in other sites. The OwnCloud server works great on my network. Only one small problem that maybe you can help me figure out. My raspberry Pi is under second router. that mean i have the ISP router with 192.168.1.1 and it connected to another router that gets from him the internal IP of 192.168.2.1. The Pi is connected to the second router and gets 192.168.2.9. How can i port forward it? Thanks Ziv
Eman on July 4th, 2016 at 4:01am
To do this you need to forward the ports from your first router to your second router or use DMZ Mode if your router supports it to your second router. Then login to the administrator page on your second router and forward the ports to your Pi.
Carlo on November 3rd, 2015 at 12:26am
Great tutorial, thanks. It works perfectly in my local network but when I try to connect to the server via the ip I get the message (I've checked in the owncolud.log) "...dont have permission to update and create...". Could I have some help?
Davis on November 8th, 2015 at 2:05pm
I'm having an issue upon rebooting after mounting the drive. On boot I get the message: "Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "Sytemctl default" to try again to boot into default mode. sulogin: root account is locked, starting shell root@raspberrypi:" So far I haven't found a way to log in and get passed this.
Randy on November 29th, 2015 at 11:29pm
Hi I had the same issue you're probably using a Raspberry Pi 2 in that case you should mount you external hard disk with the following line: /dev/disk/by-uuid/d4384382-fe1c-4726-b536-a8c62435db94 /media/ownclouddrive ext4 auto uid=33,gid=33,umask=0027,dmask=0027, noatime 0 0 ****use your own uuid of course.
William on December 20th, 2015 at 9:15pm
I had the same issue. My mistake was a typo. I would recommend you to double check the line of UUID. My mistake: ("ID" instead of "UUID") ID=7EF46D3BF46CF6B5 /media/owncloud auto uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0 Correction: UUID=7EF46D3BF46CF6B5 /media/owncloud auto uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0 Hope it helps!
sal on November 17th, 2015 at 8:54pm
i have an error at the package installation stage where it fails to fetch some archives. It recommends then to run apt-get update but that doesn't do anything. E: Failed to fetch http://mirrordirector.raspian.org... 404 not found[IP: x.xx.] is the server for these files no longer up? other packages were installed successfully
Drew on November 20th, 2015 at 1:21pm
Having same problem. Still looking for a workaround.
Ivan on November 20th, 2015 at 7:36pm
when i try to do the create account with opencloud at beginning and i choose /media/ownclouddrive i get the following error Can't create or write into the data directory /media/owncloud drive
Terrance on December 5th, 2015 at 4:15pm
Great tutorial I am having trouble adding the external usb drive. I added it as instructed and verified it was in the specified location using ls -l /media/ownclouddrive, however when I attempt to add it on my owncloud page under the personal info tab the drop down button is unresponsive and attempting to just type in the name is not helping. Any suggestions
david woodruff on December 6th, 2015 at 4:19pm
I did this in the terminal and it worked: chown -R www-data:www-data /media/ownclouddrive
indra on December 6th, 2015 at 2:04am
hi,, i have a question.. this project can to access everywhere?
david woodruff on December 7th, 2015 at 3:53am
How do I know it is using my external HDD for storage? When I log in or use my local OwnCloud app it says I am using X.X MB out of 8.4 GB. My external drive is 1 TB.
William on December 20th, 2015 at 9:37pm
Hi David, Please visit your owncloud then check settings -> users, and change the Quota to "Unlimited" Also make sure you selected correct path to your mounted external hard drive (/media/ownclouddrive) while you are setting up admin account. Or you can change it in config.php: sudo nano /var/www/owncloud/config/config.php Change to your preferred hard drive path: 'datadirectory' => '/media/ownclouddrive', Hope it helps! William
Nathanael on December 13th, 2015 at 8:28am
When trying to restart nginx in the last step I get: Job for nginx.service failed. See 'systemctl status nginx.service; and 'journalctl -xn' for details. Since I got to that step and that error, I can no longer access OwnCloud either internally or externally.
Mark on December 18th, 2015 at 5:43pm
Thank you for this great guide! Now, I was able to access and upload files from an external network. Before started following this guide, I got OSMC with Transmission and Samba got working. I can access my external hard drive through local network. After following this guide, OSMC is still working but I can no longer access my external hard drive. Is there something I can modify to allow me to access my external hard drive or at least let OSMC detect it so that I can add my videos, pictures, and movies to OSMC's library? Thanks!
kenneth dyson on December 19th, 2015 at 1:59am
Hi, thanks for this tutorial. i was able to get this working in my lab which has a static ip, great news! however my home isp has dynamic dns. i got a hostname with no-ip, and set up port forwarding but i can't seem to be able to get it to work, either from within or outside the home. a few questions for clarification (a noob at networking): 1. For server name - do i enter the https? the www? or just the hostname without the prefixes? 2. For the port forwarding, you mention to use 443 as internal and a random for external. is that for one entry? do i set up the service port as the random and internal as 443? 3. I was under the understanding that web servers used port 80. my isp blocks port 80, so i had my no-ip host redirect to 8080. so does the port forwarding go like this,in one entry: service/external=8080 internal=443 ip address=my pi's address taken from ifconfig protocol=all Thanks
William on December 20th, 2015 at 9:30pm
Hi Ken, I assume all your questions relating to port forwarding. So here is my answers: 1. server name is your External IP address (simply replace the local IP you set up earlier with the external IP address) There are 2 of them in the file. 2. My set up was: Internal port: 443 External Port: xxxxx (a random number of 5 digits) Depending on your router or gateway, it will have different input but will be similar result. Mine asked starting port and ending port for both internal and external. So I filled both starting port and ending port of internal is 443, and the others are xxxxx. 3. I would recommend you to use any random port number instead of 8080 to prevent overlapping. Hope it helps! William