Raspberry Pi Self Hosted Server Based on Docker / Portainer.io

Overview

Pi-Hosted Portainer Template V2

Discord Youtube Twitter URL hacktoberfest

This repository is a collection of tutorials for hosting a variety of server applications using Docker and Portainer.

App Template for Portainer

alt text

Installation

Run install-docker.sh, to install docker, and add the current user to the docker usergroup.

wget -qO- https://git.io/JwUkc | bash
# need to reboot/logout for changes to take effect

Pi OS Buster

On Oct 30, 2021 Pi OS bullseye was released and this is no longer needed. Older Pi OS buster releases run an old version of libseccomp that is causing problems with many containers that are preventing them from running. To fix this we need to manually install a newer version of libseccomp. However we first need to check and see if you are running an older version. To check please run sudo dpkg-query -W libseccomp.

sudo dpkg-query -W libseccomp2

If you are running a version less that 2.5 you will need to run the *upgrade script.

wget -qO- https://git.io/JPXdj | bash
  • The upgrade script is for Pi OS 32bit. Pi OS 64 beta is untested and the upgrade script wont work with it.

Reboot for changes to take effect

sudo reboot

After a reboot, run install-portainer.sh, to install Portainer.io

wget -qO- https://git.io/JwUnf | bash
# to update portainer, run this command
wget -qO- https://git.io/JwUlY | bash

Click Settings, in the bottom-left corner, and paste the Portainer v2 json file link from below into the "App Templates" box.

You're done! Now just click App Templates and deploy applications!

Versions

Application Supported OS's URL
Portainer v2 Arm32 Pi OS https://raw.githubusercontent.com/novaspirit/pi-hosted/master/template/portainer-v2-arm32.json
Portainer v2 Arm64 Ubunutu 64, DietPI 64 https://raw.githubusercontent.com/novaspirit/pi-hosted/master/template/portainer-v2-arm64.json
  • Limited testing Operating Systems: Pi OS 64 Beta, DietPI 32 bit

Pi-Hosted YouTube series

Pi-Hosted Playlist

Episode
1 Raspberry Pi 4 Server Setup, Docker Install, Portainer Install, Shell In A Box
2 Installing and Configuring Homer Dashboard
3 Manually Installing Guacamole on Portainer
4 Installing JDownloader and File Browser On The Pi Docker Server
5 Torrent with Docker and OPENVPN with Transmission and PIA
Portainer.io App Template for Raspberry Pi arm/arm64 I Need Your Help!
6 Upgrading Portainer and Updating Containers
7 Raspberry Pi Docker Monitoring
8 Installing Nextcloud on Raspberry Pi Docker
9 Installing Nginx Proxy Manager on Docker
10 Setting up Raspberry Pi Samba Server For File Sharing on Docker
11 How to Install Whoogle to replace using Google and repo notes

=======

Addition Documentation can be found in the Docs Folder

Don't forgot to checkout the Additional Documentation
https://github.com/novaspirit/pi-hosted/tree/master/docs

Contributors

See the list of contributors who participated in this project.

Acknowledgment

  • based template on SelfHosted Portainer App Template
Comments
  • How to properly mount storage? [NextCloudPi]

    How to properly mount storage? [NextCloudPi]

    Hi Don,

    I followed you youtube series on the pi-hosted topic, now I stand before a big set back.

    Did you manage to setup the nextcloud external storage inside docker?

    I've successfully mounted two ntfs HDDs to my pi 4 8g. They're working just fine on the pi itself. Then I tried to attach these to my NextCloudPi instance, which seems to not be working properly.

    I added the Volume as a bind inside Portainer, and I set up the external storage inside my nc settings panel. When I now open the "folder" it is displayed as empty, although there are directories in it.

    Is this a permission issue on the pi? (I do not think so, as it doesn't work even if I set chmod to 777 for all the directories inside)

    How did you accomplish this, if you've even tried to do so?

    stale 
    opened by ghost 25
  • Getting mounting issue in raspberry pi monitoring

    Getting mounting issue in raspberry pi monitoring

    Hi, I am getting the following error

    
    Failure
    OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/portainer/Files/AppData/Config/grafana/grafana.ini" to rootfs at "/etc/grafana/grafana.ini" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
    
    

    All the containers have been spawned from stack, only monitoring-grafana is throwing this error. Please help :(

    opened by shubhank-saxena 10
  • [QUESTION] Nginx Proxy Manager - Bad Gateway

    [QUESTION] Nginx Proxy Manager - Bad Gateway

    Question Bad Gateway on login screen after setting up Nginx Proxy Manager using template. What can I do ?

    Context I was following everything that was mentioned in video and after deploying container I am unable to log in (getting bad gateway error). When I looked up in portainer log for NPM it showed this: image

    How can I fix it ?

    opened by FilipLac 9
  • [QUESTION] Problem w/  Raspberry Pi Docker Monitor after rebooting

    [QUESTION] Problem w/ Raspberry Pi Docker Monitor after rebooting

    Question I successfully installed RPI Docker Monitor using Install Doc. It was working just fine until I needed to do a reboot. Now I can't connect to the webserver URL:3000

    RPI-Docker-Monitor

    Context Any additional context around the question such a link to a project where it's being implemented

    What have I missed?

    opened by Bluesguy1984 8
  • Proposale to optimize cadvisory cpu usage

    Proposale to optimize cadvisory cpu usage

    A WIP of arguments to add to make the container cadvisory use way less cpu.

    I've been experimenting with arguments on cadvisory as it was using the most cpu by alot compared to my other containers. Used sources: https://github.com/google/cadvisor/blob/master/docs/runtime_options.md https://github.com/google/cadvisor/issues/2523 the arguments are taken from the help page of cadvisory when ran in a terminal. And tweaked based on this dashboard: https://grafana.com/grafana/dashboards/15120

    I've added 2 arguments which do the following:

    '--docker_only=true' Quoting the help: "Only report docker containers in addition to root stats". As i believe cadvisory is used mostly for containers, enabeling this disabled already a few metrics which lowered cpu usage alot.

    '--housekeeping_interval=29s' See: https://github.com/google/cadvisor/blob/master/docs/runtime_options.md#housekeeping-intervals Per-container housekeeping is run once on each container cAdvisor tracks. This typically gets container stats. B/c the smallest size of updates is every half a minute, i would suggest doing a 29 second interval. I might be wrong, but i would say this checks the stats of the container, and based on that reports to grafana. So the higher the number the less accurate the stats, but the higher the more cpu usage it costs?

    Why This Is Needed

    This could save alot of cpu cycles for new users and also show outliers easier in grafana.

    What Changed

    Added 2 arguments (CMD) to the compose file for the rpi-monitor stack.

    Notes

    This PR is still in wip as i do want to double check this with someone else. Currently my own dashboard that i mixed from multiple dashboards is running fine, but the rpi-monitor doesn't weirdly enough. Even withoud any CMD args it still shows dots instead of a continous line on some graphs like the r/w for containers.

    This is what i tested with the arguments: Given a rpi 4b the usage of the container cadvisory was 11-12%. This got reduced to 4-7% with using docker-only. And by adding the housekeeping_interval to 30 seconds. This reduced it to as low as 1.19-3.45%.

    opened by Macleykun 8
  • ./update_portainer.sh: 3: function: not found

    ./update_portainer.sh: 3: function: not found

    Congrats great work!!!I have an issue with updgrade portainer. I run command "sh ./update_portainer.sh" from your gitHub novaspirit/pi-hole and i get an error: "./update_portainer.sh: 3: function: not found"

    opened by jiimint 7
  • [REQUEST] Graylog

    [REQUEST] Graylog

    Description: Graylog is a centralized logging solution that allows the user to aggregate and search through logs.

    https://hub.docker.com/r/graylog/graylog

    Only ARM64 supported.

    https://docs.graylog.org/docs/docker: docker-compose example using Docker volumes.

    opened by lars-c 7
  • [QUESTION] Raspberry Pi Dockers Monitor error

    [QUESTION] Raspberry Pi Dockers Monitor error

    Question I got an error in Grafana Raspberry Pi Dockers Monitor with charts "CPU Busy" and "Disk IO"

    Context I just install the stack RaspberryPi-Docker-Monitor in a RPi 4 with: pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

    After follow all steps documented on https://github.com/pi-hosted/pi-hosted/blob/master/docs/rpi_docker_monitor.md in Grafana dashboard a got an error in "CPU Busy" and "Disk IO" charts:

    bad_data: 1:38: parse error: not a valid duration string: "2.147483647s"

    image

    Is it possible to correct it?

    opened by ramsrq 7
  • update install, Update scripts

    update install, Update scripts

    Summary

    i install a fresh pi and can not use the pi-hosted scripts i check for issues #385 make the changes and tested for my is everting working fine now. thx to @jiimint he create issues #385

    Why This Is Needed

    What Changed

    Added

    #!/bin/sh

    error() { echo -e "\e[91m$1\e[39m" exit 1 }

    check_internet() { printf "Checking if you are online..." wget -q --spider http://github.com if [ $? -eq 0 ]; then echo "Online. Continuing." else error "Offline. Go connect to the internet then run the script again." fi }

    Changed

    Fixed

    install_docker.sh install_portainer.sh update_portainer.sh

    Removed

    couple litte syntax errors in the error function

    Warning we automatically generate the following files, your change(s) will overwritten.

    • docs/README.md
    • template/portainer-v2-arm32.json
    • template/portainer-v2-arm64.json
    • template/portainer-v2-amd64.json
    • tools/README.md
    • docs/AppList.md
    • docs/DocumentList.md
    • pi-hosted_template/template/portainer-v2.json

    Please make any changes to these files instead

    • template/apps/some-application-name.json
    • stack/some-stack-name.yml
    • docs/some-docsname.md
    • tools/some-script.sh
    • build/info.json
    opened by goldjunge91 6
  • [REQUEST] feature add AdGuard home?

    [REQUEST] feature add AdGuard home?

    I’ve seen this template: https://raw.githubusercontent.com/technorabilia/portainer-templates/main/lsio/templates/templates-2.0.json And though, why not add adguard from that? Source https://www.reddit.com/r/portainer/comments/mlzp8z/140_portainer_app_templates_for_linuxserverio/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

    opened by Macleykun 6
  • [REQUEST] tinkerboard support

    [REQUEST] tinkerboard support

    installation script doesnt work on my tinker board s it gives these errors: curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it

    gpg: no valid OpenPGP data found.

    i think the way to fix curl problem is by adding -k before the url to not verify ssl

    opened by abodi-0507 6
  • NextcloudPi blank page - pihosted container - RPI OS 64 bits

    NextcloudPi blank page - pihosted container - RPI OS 64 bits

    Hello,

    I'm running NextcloudPi (docker ARM version), on a RPI4.

    After the update of this container it seems that the NextcloudPi interface is "blank' :

    image

    It seems to be something similar to this but I don't know if someone had the same problem with the docker version.

    Nextcloud is always in maintenance mode and I can do nothing on the NextcloudPi interface, I'm locked and I don't really understand why.

    Any ideas ?

    opened by Tchiimy 5
  • [QUESTION] Whoogle search behaviour

    [QUESTION] Whoogle search behaviour

    Question Your question here.

    When doing a search on Whoogle is it normal for the search engine to ask which search site to use, when I watched your whoogle video usage this behaviour never occurs.

    image

    Context Any additional context around the question, such a link to a project where it's being implemented.

    Whoogle search operates on Raspberry P in docker, but the search is done in the Brave browser on the macOS.

    opened by Redback813 3
  • Whoogle fails to start on Raspi 64bit

    Whoogle fails to start on Raspi 64bit

    System Settings Linux Raspberry Pi 5.15.61-v8+ #1579 SMP PREEMPT Name="Debian GNU/Linux" Version_ID="11" Version="11 (Bullseye)" Version_Codename=Bullseye

    macOS = Big Sur

    #############################

    Whoogle installed without any known issues in portainer, however failure to retain an IP address after 60sec shows sign of problems, hence I'm providing the log file of the issues.

    image

    _whoogle_logs.txt

    Thanks in advance

    opened by Redback813 3
  • Transmission-IPVanish

    Transmission-IPVanish

    I've been using transmission with ipvanish since the video went live on youtube with no issues. then suddenly it stopped working. it would always say starting but never actually start. I redid everything thinking it would work again like it did before and nope.

    this is what it started doing

    Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.noMfIe Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.MlOflc Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.JnfcNG Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.kBbIjm Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.obDcnD Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.GBJCkM Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.jalBKG Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.CKLkFd Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.Gnenhk Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.NIaLAO Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.ceEpDO Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.AKgloM Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read Starting container with revision: 47f32618629b0144f492b9116f77978d4c991712 Creating TUN device /dev/net/tun mknod: /dev/net/tun: File exists Using OpenVPN provider: IPVANISH Provider IPVANISH has a custom setup script, executing it Downloading OpenVPN config bundle configs.zip into temporary file /tmp/tmp.BKHkac Extract OpenVPN config bundle into /etc/openvpn/ipvanish unzip: short read

    opened by Foresaken1 1
  • [REQUEST] CrowdSec + bouncer Stack

    [REQUEST] CrowdSec + bouncer Stack

    With all these hosted docker services, the moment you open up your network without a good firewall, it might get slammed with unknown/unauthorized requests..

    CrowdSec + a bouncer might be useful since it can be used on a pi too.

    https://hub.docker.com/r/crowdsecurity/crowdsec

    opened by reikolydia 2
Owner
don
novaspirit tech novaspirit.com
don
Your private self hosted composer repository with user management

Devliver Your private self-hosted composer repository. Requirements Docker MariaDB/MySQL the running docker container has access to private git reposi

Nikita Loges 53 Dec 30, 2022
Your personal Self-hosted or offline YoutTube Kids!

New Tube You have a problem with youtube kids and need online youtube? This is yours. NewTube! Simply clone the project and put your mp4 video & cover

Javad Adib 7 Dec 28, 2022
FreshRSS is a self-hosted RSS feed aggregator like Leed or Kriss Feed.

Read this document on github.com/FreshRSS/FreshRSS/ to get the correct links and pictures. Version française FreshRSS FreshRSS is a self-hosted RSS fe

FreshRSS 5.3k Jan 4, 2023
Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion.

Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Łukasz Lach 112 Nov 24, 2022
A self-hosted alternative to putting your code snippets on Gist.

WP-Gistpen Contributors: JamesDiGioia Donate link: http://jamesdigioia.com/ Tags: gist, code snippets, codepen Requires at least: 5.2 Requires PHP: 5.

Intraxia 71 Nov 15, 2022
Your self-hosted bookmark archive. Free and open source.

Your self-hosted bookmark archive. Free and open source. Contents About LinkAce Support Setup Contribution About LinkAce LinkAce is a self-hosted arch

Kevin Woblick 1.7k Jan 2, 2023
CodeFever Community Edition (A Self-hosted Git Services)

CodeFever Community Edition (A Self-hosted Git Services)

PGYER 2.3k Jan 7, 2023
Yclas Self Hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few seconds.

Yclas 4.4.0. Description Yclas self-hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few

Yclas 299 May 29, 2022
Self-hosted game library.

A self-hosted game browser. About Cartridge is a convenient browser for your game collection with easy file downloads and automatically imported metad

null 111 Dec 25, 2022
A very simple way to handle self-hosted WordPress plugin updates

Simple WP Plugin Update handling A very simple way to handle self-hosted WordPress plugin updates This uses the "update_plugins_{$hostname}" filter in

Peter Viszt 5 Jun 13, 2023
A PHP library to play with the Raspberry PI's GPIO pins

php-gpio php-gpio is a simple PHP library to play with the Raspberry PI's GPIO pins. It provides simple tools such as reading & writing to pins. [UPDA

Ronan Guilloux 266 Oct 17, 2022
A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch screens with a resolution of 1024x600 connected to a Raspberry Pi.

EDStatusPanel A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch scr

marcus-s 24 Oct 4, 2022
Class for manage directly leds on raspberry pi in PHP

led_raspberry Class for manage directly leds on raspberry pi in PHP We can access GPIO ports directly with fwrite() for power on|off leds, without use

Rafael Martin Soto 8 Sep 15, 2021
A now playing screen for the Raspberry Pi using the Last.fm API.

raspberry-pi-now-playing A now playing screen for the Raspberry Pi using the Last.fm API. This project is detailed, with photos of how I used it with

null 44 Dec 17, 2022
Raspberry Pi wifi hotspot with an offline-first community portal. Optionally shares internet access over Tor.

Raspberry Pi wifi hotspot with an offline-first community portal. Optionally shares internet access over Tor.

Martti Malmi 17 Dec 15, 2022
A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

?? Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate ?? Edited from https://github.com/ger86/symfony-docker version -> http

null 6 Nov 9, 2022
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022
Docker-magento - Docker image for Magento 1.6 to 1.9

Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

Fu Cheng 144 Nov 18, 2022
🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

?? This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

Anton Kliek 1 Jan 26, 2022