Appwrite Backend Platform
Self-hosted Appwrite backend-as-a-service with databases, auth, storage, and functions.
Overview
Appwrite is an open-source Backend-as-a-Service (BaaS) platform that provides developers with a complete set of APIs and tools for building modern applications. Originally created to simplify backend development, Appwrite offers authentication, database management, file storage, cloud functions, and real-time capabilities through a unified platform with SDKs for web, mobile, and server-side applications. This comprehensive stack combines Appwrite with MariaDB for robust relational data storage, Redis for high-performance caching and session management, InfluxDB for time-series analytics and monitoring data, and Telegraf for metrics collection and forwarding. The integration creates a production-ready backend infrastructure that handles user management, data persistence, real-time subscriptions, and comprehensive monitoring without requiring separate service configurations. This configuration is ideal for development teams building modern web applications, mobile apps, or SaaS platforms who need enterprise-grade backend capabilities without the complexity of managing individual microservices. The combination provides everything from user authentication and database operations to real-time features and system monitoring in a single deployable stack.
Key Features
- Multi-database authentication with OAuth providers, email/password, phone, and anonymous login support
- Real-time subscriptions and WebSocket connections for live data updates across clients
- File storage with automatic image transformations, compression, and CDN capabilities
- Cloud Functions runtime supporting multiple programming languages with event triggers
- MariaDB with Aria storage engine for enhanced crash recovery and improved performance
- Redis-powered session management and real-time collaboration features
- InfluxDB integration for application analytics, user behavior tracking, and performance metrics
- Telegraf-based system monitoring with StatsD protocol support for custom metrics
Common Use Cases
- 1Mobile app backends requiring authentication, push notifications, and offline-first data sync
- 2SaaS applications needing multi-tenant user management with role-based access control
- 3Real-time collaboration platforms with live document editing and user presence indicators
- 4IoT applications collecting sensor data with time-series analysis and alerting capabilities
- 5E-commerce platforms requiring user accounts, product catalogs, and order management
- 6Content management systems with file uploads, image processing, and user-generated content
- 7Gaming backends with leaderboards, user profiles, and real-time multiplayer features
Prerequisites
- Minimum 4GB RAM (2GB for Appwrite, 1GB for MariaDB, 512MB for Redis, 512MB for InfluxDB)
- Docker Engine 20.10+ and Docker Compose 2.0+ installed on the host system
- Ports 80 and 443 available for Appwrite web console and API access
- Basic understanding of REST APIs, authentication flows, and database concepts
- SSL certificate for production deployments with custom domains
- Understanding of time-series data concepts for InfluxDB analytics features
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 appwrite: 3 image: appwrite/appwrite:1.44 container_name: appwrite5 volumes: 6 - appwrite_uploads:/storage/uploads7 - appwrite_cache:/storage/cache8 - appwrite_config:/storage/config9 - appwrite_certs:/storage/certificates10 - appwrite_functions:/storage/functions11 ports: 12 - "80:80"13 - "443:443"14 environment: 15 - _APP_ENV=production16 - _APP_LOCALE=en17 - _APP_CONSOLE_WHITELIST_ROOT=enabled18 - _APP_CONSOLE_WHITELIST_EMAILS=19 - _APP_CONSOLE_WHITELIST_IPS=20 - _APP_SYSTEM_EMAIL_NAME=Appwrite21 - _APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io22 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io23 - _APP_OPTIONS_ABUSE=enabled24 - _APP_OPTIONS_FORCE_HTTPS=disabled25 - _APP_OPENSSL_KEY_V1=${APPWRITE_KEY}26 - _APP_DOMAIN=localhost27 - _APP_DOMAIN_TARGET=localhost28 - _APP_REDIS_HOST=redis29 - _APP_REDIS_PORT=637930 - _APP_DB_HOST=mariadb31 - _APP_DB_PORT=330632 - _APP_DB_SCHEMA=appwrite33 - _APP_DB_USER=${MARIADB_USER}34 - _APP_DB_PASS=${MARIADB_PASSWORD}35 - _APP_INFLUXDB_HOST=influxdb36 - _APP_INFLUXDB_PORT=808637 - _APP_STATSD_HOST=telegraf38 - _APP_STATSD_PORT=812539 depends_on: 40 - mariadb41 - redis42 - influxdb43 networks: 44 - appwrite-network4546 mariadb: 47 image: mariadb:10.1148 container_name: appwrite-mariadb49 environment: 50 - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}51 - MYSQL_DATABASE=appwrite52 - MYSQL_USER=${MARIADB_USER}53 - MYSQL_PASSWORD=${MARIADB_PASSWORD}54 volumes: 55 - mariadb_data:/var/lib/mysql56 networks: 57 - appwrite-network5859 redis: 60 image: redis:7-alpine61 container_name: appwrite-redis62 volumes: 63 - redis_data:/data64 networks: 65 - appwrite-network6667 influxdb: 68 image: influxdb:1.869 container_name: appwrite-influxdb70 volumes: 71 - influxdb_data:/var/lib/influxdb72 networks: 73 - appwrite-network7475 telegraf: 76 image: appwrite/telegraf:1.477 container_name: appwrite-telegraf78 networks: 79 - appwrite-network8081volumes: 82 appwrite_uploads: 83 appwrite_cache: 84 appwrite_config: 85 appwrite_certs: 86 appwrite_functions: 87 mariadb_data: 88 redis_data: 89 influxdb_data: 9091networks: 92 appwrite-network: 93 driver: bridge.env Template
.env
1# Appwrite Backend2APPWRITE_KEY=your-secret-key-min-128-bits3MARIADB_ROOT_PASSWORD=rootpassword4MARIADB_USER=appwrite5MARIADB_PASSWORD=appwrite_passwordUsage Notes
- 1Console at http://localhost
- 2Create account on first visit
- 3SDKs available for web, mobile, server
- 4Supports OAuth providers
- 5Built-in realtime subscriptions
Individual Services(5 services)
Copy individual services to mix and match with your existing compose files.
appwrite
appwrite:
image: appwrite/appwrite:1.4
container_name: appwrite
volumes:
- appwrite_uploads:/storage/uploads
- appwrite_cache:/storage/cache
- appwrite_config:/storage/config
- appwrite_certs:/storage/certificates
- appwrite_functions:/storage/functions
ports:
- "80:80"
- "443:443"
environment:
- _APP_ENV=production
- _APP_LOCALE=en
- _APP_CONSOLE_WHITELIST_ROOT=enabled
- _APP_CONSOLE_WHITELIST_EMAILS=
- _APP_CONSOLE_WHITELIST_IPS=
- _APP_SYSTEM_EMAIL_NAME=Appwrite
- _APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io
- _APP_OPTIONS_ABUSE=enabled
- _APP_OPTIONS_FORCE_HTTPS=disabled
- _APP_OPENSSL_KEY_V1=${APPWRITE_KEY}
- _APP_DOMAIN=localhost
- _APP_DOMAIN_TARGET=localhost
- _APP_REDIS_HOST=redis
- _APP_REDIS_PORT=6379
- _APP_DB_HOST=mariadb
- _APP_DB_PORT=3306
- _APP_DB_SCHEMA=appwrite
- _APP_DB_USER=${MARIADB_USER}
- _APP_DB_PASS=${MARIADB_PASSWORD}
- _APP_INFLUXDB_HOST=influxdb
- _APP_INFLUXDB_PORT=8086
- _APP_STATSD_HOST=telegraf
- _APP_STATSD_PORT=8125
depends_on:
- mariadb
- redis
- influxdb
networks:
- appwrite-network
mariadb
mariadb:
image: mariadb:10.11
container_name: appwrite-mariadb
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MYSQL_DATABASE=appwrite
- MYSQL_USER=${MARIADB_USER}
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
networks:
- appwrite-network
redis
redis:
image: redis:7-alpine
container_name: appwrite-redis
volumes:
- redis_data:/data
networks:
- appwrite-network
influxdb
influxdb:
image: influxdb:1.8
container_name: appwrite-influxdb
volumes:
- influxdb_data:/var/lib/influxdb
networks:
- appwrite-network
telegraf
telegraf:
image: appwrite/telegraf:1.4
container_name: appwrite-telegraf
networks:
- appwrite-network
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 appwrite:5 image: appwrite/appwrite:1.46 container_name: appwrite7 volumes:8 - appwrite_uploads:/storage/uploads9 - appwrite_cache:/storage/cache10 - appwrite_config:/storage/config11 - appwrite_certs:/storage/certificates12 - appwrite_functions:/storage/functions13 ports:14 - "80:80"15 - "443:443"16 environment:17 - _APP_ENV=production18 - _APP_LOCALE=en19 - _APP_CONSOLE_WHITELIST_ROOT=enabled20 - _APP_CONSOLE_WHITELIST_EMAILS=21 - _APP_CONSOLE_WHITELIST_IPS=22 - _APP_SYSTEM_EMAIL_NAME=Appwrite23 - _APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io24 - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io25 - _APP_OPTIONS_ABUSE=enabled26 - _APP_OPTIONS_FORCE_HTTPS=disabled27 - _APP_OPENSSL_KEY_V1=${APPWRITE_KEY}28 - _APP_DOMAIN=localhost29 - _APP_DOMAIN_TARGET=localhost30 - _APP_REDIS_HOST=redis31 - _APP_REDIS_PORT=637932 - _APP_DB_HOST=mariadb33 - _APP_DB_PORT=330634 - _APP_DB_SCHEMA=appwrite35 - _APP_DB_USER=${MARIADB_USER}36 - _APP_DB_PASS=${MARIADB_PASSWORD}37 - _APP_INFLUXDB_HOST=influxdb38 - _APP_INFLUXDB_PORT=808639 - _APP_STATSD_HOST=telegraf40 - _APP_STATSD_PORT=812541 depends_on:42 - mariadb43 - redis44 - influxdb45 networks:46 - appwrite-network4748 mariadb:49 image: mariadb:10.1150 container_name: appwrite-mariadb51 environment:52 - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}53 - MYSQL_DATABASE=appwrite54 - MYSQL_USER=${MARIADB_USER}55 - MYSQL_PASSWORD=${MARIADB_PASSWORD}56 volumes:57 - mariadb_data:/var/lib/mysql58 networks:59 - appwrite-network6061 redis:62 image: redis:7-alpine63 container_name: appwrite-redis64 volumes:65 - redis_data:/data66 networks:67 - appwrite-network6869 influxdb:70 image: influxdb:1.871 container_name: appwrite-influxdb72 volumes:73 - influxdb_data:/var/lib/influxdb74 networks:75 - appwrite-network7677 telegraf:78 image: appwrite/telegraf:1.479 container_name: appwrite-telegraf80 networks:81 - appwrite-network8283volumes:84 appwrite_uploads:85 appwrite_cache:86 appwrite_config:87 appwrite_certs:88 appwrite_functions:89 mariadb_data:90 redis_data:91 influxdb_data:9293networks:94 appwrite-network:95 driver: bridge96EOF9798# 2. Create the .env file99cat > .env << 'EOF'100# Appwrite Backend101APPWRITE_KEY=your-secret-key-min-128-bits102MARIADB_ROOT_PASSWORD=rootpassword103MARIADB_USER=appwrite104MARIADB_PASSWORD=appwrite_password105EOF106107# 3. Start the services108docker compose up -d109110# 4. View logs111docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/appwrite-stack/run | bashTroubleshooting
- Appwrite console shows 'Database connection failed': Verify MariaDB container is running and MARIADB_USER/MARIADB_PASSWORD environment variables match database credentials
- Redis connection errors in Appwrite logs: Check Redis container health and ensure _APP_REDIS_HOST points to 'redis' service name in Docker network
- InfluxDB metrics not appearing: Confirm _APP_INFLUXDB_HOST and _APP_STATSD_HOST environment variables are correctly set to container names
- File upload failures with storage errors: Ensure appwrite_uploads volume has proper write permissions and sufficient disk space available
- Appwrite functions not executing: Verify appwrite_functions volume is mounted and Docker daemon allows container-in-container execution
- MariaDB startup fails with 'Lock wait timeout exceeded': Increase innodb_lock_wait_timeout or restart MariaDB container to clear locked transactions
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
appwritemariadbredisinfluxdbtelegraf
Tags
#appwrite#backend#auth#storage#functions#realtime
Category
Full Web StacksAd Space
Shortcuts: C CopyF FavoriteD Download