On a development environment I used the code provided on the docs to self-host Appwrite:
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.3.7
This uses a bunch of default values which is fine on my localhost since it's only meant for development anyway. But I used the same command when hosting Appwrite on my server as production. I realized that I didn't change the credentials for MariaDB:
_APP_DB_USER=user
_APP_DB_PASS=password
_APP_DB_ROOT_PASS=rootsecretpassword
I want to change this now but I just want to make sure that if I did change these three values, I won't lose any data. What's the best way for me to go about this? Obviously I'll back up the data first but I don't want any headaches so I don't want to start without any plans.
I guess I'm just wondering if it's safe for me to just change the values and then run docker compose up --force-recreate --remove-orphans -d.
no, you'll have to update the password just like you would any mariadb database: by running the sql commands to do so. Then, you can update the values in your .env file so your appwrite instance uses those updated values
Ah silly me, of course lol. Thank you! I was overthinking it again.
[SOLVED] Update the MariaDB credentials
@Steven After changing the root password for both % and localhost, I added a new user with a different password for both % and localhost as well. I granted all privileges exactly as the root user has. After running ``docker compose up --force-recreate --remove-orphans -d` I've been getting a bunch of Sentry logs:
read error on connection to redis:6379 pubSubConnection
Redis server redis:6379 went away pubSubConnection
I did update the .env file to use the new account I created and also updated the root password with what I changed it to.
Try to restart the appwrite container again
You should also inspect the container to verify the environment variables are correct
Thank you, I restarted the containers and it seems to have stopped.
Well, it looks like it’s still going.. I’ll take a look at it tomorrow but I was wondering if I should change any of the redis credentials after the stuff I did? Also what’s the command to make sure the verify that the environment variables being loaded are correct?
You can't put a password on redis at the moment.
docker compose exec appwrite vars
Or you can inspect the docker container
Okay thanks, I’ll do that tomorrow since it doesn’t seem like it has broken anything anyway, or at least not that I noticed.
Recommended threads
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this
- How to determine if a user is anonymous?
This is probably a silly question, but I have not yet found a good answer. Is there a method to determine if the current session is anonymous aside from seein...