Version 0.6.2  
Docs

Debugging

Appwrite comes with a few built-in tools and methods that easily debug and investigate issues on your Appwrite stack environment.

Doctor CLI  available from >= v0.7

The doctor CLI helps you validate your server health and best practices. Using the Doctor CLI, you can verify your server configuration for best practices, validate your Appwrite stack connectivity and storage read and write access, and available storage space.

To run the Doctor check, simply run the following command from your terminal. You might need to replace ‘appwrite’ with your Appwrite Docker container ID. To find out what’s your container ID, you can run `docker ps` command (more on that, in the next section).

docker exec appwrite doctor

Logs

Checking your Appwrite containers can be a great way to pinpoint where and what exactly happens inside your Appwrite services. You can list your Appwrite containers using the following command in your terminal:

docker ps

The output of this command will show you a list of all your running Docker containers, their ID's, uptime, and open ports. You can use each container ID to get a list of all the container `stdout` and `stderr` logs by using the following command:

docker logs [CONTAINER-ID]

Status Codes

Appwrite uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, invalid input, etc.). Codes in the 5xx range indicate an error with the Appwrite server, but these are rare.

Learn more about Appwrite status codes

Dev Mode

When moving to dev mode, your server will produce a much more verbose error message. Instead of getting a general 500 error, you’ll be able to view the exact error that happened on the server, debug the issue further or report it to the Appwrite team.

To change your dev environment, edit your server _APP_ENV environment variable from ‘production’ to ‘development’ in your Appwrite docker-compose.yml file located in the `appwrite` directory in the location where you first installed Appwrite.

...
    - influxdb
    - telegraf
environment:
    - _APP_ENV=development
    - _APP_OPENSSL_KEY_V1=your-secret-key
    - _APP_DOMAIN=localhost
...

After you completed the change in the docker-compose.yml file, save it and run the following command to restart Appwrite with your new settings:

docker-compose up -d