Appwrite is an open-source backend platform offering authentication, databases, file storage, serverless functions and realtime events through SDKs for web, Flutter, iOS and Android. Self-hosting on a Hong Kong VPS keeps user data under your control and gives mobile apps in Greater China a nearby API endpoint.
Step 1: Install
curl -fsSL https://get.docker.com | sh
mkdir -p /opt/appwrite && cd /opt/appwrite
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)":/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:latest
# Answer prompts: HTTP port 8080, HTTPS 8443, hostname appwrite.example.com
Step 2: Front with Nginx
server {
listen 443 ssl http2;
server_name appwrite.example.com;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Step 3: Use the SDK
import { Client, Account, Databases, ID } from 'appwrite'
const client = new Client()
.setEndpoint('https://appwrite.example.com/v1')
.setProject('PROJECT_ID')
const account = new Account(client)
await account.create(ID.unique(), 'user@example.com', 'StrongPass123!')
const databases = new Databases(client)
await databases.createDocument('DB_ID', 'orders', ID.unique(), { total: 99, status: 'new' })
Step 4: Backups
cd /opt/appwrite
docker compose exec mariadb sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' | gzip > /backup/appwrite-$(date +%F).sql.gz
tar czf /backup/appwrite-uploads-$(date +%F).tgz $(docker volume inspect appwrite_appwrite-uploads -f '{{.Mountpoint}}')
Conclusion
Appwrite on a Hong Kong VPS gives mobile and web teams a complete backend without per-request cloud billing. Plan for at least 4 GB RAM because the stack runs many containers.
Self-host your backend: Browse Server.HK Hong Kong VPS plans.