Raspberry Pi Running Nextcloud Behind FritzBox DSL Tunnel with Vodafone: Local Server Accessible but Not Through the Internet
In this article, we will discuss how to set up a Raspberry Pi running Nextcloud behind a FritzBox DSL tunnel with Vodafone. We will cover the key concepts and provide detailed instructions to ensure that the local server is accessible both on the local network and through the internet.
Prerequisites
- A Raspberry Pi with Raspberry Pi OS installed
- A FritzBox router with DSL connection and Vodafone as the ISP
- Nextcloud installed on the Raspberry Pi
Setting Up the FritzBox DSL Tunnel
To set up the FritzBox DSL tunnel, follow these steps:
- Log in to your FritzBox router
- Go to the "Internet" tab and select "Account Information"
- Select "Vodafone" as the ISP and enter your Vodafone credentials
- Go to the "Internet" tab and select "IPv6"
- Enable "IPv6" and select "6rd Tunnel" as the connection type
- Enter the 6rd prefix and prefix length provided by Vodafone
Setting Up Nextcloud on the Raspberry Pi
To set up Nextcloud on the Raspberry Pi, follow these steps:
- Log in to your Raspberry Pi
- Install Apache2, PHP, and MySQL by running the following command:
sudo apt-get install apache2 php libapache2-mod-php mysql-server- Download and extract Nextcloud by running the following commands:
cd /var/www/html
sudo wget https://download.nextcloud.com/server/releases/nextcloud-20.0.4.zip
sudo unzip nextcloud-20.0.4.zip
- Create a MySQL database and user for Nextcloud by running the following commands:
sudo mysql -u root -p
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
- Configure Nextcloud by accessing http://localhost/nextcloud in your web browser and following the instructions.
Accessing Nextcloud Through the Internet
To access Nextcloud through the internet, you need to set up port forwarding on your FritzBox router.
- Log in to your FritzBox router
- Go to the "Internet" tab and select "Permit Access"
- Select "Port Forwarding" and click "New Port Forwarding"
- Enter the following information:
- Name: Nextcloud
- Protocol: Both
- External Port: 80
- Internal Port: 80
- IP Address: The IP address of your Raspberry Pi
- Click "OK" to save the settings
In this article, we have discussed how to set up a Raspberry Pi running Nextcloud behind a FritzBox DSL tunnel with Vodafone. We have covered the key concepts and provided detailed instructions to ensure that the local server is accessible both on the local network and through the internet. By following the steps outlined in this article, you should be able to access your Nextcloud installation from anywhere in the world.