Not just another database
Appwrite is one of the best ways to self-host a database, with the whole suite of tools and an SDK for every language.
Appwrite has one of the cleanest UIs you can think of, very similar to Supabase.
Why use it over cloud based databases
I think by self-hosting, you can have full control over your data. Also, the single and most important thing, it's completely free, and you don't have to pay a subscription to host it. The only trade-off is that you need a server, but even then it does not have to be a big one because Appwrite is so lightweight.
How to install on Ubuntu Server
To install Appwrite you need docker installed.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
After this you have two options, either a normal docker container or manually with docker compose
Docker container
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.5.5
Docker compose
# create a new directory for storing the docker compose file
mkdir appwrite
# download the tow files docker-compose.yml and .env
curl -O https://appwrite.io/install/env
curl -O https://appwrite.io/install/compose
# finally start appwrite
docker compose up -d --remove-orphans
# to restart use
docker compose stop
docker compose up -d --remove-orphans
Conclusion
It's very useful if you make small side projects that need auth and a database in one and don't want to use old school SQL with MySQL. Now it's up to you what you do with it.
Top comments (6)
Can't you self host Supabase too though? supabase.com/docs/guides/self-hosting
Yes but its a mess and most important it has a hard coded port.
I know this is a bit off-topic, but Appwrite Cloud has very generous free-tier limits with no trial period expiration.
PocketBase
Also, a good self-hosted database with the full functionality.
It's amazing! Your article is very good and very useful to us! Thank you so much for taking the time to share with us! Have a good time with uno online with friends free.