Back

[Solved]Configuration of Appwrite on Raspi 4B

  • 0
  • General
  • Tools
joeyouss
6 Apr, 2023, 12:50

Hey, please expand a bit more about this? Can you share the container info and the error

TL;DR
Solution: The user was having trouble setting up Appwrite on a Raspberry Pi 4B. They noticed that the MariaDB container was not automatically setting up in the Raspbian OS. They found a workaround by manually setting up the user configuration for Appwrite in the Docker MariaDB using the values provided in the documentation. They also copied and pasted the Appwrite schema into the Docker MariaDB. This solved the issue and allowed them to successfully configure Appwrite on their Raspberry Pi 4B. Link to solution: https://github.com/appwrite/appwrite/issues/2628#issuecomment-1499094572
Rushour0
6 Apr, 2023, 14:06

Hey no worries, I fixed it

Same issue as this : https://github.com/appwrite/appwrite/issues/2628

People were stuck on it for some time ig. Raspi server setups are pretty helpful. So decided to fix it. My solution is this : https://github.com/appwrite/appwrite/issues/2628#issuecomment-1499094572

Works for me. Let me know if it looks good?

Rushour0
6 Apr, 2023, 14:08

[Solved]Configuration of Appwrite on Raspi 4B

joeyouss
6 Apr, 2023, 15:48

Ah this was the one, I thought it got deleted, thanks for closing it

Rushour0
6 Apr, 2023, 16:03

Welcome!

Drake
6 Apr, 2023, 16:18

sooo what was the problem? and how does your solution relate to the problem?

Rushour0
6 Apr, 2023, 16:37

Basically all the PLSQL commands that we were asking docker to put on our newly installed mariadb in the container, was actually not happening. It was probably because of mariadb or something.

I just setup the default user that Appwrite uses for its interactions. user and password. Then created the schema for appwrite database from the given link in the comment

Rushour0
6 Apr, 2023, 16:38

You can check the full solution in that Linked comment

Drake
6 Apr, 2023, 17:11

yes i see your solution

Drake
6 Apr, 2023, 17:12

im still trying to understand the underlying problem...

Rushour0
6 Apr, 2023, 17:25

In these logs we see that the database is not ready error. However when I checked the docker installation of mariadb using docker exec appwrite-mariadb mariadb it was working fine for me. Then I further went on to check the logs for the mariadb logs specifically.

It was saying that the connection was refused because of db: unconnected, user: unauthenticated. This would mean that the setup for environment variables for mariadb was not done.

The _APP_DB_USER was not setup, hence the authentication was failing constantly.

This seemed like an issue with raspberry pi's docker & mariadb setup.

I added the user configuration for appwrite in the docker mariadb using the values given here : https://appwrite.io/docs/environment-variables#mariadb After that I just copy pasted appwrite schema in the docker mariadb from here : https://github.com/appwrite/docker-mariadb/blob/master/all.sql.

Rushour0
6 Apr, 2023, 17:25

It was essentially a docker-mariadb issue of things not getting setup automatically in the database. So yeah. This was all.

Rushour0
6 Apr, 2023, 17:27

My solution is just a work around tbh. A better script can be added for the same in the installer if the need be. This was only my first time actually using docker neatly.

Drake
6 Apr, 2023, 17:27

btw that sql is old, not used, and not really a good long term solution

Drake
6 Apr, 2023, 17:27

really bizarre because the user and database should be set up automatically by the offical docker container (we use the official docker container not that docker-mariadb repo

Rushour0
6 Apr, 2023, 17:29

Yeahhh, I know right. I actually got a hint from another one of my setups using docker. There were also some issues mentioned in another organisations repository about it.

Drake
6 Apr, 2023, 17:30

what hint?

Rushour0
6 Apr, 2023, 17:30

Oh so I used that repo only to get the appwrite sql. I didnt find another sql file for the appwrite database schema

Rushour0
6 Apr, 2023, 17:33

docker is not setting up things automatically for mariadb in the raspbian OS I found a similar issue by another organization https://github.com/photoprism/photoprism/discussions/1966

Rushour0
6 Apr, 2023, 17:33

So that gave me an idea to do the same for this after checking the logs for appwrite-mariadb container

Drake
6 Apr, 2023, 17:38

interesting...

Rushour0
6 Apr, 2023, 17:40

Yeahhh, also. This issue has happened that things take time to setup. So may be waiting for around 30mins might set it up automatically?? According to this : https://github.com/MariaDB/mariadb-docker/issues/68

But I waited for long enough to let it setup.

Drake
6 Apr, 2023, 17:43

this could be it...

Drake
6 Apr, 2023, 17:43

im still surprised you got the mariadb container running on raspbian because it didn't run for me last time

Rushour0
6 Apr, 2023, 17:45

Hehe, I was just desperate to run it, and had to do it fast, because I have exams tomorrow. Having a weird obsession to get things running on my raspi helps. 😉

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more