Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. Cloudron on a Raspberry pi?

Cloudron on a Raspberry pi?

Scheduled Pinned Locked Moved Discuss
armraspberry-pi
133 Posts 17 Posters 55.0k Views 19 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #88

    It works for me here atleast. I am guessing that you are unable to connect to the container IP maybe? Can you try installing psql tooling and connect via IP address? You can put a log in connectClient to see the credentials.

    $ npm test
    
    > postgresql-addon@1.0.0 test /home/girish/yellowtent/postgresql-addon
    > mocha --bail ./test/test.js
    
    
    
      Postgresql Addon
    Error response from daemon: network with name cloudron already exists
        auth
          ✓ fails without access_token
          ✓ fails with invalid access_token
          ✓ succeeds
        add database
          ✓ succeeds (369ms)
          ✓ succeeds when added again
        remove database
          ✓ succeeds (125ms)
        use the database
          ✓ can create extension (82ms)
          ✓ can create table foo
          ✓ can insert into table foo
          ✓ can read from table foo
          ✓ restart (5091ms)
          ✓ can read from table foo
        backup and restore
          ✓ succeeds to create backup (443ms)
          ✓ succeeds to create new database (412ms)
          ✓ succeeds to clear new database (426ms)
          ✓ succeeds to restore backup (940ms)
          ✓ succeeds to check restore data
        restore of invalid dump fails
          ✓ succeeds to create backup (186ms)
          ✓ succeeds to clear new database (424ms)
          ✓ fails to restore backup (185ms)
        restore of existing dump
          ✓ succeeds (1721ms)
    
    
      21 passing (36s)
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      malvim
      wrote on last edited by
      #89

      Hey,

      So I commented out the remove database tests because I had trouble connecting from the container, but the next test, use the database, starts like this:

      // psql -h localhost -U usetestuser  -d usetestdatabase
      describe('use the database', function () {
          const data = { database: 'usetestdatabase', username: 'usetestuser', password: 'somepassword', locale: 'C' };
      
          before(function (done) {
              async.series([
                  addDatabase.bind(null, data),
                  connectClient.bind(null, data)
              ], done);
          });
      

      So I ran "psql -h localhost -U usetestuser -d usetestdatabase", using 'somepassword' as a password, and was able to connect, both from inside the container and from my host machine.

      connectClient still doesn't connect, and, I get this on the screen:

          auth
            ✓ fails without access_token
            ✓ fails with invalid access_token
            ✓ succeeds
          use the database
      usetestuser somepassword usetestdatabase 172.18.0.2 5432
            1) "before all" hook
      
        3 passing (2m)
        1 failing
      
        1) Postgresql Addon
             use the database
               "before all" hook:
           Error: Timeout of 100000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/malvim/Projetos/Pi/docker/postgresql-addon/test/test.js)
            at listOnTimeout (internal/timers.js:551:17)
            at processTimers (internal/timers.js:494:7)
      
         
            2) "after all" hook
      
      1 Reply Last reply
      1
      • M Offline
        M Offline
        malvim
        wrote on last edited by
        #90

        Also, it does not seem to be network-related, since I get the same behavior on an ubuntu 20.04 VPS I have...

        1 Reply Last reply
        1
        • M Offline
          M Offline
          malvim
          wrote on last edited by
          #91

          I tried recreating the steps inside the container using node, and could connect. I'm really at a loss here right now... 😕

          LonkleL 1 Reply Last reply
          1
          • M malvim

            I tried recreating the steps inside the container using node, and could connect. I'm really at a loss here right now... 😕

            LonkleL Offline
            LonkleL Offline
            Lonkle
            wrote on last edited by
            #92

            @malvim Wish I had my Pi now so I could help test! Soon tho. ☺️

            M 1 Reply Last reply
            1
            • LonkleL Lonkle

              @malvim Wish I had my Pi now so I could help test! Soon tho. ☺️

              M Offline
              M Offline
              malvim
              wrote on last edited by
              #93

              Hey, @Lonk! You mind testing this on your laptop? I'm not getting these errors only on the Pi, I'm getting them on my amd64 laptop and amd64 server as well!

              Repo is here: https://git.cloudron.io/cloudron/postgresql-addon, it's just a matter of:

              • cloning it;
              • building the image locally (docker build -t cloudron/postgresqladdontest .)
              • installing dependencies (npm install)
              • running the test (npm test)

              Could you run this somewhere and see if you have the same problem?

              Thanks! 🙂

              1 Reply Last reply
              2
              • M Offline
                M Offline
                malvim
                wrote on last edited by
                #94

                MAN, it seems I'm running into ALL KINDS of weird problems hahaha!

                I started going into postgresql node client's code, and it seemed to be some weird behavior of EventEmitter, which was weird...

                I installed nvm and tested with older node distributions, and it ran fine on my laptop! So it seems, @girish, that the test code for postgresql-addon does not run with node v14 or later on my machines. Tested with v12 and v13 and it was all fine. What version are you using for tests?

                Moving on to the next hurdle, I guess hahah!

                girishG 1 Reply Last reply
                0
                • M malvim

                  MAN, it seems I'm running into ALL KINDS of weird problems hahaha!

                  I started going into postgresql node client's code, and it seemed to be some weird behavior of EventEmitter, which was weird...

                  I installed nvm and tested with older node distributions, and it ran fine on my laptop! So it seems, @girish, that the test code for postgresql-addon does not run with node v14 or later on my machines. Tested with v12 and v13 and it was all fine. What version are you using for tests?

                  Moving on to the next hurdle, I guess hahah!

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #95

                  @malvim said in Cloudron on a Raspberry pi?:

                  So it seems, @girish, that the test code for postgresql-addon does not run with node v14 or later on my machines

                  Aha! I feel like I have hit this issue before. Indeed, when we updated the box code to use node 14 lots of things fail (not sure why). We use node 10.18.1 everywhere. This is why the hotfix and code enforces it. For future reference, always use the node in scripts/createReleaseTarball in the box repo.

                  M 1 Reply Last reply
                  1
                  • girishG girish

                    @malvim said in Cloudron on a Raspberry pi?:

                    So it seems, @girish, that the test code for postgresql-addon does not run with node v14 or later on my machines

                    Aha! I feel like I have hit this issue before. Indeed, when we updated the box code to use node 14 lots of things fail (not sure why). We use node 10.18.1 everywhere. This is why the hotfix and code enforces it. For future reference, always use the node in scripts/createReleaseTarball in the box repo.

                    M Offline
                    M Offline
                    malvim
                    wrote on last edited by
                    #96

                    @girish okay, cool, I'll use that. It's good news, then, that the OTHER tests even ran!

                    So, for what it's worth, the code seemed to fail on the use of EventEmitter. A class was dispatching an event and the corresponding listener was not triggered, so if you ever need to investigate further, maybe that's a start.

                    nebulonN 1 Reply Last reply
                    0
                    • nebulonN Away
                      nebulonN Away
                      nebulon
                      Staff
                      wrote on last edited by
                      #97

                      I have ordered a RaspberryPi 4 now as well and plan to use that as a home server, so hopefully we can get this supported well in the future 🙂 Very curious to get my hands on what you have already managed to get working!

                      1 Reply Last reply
                      5
                      • robiR Offline
                        robiR Offline
                        robi
                        wrote on last edited by
                        #98

                        There's the new keyboard that includes an rPi inside too.

                        Conscious tech

                        1 Reply Last reply
                        0
                        • M malvim

                          @girish okay, cool, I'll use that. It's good news, then, that the OTHER tests even ran!

                          So, for what it's worth, the code seemed to fail on the use of EventEmitter. A class was dispatching an event and the corresponding listener was not triggered, so if you ever need to investigate further, maybe that's a start.

                          nebulonN Away
                          nebulonN Away
                          nebulon
                          Staff
                          wrote on last edited by
                          #99

                          @malvim I've also got a Raspberry Pi 4 now. Can you give an update on where you are and do you have forked repos with arm changes somewhere?

                          1 Reply Last reply
                          0
                          • nebulonN Away
                            nebulonN Away
                            nebulon
                            Staff
                            wrote on last edited by
                            #100

                            To give a short update from my side, with the information already posted here, I was able to get the box (the main Cloudron controller process) up and running on the Pi 4 as well as successfully install Cloudron as such. I have only just started on the base image and the other addons, so any patches here are welcome.

                            To collect the changes, I am creating arm64 branches in the relevant repos, for example https://git.cloudron.io/cloudron/box/-/commits/arm64 and https://git.cloudron.io/cloudron/docker-base-image/-/commits/arm64

                            On top of this, I am trying to implement a better provisioning workflow for development, this is similar to the hotfix, so it is still aimed towards developers porting stuff to arm. More info on this later.

                            LonkleL M 2 Replies Last reply
                            3
                            • nebulonN nebulon

                              To give a short update from my side, with the information already posted here, I was able to get the box (the main Cloudron controller process) up and running on the Pi 4 as well as successfully install Cloudron as such. I have only just started on the base image and the other addons, so any patches here are welcome.

                              To collect the changes, I am creating arm64 branches in the relevant repos, for example https://git.cloudron.io/cloudron/box/-/commits/arm64 and https://git.cloudron.io/cloudron/docker-base-image/-/commits/arm64

                              On top of this, I am trying to implement a better provisioning workflow for development, this is similar to the hotfix, so it is still aimed towards developers porting stuff to arm. More info on this later.

                              LonkleL Offline
                              LonkleL Offline
                              Lonkle
                              wrote on last edited by
                              #101

                              @nebulon So quickly! Nice work.

                              I want to convert my app to run on ARM so I'll be getting the same board you got to verify the OpenVPN Client and all of its features are able to work in an ARM environment.

                              This is so cool, love ARM.

                              1 Reply Last reply
                              0
                              • nebulonN Away
                                nebulonN Away
                                nebulon
                                Staff
                                wrote on last edited by
                                #102

                                Well it really remains to be seen how powerful such a board is to run common apps through docker 😉

                                LonkleL mehdiM 2 Replies Last reply
                                0
                                • nebulonN nebulon

                                  Well it really remains to be seen how powerful such a board is to run common apps through docker 😉

                                  LonkleL Offline
                                  LonkleL Offline
                                  Lonkle
                                  wrote on last edited by
                                  #103

                                  @nebulon True, but even if it could run 1. Not even that well, imagine a future with the Rasberry Pi 8. ARM CPUs are getting insane.

                                  1 Reply Last reply
                                  0
                                  • nebulonN nebulon

                                    Well it really remains to be seen how powerful such a board is to run common apps through docker 😉

                                    mehdiM Offline
                                    mehdiM Offline
                                    mehdi
                                    App Dev
                                    wrote on last edited by
                                    #104

                                    @nebulon said in Cloudron on a Raspberry pi?:

                                    Well it really remains to be seen how powerful such a board is to run common apps through docker 😉

                                    I'm running like 4 containers on my Raspberry pi at home, it's super smooth, and it's only a RPi 2 ! The RPi 4 is gonna be more than capable of running a few apps for home usage I think 🙂

                                    1 Reply Last reply
                                    0
                                    • nebulonN nebulon

                                      To give a short update from my side, with the information already posted here, I was able to get the box (the main Cloudron controller process) up and running on the Pi 4 as well as successfully install Cloudron as such. I have only just started on the base image and the other addons, so any patches here are welcome.

                                      To collect the changes, I am creating arm64 branches in the relevant repos, for example https://git.cloudron.io/cloudron/box/-/commits/arm64 and https://git.cloudron.io/cloudron/docker-base-image/-/commits/arm64

                                      On top of this, I am trying to implement a better provisioning workflow for development, this is similar to the hotfix, so it is still aimed towards developers porting stuff to arm. More info on this later.

                                      M Offline
                                      M Offline
                                      malvim
                                      wrote on last edited by
                                      #105

                                      @nebulon Great work!

                                      I got really caught up with work and personal stuff over the last weeks, so I was not able to keep on working.

                                      On most addon repos, I was creating arm64 branches as well, but most of them were just a matter of changing the base image to not have the hash. I was using cloudron/baseimage and building it on the pi itself before trying to install cloudron, so I had it tagged locally with that name, and others wouldn't download from docker hub, using the local arm64 one instead.

                                      I'll search for any changes I have made over here, but they're not a lot.

                                      I'll post a suymmary tonight.

                                      nebulonN 1 Reply Last reply
                                      1
                                      • M malvim

                                        @nebulon Great work!

                                        I got really caught up with work and personal stuff over the last weeks, so I was not able to keep on working.

                                        On most addon repos, I was creating arm64 branches as well, but most of them were just a matter of changing the base image to not have the hash. I was using cloudron/baseimage and building it on the pi itself before trying to install cloudron, so I had it tagged locally with that name, and others wouldn't download from docker hub, using the local arm64 one instead.

                                        I'll search for any changes I have made over here, but they're not a lot.

                                        I'll post a suymmary tonight.

                                        nebulonN Away
                                        nebulonN Away
                                        nebulon
                                        Staff
                                        wrote on last edited by
                                        #106

                                        @malvim right, it was same route for me then. I have just managed to get all addons and nextcloud to run. The notes here about mongodb were helpful!

                                        Overall I don't think it will be included in the next release though, maybe as something experimental, but while we have a proof-of-concept now, it will still take quite some time to actually make it proper and of course all apps have to be rebuilt...

                                        LonkleL 1 Reply Last reply
                                        0
                                        • nebulonN nebulon

                                          @malvim right, it was same route for me then. I have just managed to get all addons and nextcloud to run. The notes here about mongodb were helpful!

                                          Overall I don't think it will be included in the next release though, maybe as something experimental, but while we have a proof-of-concept now, it will still take quite some time to actually make it proper and of course all apps have to be rebuilt...

                                          LonkleL Offline
                                          LonkleL Offline
                                          Lonkle
                                          wrote on last edited by Lonkle
                                          #107

                                          @nebulon Let me know when you send are finished with your branch (and how we'd build it differently) and I'll make sure my OpenVPN Client is ready!

                                          girishG 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search