Today we're going to review how to install NextCloud on a Raspberry Pi on a Docker container with the help of Portainer. Similar to Google Drive, Nextcloud is way to host your personal files, pictures, documents but without having to pay a monthly fee!
Nextcloud is open source, with several add on application for office suits, media management, email access, and many more!
Timestamps:
0:00 Introduction
0:23 Next vs Open Media Vault
0:56 The RPI Case and NVME drive I'm using
1:25 Using RPI Connect and plan of action
1:49 Updating RPI OS and installing Docker
3:30 Testing Docker install
4:30 Installing protainer
7:11 Launching and configuring portainer
9:31 Reviewing App Templates and issues with V2 templates
11:00 Adding App template with NextCloud and configuring Container
12:56 Lauching Nextcloud's admin and the server configuration page
14:45 Launching Nextcloud UR and conducting brief walkthrough
16:19 Conclusion
Installation Steps:
Docker:
1) ‘curl -sSL https://get.docker.com | sh’
2) ‘sudo usermod -aG docker $USER’
3) *reboot the pi - ‘sudo reboot’
4) Check your docker installation : Type in ‘groups’ and hit enter to make sure the user was added to ‘docker’ group.
5) Check docker install is working and active: ’docker run hello-world’
Portainer:
1) ‘docker pull portainer/portainer-ce:latest’
2) ‘docker volume create portainer_data’
3) ‘docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest’
*This line will open port ‘9443’ for use with portainer, and the restart will be sure that docker will restart each time you start the pi and the last bit tells is we’re using the portainer image we just pulled.
4) Check Raspberry pi address: ‘ifconfig’
5) Open a browser and navigate to (https://your ip address:9443).
NextCloud:
1) Set up your portainer admin user name and password, make sure to write them down!
2) When logged in, click ‘settings’ in the lower left hand side.
3) Paste this url into the app template url box over the default app template url. (https://raw.githubusercontent.com/TomChantler/portainer-templates/refs/heads/v3/templates_v3.json)
4) Click 'Save'
5) Don’t worry, the default app template url is still listed on the page about the URL box!
6) Click on ‘Templates’ on the left hand side and type ‘Next’ in the search area.
7) Click Nextcloud, which will add its container. Next click on ‘TZ’ and enter your timezone. Enter your time zone format is ‘Country/City’ i.e ‘England/London.
8) Select a password for the database and one for the Sql/Mariadb, write them down!
9) The database user is ‘nextcloud' and the database is ‘nextcloud_db’.
10) Select a port number other than 9443, and type it under ‘port’. Consider port 5443?
8) Next click ‘Deploy this stack’.
9) Open another browser window, and navigate to (https://your ip address:5443[or the port you entered setting up Nextcloud]).
Next Cloud admin account and configuring the server:
1) Select an admin user name and password, write them down!
2) Make sure to select ‘MySql/MariaDB’ for your database (Not Sqllite).
3) Database Account : ’nextcloud’
4) Password: Type the password you setup in portainer
5) For Database name enter: ‘nextcloud_db’
6) For Database host enter: ‘next cloud_db:3306’
7) Click ‘install’.
*After ‘install’, you should be greeted by the NextCloud ‘Welcome’ screen!
Websites:
Docker : https://hub.docker.com/
Portainer: https://www.portainer.io/
installing Docker and Portainer on Raspberry pi OS: https://pimylifeup.com
Raspberry Pi Connect (remote desktop) foundation website: https://www.raspberrypi.com/software/
*instructions for installation on the Pi: https://www.raspberrypi.com/documentation/services/connect.htmlconnect
Argon One v3 M.2 NVME: https://a.co/d/1HIikqY
Crucial NVME 1TB: https://a.co/d/azN1cQP
Raspberry Pi 5: https://a.co/d/8Yn4pTI
Raspberry Pi imager: https://www.raspberrypi.com/software/
My video on Installing OMV on Raspberry Pi : https://youtu.be/xYqkfYmJJ6w?si=HUQJnRDDIGS4BLFp
Article on App Templates and portainer:
App Templates regression since portainer version 2.22: https://github.com/portainer/portainer/issues/12337
Here is the temp fix app templates from Tom Chantler: https://raw.githubusercontent.com/TomChantler/portainer-templates/refs/heads/v3/templates_v3.json.
Find me online:
My website: https://www.mackeytech.org
Bluesky: @mackeytech.bsky.social
My Merchandise: https://MackeyTech.myspreadshop.com/
#docker #nextcloud #raspberrypi #portainer
#cloud