Full Nextcloud Docker Container for Raspberry Pi 4 & 5 with Collabora Online server (Nextcloud Office) behind Nginx Reverse Proxy Manager + GoAccess Charts. Supported with Redis Cache + Cron Jobs.
Full Nextcloud Docker Container for Raspberry Pi 4 & 5 with Collabora Online server (Nextcloud Office) behind Nginx Reverse Proxy Manager + GoAccess Charts. Supported with Redis Cache + Cron Jobs.
Nextcloud image errors fixed and addon supported
git clone https://github.com/iamjavadali/nextcloudpi.git
cd nextcloudpi/nextcloud
Edit the following files if you would like to make changes to php settings and database details
Build & run the nextcloudpi container
sudo docker compose build
sudo docker compose up -d
Enter docker-compose directory
cd nextcloudpi/nginx-proxy-manager
Build Dockerfile
sudo docker compose build
Build + Run docker compose
sudo docker compose up -d
Port Info:
nginx admin port: 81
goaccess stats port: 7880
mariadb port: 3306
After the Nginx Proxy Manager is running for the first time, the following will happen:
GPG keys will be generated and saved in the data folder
The database will initialize with table structures
A default admin user will be created
This process can take a couple of minutes depending on your machine.
Default Administrator User
Email: [email protected]
Password: changeme
Immediately after logging in with this default user you will be asked to modify your details and change your password.
Nginx official documentation setup
https://nginxproxymanager.com/setup/#using-mysql-mariadb-database
In Nginx reverse Proxy manager, add your nextcloudpi proxy
scheme = http
ip = ip of host
port = port number of nextcloud docker container
websocket support = on
block common exports = on
ssl = on
force ssl = on
HTTP/s support = on
HSTS enabled = on
HSTS subdomains = on
You can use the Free LetsEncrypt SSL or upload your own to add a secure connection
Add this to your Nginx reverse proxy settings in advanced - custom Nginx configuration.
This below fixes one of the error you receive in the "Overview" tab in your "Administration settings" for .well-known/carddav and .well-known/caldav
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
- enter username
- create password
The commands below must be run in the docker host machine where the nextcloud container is installed or by accessing the config.php file from inside your nextcloud container.
Become the root user on your host machine
sudo -i
Navigate to the docker nextcloud volume into the config directory
cd /var/lib/docker/volumes/nextcloudpi_nextcloud/_data/config
use a text editor to edit the config.php file
nano config.php
Add the following code at the bottom of the file before the closing statement );
This code fixes the phone code error; make sure to change to your region code
'default_phone_region' => 'US',
This code fixes the insecure url error
'overwriteprotocol' => 'https',
This code adds maintenance window time and fixes error
'maintenance_window_start' => 1,
This whole array will allow your nextcloud to generate preview thumbnails of videos and other formats
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\Movie',
1 => 'OC\\Preview\\PNG',
2 => 'OC\\Preview\\JPEG',
3 => 'OC\\Preview\\GIF',
4 => 'OC\\Preview\\BMP',
5 => 'OC\\Preview\\XBitmap',
6 => 'OC\\Preview\\MP3',
7 => 'OC\\Preview\\MP4',
8 => 'OC\\Preview\\TXT',
9 => 'OC\\Preview\\MarkDown',
10 => 'OC\\Preview\\PDF',
),
cd nextcloudpi/collabora
Edit the collabora-code.sh file
nano collabora-code.sh
Edit the following variables
Set this to the IP+Port pointing to the collabora/code server
domain=###.###.###.###:PORT
Set this to the domain pointed to your collabora/code server
server_name=your-domain.com
Change this username for the admin panel
user=admin
Change this password for the admin panel
pass=password
Change this for your local time zone
tz=America/New_York
Save and make the bash script file is executable
chmod +x collabora-code.sh
Run the script
./collabora-code.sh
In Nginx reverse Proxy manager, add your Colabora Online proxy
scheme = https
ip = ip of host
port = port number of collabora docker container
websocket support = on
block common exports = off
ssl = on
force ssl = on
HTTP/s support = on
HSTS enabled = on
HSTS subdomains = on
YOU SHOULD NOW HAVE A FULLY FUNTIONAL NEXTCLOUD RUNNING ON YOUR RASPBERRY PI 4 OR 5 WITH NO ERRORS AND DOCUMENT EDITING SUPPORT BEHIND A REVERSE PROXY AND FULLY SECURED.
If you found this how-to helpful, please share with others and provide me with any feedback with any issues.