Appwrite was built with self-hosting in mind, making running on your own hardware as easy as possible with minimal hassle. Self-hosting allows users to have complete control over their stored data and provides extensive customization capabilities, enabling users to modify and tailor the source code to perfectly align with their needs.
This blog will discuss how to self-host Appwrite on your servers from scratch and some troubleshooting tips you might need.
What is Coolify?
Coolify is an all-in-one Platform as a Service (PaaS) that allows developers to self-host applications, databases, or services, including Appwrite, without the hassle of managing the servers. It is an open-source and self-hostable solution that provides one-click deployment for hosting various services, including Appwrite on your servers.
It’s intuitive dashboard serves as a centralised command center, allowing users to effortlessly manage and configure all their services from a single, user-friendly interface.

Setting up a VPS
A VPS stands for Virtual Private Server, a machine you can rent on the cloud from various cloud providers. Some examples include Elastic Compute Cloud (EC2) from Amazon AWS, Virtual Machines from Azure, Droplets from DigitalOcean and much more.
Appwrite also offers one-click deployments without using Coolify on DigitalOcean, AWS Marketplace, etc. If you are interested, you can learn more about them on our Github repository.
This blog will focus on droplets from the DigitalOcean, but the same steps should apply to any VPS after you have it set up and running.
Go to DigitalOcean's website and create an account or sign into an existing one.
After logging in to the control panel, click the "Create" menu in the top navigation bar and select "Droplets".
You can choose any region and data centre. (Choosing one near your location might improve performance and latency.)
For OS, select Ubuntu and select the latest version.
Choose a Droplet plan based on your expected workload.
Add block storage if you expect to store large files (optional but recommended for production).
Enable backups for production environments (optional but recommended).
Add your SSH key for secure access:
Adding SSH Key
SSH stands for Secure Shell. It is a protocol that allows you to securely access your server without using a password. It is more secure than passwords and easier to manage.
a. Select an existing key if you've previously added one.

b. Click on “New SSH Key” if creating a new one.
c. Open your system’s command line or terminal, and generate a new SSH key pair using ssh-keygen -t rsa -b 4096.

d. The command will generate two keys, one private and one public. One ending with .pub will be the public one; copy it.
e. Add the public key to DigitalOcean and give it a name.

Choose a hostname that helps identify your Appwrite instance (e.g., appwrite-self-hosting), and then click "Create Droplet". It will take a few minutes to provision the droplet.
Initial server setup
Once your Droplet is provisioned, SSH into your server using your private key:
ssh root@your_server_ip
Now, update your system packages:
apt update && apt upgrade -y
Set up a firewall (UFW) to protect your server:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Create a non-root user with sudo privileges (optional but recommended):
adduser appwrite-admin
usermod -aG sudo
Setting up Appwrite on Coolify
Now that we have a VPS setup, the rest of the process should be the same regardless of which VPS you rent from any cloud provider.
Install Coolify on your server using this command:
curl -sSL <https://coolify.io/install> | bash
Once the installation is complete, open the Coolify dashboard in your web browser.
Sign up for a new account.
Click the Create Project button to start a new project.
Select or create an environment type. By default, a production environment is already available.
Click Add new resource.
Search for and select Appwrite from the list of services.

The configuration fields will be pre-filled with the recommended settings, but you can customise them. When ready, click the Deploy button to initiate the deployment process.
After deployment, access your Appwrite instance's console by clicking the console link in the Links section of the Appwrite service.
Troubleshooting common Issues
Too many redirects
While accessing the console, you might run into the error ERR_TOO_MANY_REDIRECTS (Site redirected you too many times). There can be a couple of issues here:
Since Coolify uses its configuration of Traefik, which is a reverse proxy and load balancer, instead of the official Appwrite one, you will have to turn off the Strip Prefixes option in the Settings page for the Appwrite console and Appwrite Realtime service.
If you are using Cloudflare to manage your deployment's DNS and turning off the above option doesn't help, you must update the SSL/TLS encryption setting to Full in the Cloudflare dashboard. From the dashboard, navigate to Your Domain -> SSL/TLS -> Overview and change the setting to Full.
Container Health Checks Failing

Currently, Coolify will mark all the Appwrite containers as unhealthy due to a lack of health checks configured. Still to verify if a container is healthy manually:
Check container logs in the Coolify dashboard for specific error messages.
Ensure your server meets the minimum resource requirements.
Verify that all required ports are open and not blocked by firewalls.
Check for Docker storage issues with df -h to ensure you haven't run out of disk space.
Appwrite Cloud vs Self-hosting with Coolify
Appwrite also offers Cloud as a subscription-based Backend-As-A-Service (BaaS), eliminating the complexities of managing infrastructure so developers can focus purely on building their apps. With Appwrite Cloud, you get instant access to Appwrite's powerful features — databases, authentication, storage, and functions — without the need to self-host or worry about server maintenance.
Choosing between Appwrite Cloud and self-hosting with Coolify depends on your project's needs. Here’s a side-by-side comparison to help you decide:
Aspect | Appwrite Cloud | Self-Hosting with Coolify |
Ease of setup | Quick and beginner-friendly. | Requires technical expertise to set up VPS, Coolify, and Appwrite. |
Scalability | Automatically adjusts based on demand, ensuring seamless performance. | You must provision additional resources as your app grows. |
Maintenance | Appwrite handles updates, scaling, and security patches. | You are responsible for server maintenance, updates, and security patches. |
Security | Built-in security features,DDoS protection, encryption, and backups without extra configuration. | Security is fully in your hands, configure firewalls, SSL, and backups manually. |
Support | Priority support depending on your Appwrite Cloud plan — faster issue resolution. | Community support or self-managed troubleshooting. |
Cost | Predictable, subscription-based pricing, ideal for teams wanting to avoid unexpected infrastructure costs. | Pay for VPS, storage, and bandwidth and other infrastructural requirements. |
Customization | Limited customization and depends on available features and settings provided by Appwrite. | Highly customizable since you can modify source code and integrate with other services. |
Data sovereignty | Data is stored in Appwrite’s cloud infrastructure, which is fully complaint with GDPR regulations. | Data remains on your own infrastructure. |
Conclusion
Self-hosting Appwrite with Coolify combines the strength of an end-to-end backend-as-a-service with the flexibility and autonomy of self-hosting. It enables developers to create powerful applications while retaining data sovereignty and possibly incurring lower operational expenses.
By following this guide, you've successfully deployed a production-capable Appwrite instance that you completely own. As your application grows, the union of Appwrite's robust features and Coolify's efficient management will continue to provide a solid foundation for your development requirements.
More resources
To learn more about self-hosting Appwrite on Coolify, you can check out the following resources: