Discourse on a Raspberry Pi | Blog

I’ve been trying to get discourse to work on a raspberry pi 4 for a couple of months and have had no luck.

It seemed like maybe the docker image was out of date, so I uninstalled and reinstalled two other docker images and still no luck.

Any suggestions?

1 Like

Yes, install an arm64 distribution on your Pi.

It took a couple of years for Raspberry Pi Foundation to release the correct software architecture because they were still developing for 32-bit hardware. Please change your image the current arm64 release. Good news is it will allow you to use all 8gb of ram if that is your device.

1 Like

I seem to already be running arm64 and it’s not working.

1 Like

You should confirm what you are running.

cat /proc/cpuinfo

1 Like

Whew, that was a lot of data and, honestly, a lot is unfamiliar. Which line specifies what I’m running?

1 Like

I think
uname -a
should help here.

2 Likes

Thanks!
Results:
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

1 Like

Hmm, well that’s a 64 bit (aarch64) kernel, and yet you had a docker message complaining about armv8. I don’t know this territory or the full story of how you got here… a common advice is to take a safe backup and restore into a fresh OS and fresh discourse installation.

I hope it’s not the case that a successful installation will inevitably have trouble when it comes time to upgrade.

1 Like

What’s the output of your docker info ?

In special the line that says the Architecture:.

1 Like

CPU architecture: 8

1 Like

lol, I have done that many times over and am prepared to do it again.

Currently, I’m on a Raspberry Pi 400 Rev 1.0 running Bullseye 64 lite.
I have tried Bullseye 64, 64 lite, 32 lite; and Bookworm 64. If I remember correctly, I get the same error that I posted in each case.

After looking into it a little, a friend suggested reflashing to Bullseye 64 lite and that should fixt the problem. But it didn’t.

Side note, when I run the docker sudo docker run hello-world it produces the expected “Docker is working” message.

1 Like

Not that one :stuck_out_tongue: . Please paste to whole output.

3 Likes

sudo docker info
Client: Docker Engine - Community
Version: 24.0.7
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.21.0
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 4
Server Version: 24.0.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
runc version: v1.1.10-0-g18a0cb0
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.1.21-v8+
Operating System: Debian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.705GiB
Name: raspberrypi
ID: 183a2a7a-8acf-40eb-9386-c99d70ee8ed3
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support

1 Like

Can’t get it going on a Raspberry Pi 4 with 8GB ram, and a SSD attached via USB as the single drive. It keeps hanging on the following (or at least, I get impatient after an hour of waiting…)

I, [2024-02-06T00:58:51.743994 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning "@discourse/lint-configs > eslint-plugin-ember > ember-eslint-parser@0.2.5" has unmet peer dependency "@typescript-eslint/parser@^6.15.0".
warning "@discourse/lint-configs > eslint-plugin-ember > ember-eslint-parser@0.2.5" has incorrect peer dependency "typescript@^5.3.3".
warning " > @glint/environment-ember-loose@1.3.0" has unmet peer dependency "@glimmer/component@^1.1.2".
2024-02-06 01:15:58.966 UTC [64] WARNING:  worker took too long to start; canceled
2024-02-06 01:16:19.640 UTC [480] WARNING:  autovacuum worker started without a worker entry
2024-02-06 01:21:46.504 UTC [64] WARNING:  worker took too long to start; canceled
2024-02-06 01:22:18.863 UTC [481] WARNING:  autovacuum worker started without a worker entry

It’s still doing things it seems:

Tasks:  60 total,   7 running,  53 sleeping,   0 stopped,   0 zombie
%Cpu(s): 20.8 us, 60.5 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi, 18.8 si,  0.0 st 
MiB Mem :   7807.7 total,   6783.7 free,    954.0 used,     70.0 buff/cache     
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   6853.8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                    
   3422 root      20   0 1928888  33180   2512 S  40.6   0.4  28:18.52 dockerd                                                                                                    
   9922 root      20   0 1105300   9984   2944 S  30.2   0.1   1:02.72 docker                                                                                                     
   3362 root      20   0 1934276  19060   1408 S  20.8   0.2  20:24.57 containerd                                                                                                 
   9416 ubuntu    20   0 1148560 298160      0 R  12.0   3.7  10:03.66 node                                                                                                       
   9158 dnsmasq   20   0   54992   2432    128 R  11.7   0.0   5:01.56 redis-server                                                                                               
   8997 root      20   0 1238120   5704    256 S  10.7   0.1   9:06.51 containerd-shim                                                                                            
   9504 ubuntu    20   0  569128  51532      0 R   8.8   0.6   5:20.97 node                                                                                                       
   9930 pollina+  20   0  353212   5692   3328 R   6.8   0.1   0:06.97 postmaster                                                                                                 
   9931 pollina+  20   0  352820   4156   2048 R   5.2   0.1   0:02.70 postmaster                                                                                                 
   9098 pollina+  20   0  352844   3004   1024 R   2.3   0.0   0:15.75 postmaster                                                                                                 
    219 root      20   0 1259732  36000  20352 S   1.0   0.5   1:10.50 cloudflared                                                                                                
   9658 root      20   0    9116   4864   2816 R   0.6   0.1   0:18.19 top                  

Would be nice of compilation included a progress bar.

What is the best way to:

  • find out what it is doing?
  • shut it down safely to try again? I tried sudo shutdown --reboot 0 previously, however that nuked the postgres database and I had to do the machine again.
1 Like

You can search the messages you are getting against the forum and internet. Also, try moving this to a new post instead of as a reply to the announcement.

Type it into the search and you’ll see results. Repeat with what you’ve posted against the forum and internet; should get you a lot of info.
https://meta.discourse.org/search?q=has%20unmet%20peer%20dependency

1 Like

That step is not a compilation step, but it’s just downloading JS files. It’s an absurd amount of small files, so I’d guess it’s a pathological bad case for the unusual storage solution you are using?

7 Likes

Okay, I’ll leave it running for a few days then. Otherwise I guess instead of a rpi4 with ssd it’ll need to be a rpi5 with ssd.

UPDATE:

Hours later and more reading later, I decided that I’ll try change the lxd container from using a btrfs storage pool, to using a zfs storage pool. Once done, it was able to progress past that point in about 5 minutes (whereas with btrfs it would hang for an hour or so before the workers would start failing).

It’s still building, however once it has finished and I’ve been able to successfully import the backup and get cloudflare SSL sorted, I’ll publish my migration from discourse docker running inside a scaleway, to discourse docker running inside a lxd container inside a raspberry pi 4 + ssd.

UPDATE 2:

4 Likes

Why were you using a baremetal instance?

1 Like

@Falco pretty late to the party, but I’m experiencing the same issue.

I followed the install guide on a Pi 5, running arm64. Any ideas on how to fix this?

1 Like

What OS are you running?