How to Deploy Appwrite on Contabo VPS with Docker: Complete Self-Hosted Backend-as-a-Service
Contabo High-Performance Cloud VPS
Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.
Why Self-Host Appwrite Instead of Managed Firebase?
Google Firebase is developer-friendly during prototyping, but production scaling can bring crushing financial surprises. Every database read, write, document snapshot listener, and cloud function invocation is metered. For an active mobile app or SaaS with 50,000 monthly active users, Firebase bills can easily surpass $400 to $1,200 per month.
Appwrite is an open-source, complete Backend-as-a-Service (BaaS) that packages user authentication (OAuth, magic URLs, SMS, JWT), relational and document databases, encrypted file storage with automatic image thumbnailing, cron schedules, and serverless Cloud Functions (Node.js, Python, PHP, Ruby, Dart). By hosting Appwrite on a Contabo Cloud VPS 2 (6 vCPU cores, 16 GB RAM, 400 GB fast NVMe storage) for just $11.50/month, you gain unrestricted database throughput and zero per-request fees.
Hardware Recommendation
Appwrite runs a distributed suite of Docker containers: Redis, MariaDB/PostgreSQL, InfluxDB, Telegraf, Traefik, OpenSSL, and multiple worker daemons. We strongly advise deploying on a minimum of 8GB RAM (Contabo Cloud VPS 1 or VPS 2) running Ubuntu 24.04 LTS.
Step 1: VPS Hardening & Docker Installation
SSH into your freshly provisioned Contabo VPS as root:
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
apt install -y curl ufw unattended-upgrades ca-certificates gnupg lsb-release
# Configure firewall rules
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable -y
Install the official Docker Engine and Compose plugin:
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
docker --version
docker compose version
Step 2: Automated Appwrite Deployment
Appwrite provides an interactive terminal installer that configures environment variables, port bindings, and certificates automatically. Run the installer script:
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.6.0
During the interactive prompt, supply your domain information:
- Choose your server HTTP port: Default
80 - Choose your server HTTPS port: Default
443 - Choose a secret API key: Press Enter to generate a random 64-character encryption key
- Enter your public hostname: Enter your dedicated subdomain, such as
api.yourdomain.com - Enter your DNS record A: Confirm DNS has propagated to your Contabo VPS public IP
The installer pulls the Appwrite core images and starts the container cluster:
cd appwrite
docker compose ps
You should see 16 running services, including appwrite, appwrite-traefik, appwrite-worker-databases, and appwrite-worker-functions.
Step 3: Generating Automatic SSL with Let's Encrypt
Appwrite includes an integrated Traefik reverse proxy that requests Let's Encrypt TLS certificates automatically. Open your appwrite/.env file:
nano .env
Locate the following certificate settings and verify your public domain and admin email:
_APP_ENV=production
_APP_DOMAIN=api.yourdomain.com
_APP_DOMAIN_TARGET=api.yourdomain.com
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=admin@yourdomain.com
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=enabled
Restart the stack to trigger Let's Encrypt certificate issuance:
docker compose down && docker compose up -d
Step 4: Creating Your Root Admin Console Account
Navigate to https://api.yourdomain.com in your browser. You will be greeted by the Appwrite Console onboarding screen. Register your primary administrator credentials:
- Enter your administrator Name, Email, and a complex 24-character password.
- Click Create Account. This first registered account automatically receives master ownership over the Appwrite server instance.
- Create your first project (e.g., Production SaaS Web & Mobile). Appwrite assigns a unique
Project IDwhich you use to initialize SDK clients.
Step 5: Client SDK Integration (Next.js & React Native)
Connecting your frontend to your self-hosted Appwrite cluster takes fewer than 5 lines of code:
// lib/appwrite.js
import { Client, Account, Databases, Storage } from 'appwrite';
const client = new Client();
client
.setEndpoint('https://api.yourdomain.com/v1')
.setProject('YOUR_PROJECT_ID');
export const account = new Account(client);
export const databases = new Databases(client);
export const storage = new Storage(client);
Step 6: Automated Database & Volume Backups
To secure your database documents, users, and storage buckets, configure a daily backup cron script that dumps MariaDB and archives file volumes to an offsite Contabo Storage VPS or MinIO instance:
cat << 'EOF' > /usr/local/bin/backup-appwrite.sh
#!/bin/bash
BACKUP_DIR="/backups/appwrite/$(date +%F)"
mkdir -p "$BACKUP_DIR"
# Backup MariaDB SQL database
docker exec -t $(docker ps -qf "name=appwrite-mariadb") mysqldump -u root -p$(grep _APP_DB_ROOT_PASS ~/appwrite/.env | cut -d '=' -f2) --all-databases | gzip > "$BACKUP_DIR/appwrite_db.sql.gz"
# Snapshot uploaded files
tar -czf "$BACKUP_DIR/storage_uploads.tar.gz" -C ~/appwrite/data storage
# Keep last 14 days
find /backups/appwrite -type d -mtime +14 -exec rm -rf {} +
EOF
chmod +x /usr/local/bin/backup-appwrite.sh
(crontab -l 2>/dev/null; echo "0 3 * * * /usr/local/bin/backup-appwrite.sh >/dev/null 2>&1") | crontab -
Summary & Verdict
Self-hosting Appwrite on a Contabo Cloud VPS delivers an uncompromising, privacy-respecting backend platform. You eliminate arbitrary pricing caps, enjoy sub-15ms database queries, retain full ownership of your user data, and operate a world-class API engine for less than the cost of a couple of coffees per month.
Editorial Verdict: Pros & Cons
What We Love (Pros)
- Full Firebase/Supabase alternative with Auth, Databases, Storage, and Cloud Functions
- Contabo Cloud VPS 2 ($11.50/mo for 16GB RAM) handles thousands of concurrent WebSocket connections easily
- Native SDKs for Flutter, React Native, Swift, Kotlin, Next.js, and SvelteKit
Drawbacks (Cons)
- Initial Docker setup launches 15+ microservices, requiring at least 4GB to 8GB of RAM
Deploy Your Contabo Cloud Server
Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.
Written by Marcus Vance
Full-Stack Cloud Engineer
Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.
Recommended Next Reads
Hostinger vs Contabo VPS (2026): Real Benchmark Test & In-Depth Comparison
A comprehensive, benchmark-driven comparison between Hostinger and Contabo VPS. We tested Geekbench CPU scores, NVMe I/O, network latency, and hPanel vs CLI.
Hostinger Review (2026): Is It Truly the Best Web Hosting for the Price?
We stress-tested Hostinger's Premium and Cloud Startup plans across 180 days. Read our honest review covering uptime, LiteSpeed speed tests, and renewal fees.