<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kritika Sharma</title>
    <description>The latest articles on DEV Community by Kritika Sharma (@kritikash18).</description>
    <link>https://dev.to/kritikash18</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F735190%2F289704f4-eca9-4999-851c-03a0a317295a.png</url>
      <title>DEV Community: Kritika Sharma</title>
      <link>https://dev.to/kritikash18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kritikash18"/>
    <language>en</language>
    <item>
      <title>Appwrite - macOS Installation and Debugging Guide</title>
      <dc:creator>Kritika Sharma</dc:creator>
      <pubDate>Mon, 25 Oct 2021 03:28:50 +0000</pubDate>
      <link>https://dev.to/kritikash18/appwrite-macos-installation-and-debugging-guide-28fm</link>
      <guid>https://dev.to/kritikash18/appwrite-macos-installation-and-debugging-guide-28fm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to Appwrite
&lt;/h2&gt;

&lt;p&gt;Appwrite is an end-to-end backend solution for Web, Mobile, Native, or Backend Apps. It abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgg6pl92qsyg8dajg8nvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgg6pl92qsyg8dajg8nvd.png" alt="Appwrite logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Appwrite is a great choice for backend solutions as it provides the following benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Easy integration with user authentication and a choice of multiple sign-in methods&lt;/li&gt;
&lt;li&gt;Tracking and managing user's sessions, security logs&lt;/li&gt;
&lt;li&gt;Secure and encrypted storage of files&lt;/li&gt;
&lt;li&gt;Tracking user's location and managing app's locale-based data&lt;/li&gt;
&lt;li&gt;Managing user's avatars, countries' flags, browser icons, credit card symbols and generating QR codes&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;Also, it provides a wide variety of server-side as well as client-side SDKs to integrate with. To set up and experiment with Appwrite on macOS, you can follow the steps mentioned below. For more details or installation on other systems, you can visit their &lt;a href="https://appwrite.io/docs/installation" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Appwrite on macOS
&lt;/h2&gt;



&lt;h3&gt;
  
  
  Installing docker
&lt;/h3&gt;

&lt;p&gt;In order to install appwrite, you need to install docker first.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download docker desktop for mac here:  &lt;a href="https://docs.docker.com/desktop/mac/install/" rel="noopener noreferrer"&gt;https://docs.docker.com/desktop/mac/install/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Once downloaded, open the file and drag the docker icon to applications folder as shown below
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ofbulwpnq4fr42zqfgb.png" alt="Docker Drag To Applications"&gt;
&lt;/li&gt;
&lt;li&gt;Run the app. It will ask for permission to install tools (including docker cli which is needed for running appwrite)&lt;/li&gt;
&lt;li&gt;You can verify docker cli installation by typing the following in your terminal:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installing Appwrite
&lt;/h3&gt;

&lt;p&gt;Appwrite offers easy and simple installation by directly running their docker installer tool from the terminal. Now that docker cli is set up and verified by following steps mentioned above, run the following command in your terminal to install appwrite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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:0.11.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will ask you to define the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP port&lt;/li&gt;
&lt;li&gt;HTTPS port&lt;/li&gt;
&lt;li&gt;API key&lt;/li&gt;
&lt;li&gt;Hostname&lt;/li&gt;
&lt;li&gt;Custom domain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can either customize or choose defaults for above parameters.&lt;/p&gt;

&lt;p&gt;After you have specified these details, it will take a few moments. If everything went fine, you will get a message saying &lt;code&gt;Appwrite installed successfully&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can now access your appwrite dashboard by visiting &lt;code&gt;http://&amp;lt;hostname or custom domain&amp;gt;:&amp;lt;HTTP port&amp;gt;&lt;/code&gt;&lt;br&gt;
It will look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxh2ptfpw3y08tg5taow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxh2ptfpw3y08tg5taow.png" alt="Appwrite Sign Up Page"&gt;&lt;/a&gt;&lt;br&gt;
You can now start creating your first project and explore &lt;a href="https://appwrite.io/docs" rel="noopener noreferrer"&gt;appwrite docs&lt;/a&gt; for more features and functionalities.&lt;/p&gt;
&lt;h2&gt;
  
  
  Debugging common installation issues
&lt;/h2&gt;


&lt;h3&gt;
  
  
  Pull rate limit exceeded
&lt;/h3&gt;

&lt;p&gt;While installing appwrite through docker, you can get the following error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This error occurs because, due to recent changes in its company policy, docker now has a limit of 100 downloads every six hours from a single IP address.&lt;br&gt;
To avoid this error, you need to authenticate to your DockerHub account. If you don’t have an account on DockerHub, you can sign up for a free account. Follow the instructions below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure that docker is running&lt;/li&gt;
&lt;li&gt;Click on the whale icon present in top right on the mac toolbar&lt;/li&gt;
&lt;li&gt;Click on the option “Sign in / Create Docker ID”&lt;/li&gt;
&lt;li&gt;A dialog box will appear asking you to enter docker ID and password&lt;/li&gt;
&lt;li&gt;It will also suggest creating a new account if you don’t have one. Click on the link and follow the steps to sign up&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  HTTP 500 error and other container related issues
&lt;/h3&gt;

&lt;p&gt;Sometimes, even after the appwrite installation is complete and you get the successful installation message, your dashboard might not work.&lt;br&gt;
When accessing localhost, you might get HTTP 500 error as shown below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fveb57uuez70eznvv7mq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fveb57uuez70eznvv7mq7.png" alt="Google Error"&gt;&lt;/a&gt;&lt;br&gt;
One of the reasons for this might be that not all of your containers are working fine.&lt;br&gt;
To verify if all your containers are up, open your terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the following containers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;appwrite (main appwrite container)&lt;/li&gt;
&lt;li&gt;appwrite-traefik (reverse-proxy and load balancer)&lt;/li&gt;
&lt;li&gt;appwrite-worker-deletes (performs deletions in appwrite database)&lt;/li&gt;
&lt;li&gt;appwrite-worker-certificates (creates and renews SSL certificates)&lt;/li&gt;
&lt;li&gt;appwrite-worker-usage (sends usage related stats to telegraf)&lt;/li&gt;
&lt;li&gt;appwrite-worker-tasks (create repeating tasks using CRON schedule)&lt;/li&gt;
&lt;li&gt;appwrite-worker-webhooks (triggers registered webhooks based on events)&lt;/li&gt;
&lt;li&gt;appwrite-worker-audits (audits and logs system events)&lt;/li&gt;
&lt;li&gt;appwrite-worker-functions (handles tasks related to cloud functions)&lt;/li&gt;
&lt;li&gt;appwrite-realtime (listens to server-side events in realtime)&lt;/li&gt;
&lt;li&gt;appwrite-schedule (handles scheduling of CRON jobs)&lt;/li&gt;
&lt;li&gt;appwrite-worker-mails (sends emails)&lt;/li&gt;
&lt;li&gt;appwrite-maintenance (housekeeping tasks and cleaning up logs)&lt;/li&gt;
&lt;li&gt;appwrite-redis (used for caching, messaging and scheduling)&lt;/li&gt;
&lt;li&gt;appwrite-telegraf (collects and sends metrics and events)&lt;/li&gt;
&lt;li&gt;appwrite-mariadb (default db for project collections)&lt;/li&gt;
&lt;li&gt;appwrite-influxdb (stores API usage metrics and stats)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all of the containers are working fine, their status will be of the sort: &lt;code&gt;Up xx minutes/seconds&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rqx7314rmy4axq5e65n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rqx7314rmy4axq5e65n.png" alt="All containers working"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If some containers are not working fine, their status will be of the sort: &lt;code&gt;Restarting (x) xx seconds ago&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flh90nlo70cf8xw1cx0h1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flh90nlo70cf8xw1cx0h1.png" alt="Containers not working"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Using Appwrite’s doctor CLI
&lt;/h3&gt;

&lt;p&gt;To specifically check for storage and connectivity issues first, we can use the doctor CLI provided by Appwrite.&lt;/p&gt;

&lt;p&gt;For versions 0.7 and above, Appwrite provides the doctor CLI. 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.&lt;/p&gt;

&lt;p&gt;To run the doctor check, simply run the following command from your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec &amp;lt;container-name&amp;gt; doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;container-name&lt;/code&gt; is the name of container that is failing or not working fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Checking for storage/connectivity issues
&lt;/h3&gt;

&lt;p&gt;To check for issues with main appwrite container, use appwrite as the container-name for doctor CLI.&lt;br&gt;
If everything works fine, the command output will look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt9chht15vhxihmrqg9a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt9chht15vhxihmrqg9a.png" alt="Doctor CLI Success"&gt;&lt;/a&gt;&lt;br&gt;
In case of storage issues, the command output will look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9tk64e1j3op8fpfvpkv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9tk64e1j3op8fpfvpkv.png" alt="Doctor CLI Failure"&gt;&lt;/a&gt;&lt;br&gt;
In order to fix this issue, you can remove unused docker volumes by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker volume prune
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, you can re-install appwrite as per steps given below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Re-installing Appwrite
&lt;/h3&gt;

&lt;p&gt;You will need to re-install appwrite in case of any corrupt files persisting. In order to re-install appwrite, you need to remove the current running containers first&lt;/p&gt;

&lt;p&gt;To stop all running containers, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker kill $(docker ps -q)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To remove all the stopped containers, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rm -f $(docker ps -a -q)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, you can remove all previous appwrite docker volumes by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker volume prune
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can follow the appwrite setup guide to install it again.&lt;br&gt;
&lt;/p&gt;


&lt;p&gt;You are now ready to create your first project with an error-free setup.&lt;br&gt;
Appwrite is a rapidly growing open-source community. To learn more about Appwrite, you can visit the following links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/" rel="noopener noreferrer"&gt;Appwrite homepage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/appwrite" rel="noopener noreferrer"&gt;Appwrite github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/discord" rel="noopener noreferrer"&gt;Discord server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hacktoberfest</category>
      <category>appwrite</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
