It's best to maintain a few inches of clearance between the air fryer and the wall to allow proper airflow and prevent overheating.