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
- Custom Domains
Hi All, Should be a quick config issue. I'm setting up custom domains on the hosted version. I have verified the domain with the CNAME but appwrite isn't gene...
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...