Supabase Alternative: Self-hosted
PandaDEV

PandaDEV @pandadev_

About: Developer from 🇨🇭 • vleer.app • merged.games • epilogue.team

Location:
Switzerland
Joined:
Nov 30, 2022

Supabase Alternative: Self-hosted

Publish Date: May 13 '24
9 7

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
Enter fullscreen mode Exit fullscreen mode
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode
# to restart use
docker compose stop
docker compose up -d --remove-orphans
Enter fullscreen mode Exit fullscreen mode

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.

https://appwrite.io/docs

Comments 7 total

  • Irian
    IrianMay 14, 2024

    Can't you self host Supabase too though? supabase.com/docs/guides/self-hosting

    • PandaDEV
      PandaDEVMay 19, 2024

      Yes but its a mess and most important it has a hard coded port.

    • PandaDEV
      PandaDEVMay 19, 2024

      Also, a good self-hosted database with the full functionality.

  • Hemoni Granger
    Hemoni GrangerMay 15, 2024

    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.

  • Paul
    PaulMay 15, 2024

    I know this is a bit off-topic, but Appwrite Cloud has very generous free-tier limits with no trial period expiration.

  • Claude Fahey
    Claude FaheyNov 28, 2024

    If you're exploring self-hosted database alternatives, consider Appwrite. With a sleek UI and SDKs for every language, it's perfect for full data control and free hosting. Just like in Papa's Pizzeria , where managing resources and recipes is key, Appwrite lets you manage your database with ease. A lightweight solution, you can install it on an Ubuntu server using Docker. Enjoy the benefits of self-hosting without the cost!

Add comment