Portainer Templates logo

Portainer Templates

Appwrite Appwrite

Stack

Development

Appwrite is a self-hosted backend-as-a-service platform that provides developers with all the core APIs required to build any application.

Configuration

Type
Compose
Platform
linux
Source

Template by xneo1·Source

Services

traefik

Configuration

Image
traefik:2.7
Command
--providers.file.directory=/storage/config,--providers.file.watch=true,--providers.docker=true,--providers.docker.exposedByDefault=false,--providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`),--entrypoints.appwrite_web.address=:80,--entrypoints.appwrite_websecure.address=:443
Ports
80:80443:443
Volumes
/var/run/docker.sock : /var/run/docker.sock/storage/config : /portainer/Files/AppData/Config/appwrite/config/storage/certificates : /portainer/Files/AppData/Config/appwrite/certificates
Restart
unless-stopped

Image details

Pulls: 3.5B
User: library
Created: Apr 06, 2016
Updated: 3 days ago
Status: active

appwrite

Configuration

Image
appwrite/appwrite:1.1.1
Volumes
/storage/uploads : /portainer/Files/AppData/Config/appwrite/uploads/storage/cache : /portainer/Files/AppData/Config/appwrite/appwrite/cache/storage/config : /portainer/Files/AppData/Config/appwrite/config/storage/certificates : /portainer/Files/AppData/Config/appwrite/certificates/storage/functions : /portainer/Files/AppData/Config/appwrite/functions
Env vars
_APP_ENV=production_APP_WORKER_PER_CORE=6_APP_LOCALE=en_APP_CONSOLE_WHITELIST_ROOT=enabled_APP_CONSOLE_WHITELIST_EMAILS=_APP_CONSOLE_WHITELIST_IPS=_APP_SYSTEM_EMAIL_NAME=Appwrite[email protected][email protected]_APP_SYSTEM_RESPONSE_FORMAT=_APP_OPTIONS_ABUSE=enabled_APP_OPTIONS_FORCE_HTTPS=disabled_APP_OPENSSL_KEY_V1=just-a-key_APP_DOMAIN=localhost_APP_DOMAIN_TARGET=localhost_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_DB_ROOT_PASS=rootsecretpassword_APP_SMTP_HOST=_APP_SMTP_PORT=_APP_SMTP_SECURE=_APP_SMTP_USERNAME=_APP_SMTP_PASSWORD=_APP_USAGE_STATS=enabled_APP_INFLUXDB_HOST=influxdb_APP_INFLUXDB_PORT=8086_APP_STORAGE_LIMIT=30000000_APP_STORAGE_PREVIEW_LIMIT=20000000_APP_STORAGE_ANTIVIRUS=disabled_APP_STORAGE_ANTIVIRUS_HOST=clamav_APP_STORAGE_ANTIVIRUS_PORT=3310_APP_STORAGE_DEVICE=Local_APP_STORAGE_S3_ACCESS_KEY=_APP_STORAGE_S3_SECRET=_APP_STORAGE_S3_REGION=us-east-1_APP_STORAGE_S3_BUCKET=_APP_STORAGE_DO_SPACES_ACCESS_KEY=_APP_STORAGE_DO_SPACES_SECRET=_APP_STORAGE_DO_SPACES_REGION=us-east-1_APP_STORAGE_DO_SPACES_BUCKET=_APP_STORAGE_BACKBLAZE_ACCESS_KEY=_APP_STORAGE_BACKBLAZE_SECRET=_APP_STORAGE_BACKBLAZE_REGION=us-west-004_APP_STORAGE_BACKBLAZE_BUCKET=_APP_STORAGE_LINODE_ACCESS_KEY=_APP_STORAGE_LINODE_SECRET=_APP_STORAGE_LINODE_REGION=eu-central-1_APP_STORAGE_LINODE_BUCKET=_APP_STORAGE_WASABI_ACCESS_KEY=_APP_STORAGE_WASABI_SECRET=_APP_STORAGE_WASABI_REGION=eu-central-1_APP_STORAGE_WASABI_BUCKET=_APP_FUNCTIONS_SIZE_LIMIT=30000000_APP_FUNCTIONS_TIMEOUT=900_APP_FUNCTIONS_BUILD_TIMEOUT=900_APP_FUNCTIONS_CONTAINERS=10_APP_FUNCTIONS_CPUS=0_APP_FUNCTIONS_MEMORY=0_APP_FUNCTIONS_MEMORY_SWAP=0_APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0_APP_EXECUTOR_SECRET=your-secret-key_APP_EXECUTOR_HOST=http://appwrite-executor/v1_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes_APP_FUNCTIONS_ENVS=node-16.0,php-7.4,python-3.9,ruby-3.0_APP_FUNCTIONS_INACTIVE_THRESHOLD=60_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=_APP_STATSD_HOST=telegraf_APP_STATSD_PORT=8125_APP_MAINTENANCE_INTERVAL=86400_APP_MAINTENANCE_RETENTION_EXECUTION=1209600_APP_MAINTENANCE_RETENTION_CACHE=2592000_APP_MAINTENANCE_RETENTION_ABUSE=86400_APP_MAINTENANCE_RETENTION_AUDIT=1209600_APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000_APP_SMS_PROVIDER=_APP_SMS_FROM=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-realtime

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
realtime
Env vars
_APP_ENV=production_APP_WORKER_PER_CORE=6_APP_OPTIONS_ABUSE=enabled_APP_OPENSSL_KEY_V1=just-a-key_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_DB_HOST=MARIADB_APP_DB_PORT=3306_APP_DB_SCHEMA=APPWRITE_APP_DB_USER=user_APP_DB_PASS=password_APP_USAGE_STATS=enabled_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-audits

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-audits
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-webhooks

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-webhooks
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key[email protected]_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-deletes

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-deletes
Volumes
/storage/uploads : /portainer/Files/AppData/Config/appwrite/uploads/storage/cache : /portainer/Files/AppData/Config/appwrite/cache/storage/functions : /portainer/Files/AppData/Config/appwrite/functions/storage/builds : /portainer/Files/AppData/Config/appwrite/builds/storage/certificates : /portainer/Files/AppData/Config/appwrite/certificates
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_STORAGE_DEVICE=Local_APP_STORAGE_S3_ACCESS_KEY=_APP_STORAGE_S3_SECRET=_APP_STORAGE_S3_REGION=us-east-1_APP_STORAGE_S3_BUCKET=_APP_STORAGE_DO_SPACES_ACCESS_KEY=_APP_STORAGE_DO_SPACES_SECRET=_APP_STORAGE_DO_SPACES_REGION=us-east-1_APP_STORAGE_DO_SPACES_BUCKET=_APP_STORAGE_BACKBLAZE_ACCESS_KEY=_APP_STORAGE_BACKBLAZE_SECRET=_APP_STORAGE_BACKBLAZE_REGION=us-west-004_APP_STORAGE_BACKBLAZE_BUCKET=_APP_STORAGE_LINODE_ACCESS_KEY=_APP_STORAGE_LINODE_SECRET=_APP_STORAGE_LINODE_REGION=eu-central-1_APP_STORAGE_LINODE_BUCKET=_APP_STORAGE_WASABI_ACCESS_KEY=_APP_STORAGE_WASABI_SECRET=_APP_STORAGE_WASABI_REGION=eu-central-1_APP_STORAGE_WASABI_BUCKET=_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=_APP_EXECUTOR_SECRET=your-secret-key_APP_EXECUTOR_HOST=http://appwrite-executor/v1
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-databases

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-databases
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-builds

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-builds
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_EXECUTOR_SECRET=your-secret-key_APP_EXECUTOR_HOST=http://appwrite-executor/v1_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-certificates

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-certificates
Volumes
/storage/config : /portainer/Files/AppData/Config/appwrite/config/storage/certificates : /portainer/Files/AppData/Config/appwrite/certificates
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_DOMAIN=localhost_APP_DOMAIN_TARGET=localhost[email protected]_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-functions

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-functions
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_FUNCTIONS_TIMEOUT=900_APP_EXECUTOR_SECRET=your-secret-key_APP_EXECUTOR_HOST=http://appwrite-executor/v1_APP_USAGE_STATS=enabledDOCKERHUB_PULL_USERNAME=DOCKERHUB_PULL_PASSWORD=DOCKERHUB_PULL_EMAIL=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-executor

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
executor
Volumes
/var/run/docker.sock : /var/run/docker.sock/storage/functions : /portainer/Files/AppData/Config/appwrite/functions/storage/builds : /portainer/Files/AppData/Config/appwrite/builds/tmp : /portainer/Files/AppData/Config/appwrite/tmp
Env vars
_APP_ENV=production_APP_VERSION=_APP_FUNCTIONS_TIMEOUT=900_APP_FUNCTIONS_BUILD_TIMEOUT=900_APP_FUNCTIONS_CONTAINERS=10_APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0_APP_FUNCTIONS_CPUS=0_APP_FUNCTIONS_MEMORY=0_APP_FUNCTIONS_MEMORY_SWAP=0_APP_FUNCTIONS_INACTIVE_THRESHOLD=60_APP_EXECUTOR_SECRET=your-secret-keyOPEN_RUNTIMES_NETWORK=appwrite_runtimes_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=_APP_STORAGE_DEVICE=Local_APP_STORAGE_S3_ACCESS_KEY=_APP_STORAGE_S3_SECRET=_APP_STORAGE_S3_REGION=us-east-1_APP_STORAGE_S3_BUCKET=_APP_STORAGE_DO_SPACES_ACCESS_KEY=_APP_STORAGE_DO_SPACES_SECRET=_APP_STORAGE_DO_SPACES_REGION=us-east-1_APP_STORAGE_DO_SPACES_BUCKET=_APP_STORAGE_BACKBLAZE_ACCESS_KEY=_APP_STORAGE_BACKBLAZE_SECRET=_APP_STORAGE_BACKBLAZE_REGION=us-west-004_APP_STORAGE_BACKBLAZE_BUCKET=_APP_STORAGE_LINODE_ACCESS_KEY=_APP_STORAGE_LINODE_SECRET=_APP_STORAGE_LINODE_REGION=eu-central-1_APP_STORAGE_LINODE_BUCKET=_APP_STORAGE_WASABI_ACCESS_KEY=_APP_STORAGE_WASABI_SECRET=_APP_STORAGE_WASABI_REGION=eu-central-1_APP_STORAGE_WASABI_BUCKET=DOCKERHUB_PULL_USERNAME=DOCKERHUB_PULL_PASSWORD=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-mails

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-mails
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_SYSTEM_EMAIL_NAME=Appwrite[email protected]_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_SMTP_HOST=_APP_SMTP_PORT=_APP_SMTP_SECURE=_APP_SMTP_USERNAME=_APP_SMTP_PASSWORD=_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-worker-messaging

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
worker-messaging
Env vars
_APP_ENV=production_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_SMS_PROVIDER=_APP_SMS_FROM=_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-maintenance

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
maintenance
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_DOMAIN=localhost_APP_DOMAIN_TARGET=localhost_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=appwrite_APP_DB_USER=user_APP_DB_PASS=password_APP_MAINTENANCE_INTERVAL=86400_APP_MAINTENANCE_RETENTION_EXECUTION=1209600_APP_MAINTENANCE_RETENTION_CACHE=2592000_APP_MAINTENANCE_RETENTION_ABUSE=86400_APP_MAINTENANCE_RETENTION_AUDIT=1209600_APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-usage

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
usage
Env vars
_APP_ENV=production_APP_OPENSSL_KEY_V1=just-a-key_APP_DB_HOST=mariadb_APP_DB_PORT=3306_APP_DB_SCHEMA=APPWRITE_APP_DB_USER=USER_APP_DB_PASS=PASSWORD_APP_INFLUXDB_HOST=influxdb_APP_INFLUXDB_PORT=8086_APP_USAGE_AGGREGATION_INTERVAL=30_APP_USAGE_TIMESERIES_INTERVAL=30_APP_USAGE_DATABASE_INTERVAL=900_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=_APP_LOGGING_PROVIDER=_APP_LOGGING_CONFIG=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

appwrite-schedule

Configuration

Image
appwrite/appwrite:1.1.1
Entrypoint
schedule
Env vars
_APP_ENV=production_APP_REDIS_HOST=redis_APP_REDIS_PORT=6379_APP_REDIS_USER=_APP_REDIS_PASS=
Restart
unless-stopped

Image details

Pulls: 10.5M
User: appwrite
Created: May 11, 2019
Updated: 24 days ago
Status: active

mariadb

Configuration

Image
mariadb:10.7
Command
mysqld --innodb-flush-method=fsync
Volumes
/var/lib/mysql : /portainer/Files/AppData/Config/appwrite/mariadb
Env vars
MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}MYSQL_DATABASE=${_APP_DB_SCHEMA}MYSQL_USER=${_APP_DB_USER}MYSQL_PASSWORD=${_APP_DB_PASS}
Restart
unless-stopped

Image details

Pulls: 3.2B
User: stackbrew
Created: Nov 25, 2014
Updated: 2 days ago
Status: active

redis

Configuration

Image
redis:7.0.4-alpine
Command
redis-server --maxmemory 512mb --maxmemory-policy allkeys-lru --maxmemory-samples 5
Volumes
/data : /portainer/Files/AppData/Config/appwrite/redis
Restart
unless-stopped

Image details

Pulls: 11.1B
User: stackbrew
Created: Jun 05, 2014
Updated: 9 days ago
Status: active

influxdb

Configuration

Image
appwrite/influxdb:1.5.0
Volumes
/var/lib/influxdb : /portainer/Files/AppData/Config/appwrite/influxdb
Restart
unless-stopped

Image details

Pulls: 394k
User: appwrite
Created: Oct 10, 2020
Updated: 4 years ago
Status: active

telegraf

Configuration

Image
appwrite/telegraf:1.4.0
Env vars
_APP_INFLUXDB_HOST=influxdb_APP_INFLUXDB_PORT=3306
Restart
unless-stopped

Image details

Pulls: 3.2M
User: appwrite
Created: Aug 06, 2019
Updated: 4 years ago
Status: active

Standalone Install

Select an install method, to see config/commands for deploying Appwrite

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Appwrite, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

x-logging: &x-logging
  logging:
    driver: 'json-file'
    options:
      max-file: '5'
      max-size: '10m'

services:
  traefik:
    image: traefik:2.7
    container_name: appwrite-traefik
    <<: *x-logging
    command:
      - --providers.file.directory=/storage/config
      - --providers.file.watch=true
      - --providers.docker=true
      - --providers.docker.exposedByDefault=false
      - --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`)
      - --entrypoints.appwrite_web.address=:80
      - --entrypoints.appwrite_websecure.address=:443
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /portainer/Files/AppData/Config/appwrite/config:/storage/config:ro
      - /portainer/Files/AppData/Config/appwrite/certificates:/storage/certificates:ro
    depends_on:
      - appwrite
    networks:
      - gateway
      - appwrite

  appwrite:
    image: appwrite/appwrite:1.1.1
    container_name: appwrite
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    labels:
      - traefik.enable=true
      - traefik.constraint-label-stack=appwrite
      - traefik.docker.network=appwrite
      - traefik.http.services.appwrite_api.loadbalancer.server.port=80
      #http
      - traefik.http.routers.appwrite_api_http.entrypoints=appwrite_web
      - traefik.http.routers.appwrite_api_http.rule=PathPrefix(`/`)
      - traefik.http.routers.appwrite_api_http.service=appwrite_api
      # https
      - traefik.http.routers.appwrite_api_https.entrypoints=appwrite_websecure
      - traefik.http.routers.appwrite_api_https.rule=PathPrefix(`/`)
      - traefik.http.routers.appwrite_api_https.service=appwrite_api
      - traefik.http.routers.appwrite_api_https.tls=true
    volumes:
      - /portainer/Files/AppData/Config/appwrite/uploads:/storage/uploads:rw
      - /portainer/Files/AppData/Config/appwrite/appwrite/cache:/storage/cache:rw
      - /portainer/Files/AppData/Config/appwrite/config:/storage/config:rw
      - /portainer/Files/AppData/Config/appwrite/certificates:/storage/certificates:rw
      - /portainer/Files/AppData/Config/appwrite/functions:/storage/functions:rw
    depends_on:
      - mariadb
      - redis
#      - clamav
      - influxdb
    environment:
      - _APP_ENV=production
      - _APP_WORKER_PER_CORE=6
      - _APP_LOCALE=en
      - _APP_CONSOLE_WHITELIST_ROOT=enabled
      - _APP_CONSOLE_WHITELIST_EMAILS=
      - _APP_CONSOLE_WHITELIST_IPS=
      - _APP_SYSTEM_EMAIL_NAME=Appwrite
      - [email protected]
      - [email protected]
      - _APP_SYSTEM_RESPONSE_FORMAT=
      - _APP_OPTIONS_ABUSE=enabled
      - _APP_OPTIONS_FORCE_HTTPS=disabled
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_DOMAIN=localhost
      - _APP_DOMAIN_TARGET=localhost
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_DB_ROOT_PASS=rootsecretpassword
      - _APP_SMTP_HOST=
      - _APP_SMTP_PORT=
      - _APP_SMTP_SECURE=
      - _APP_SMTP_USERNAME=
      - _APP_SMTP_PASSWORD=
      - _APP_USAGE_STATS=enabled
      - _APP_INFLUXDB_HOST=influxdb
      - _APP_INFLUXDB_PORT=8086
      - _APP_STORAGE_LIMIT=30000000
      - _APP_STORAGE_PREVIEW_LIMIT=20000000
      - _APP_STORAGE_ANTIVIRUS=disabled
      - _APP_STORAGE_ANTIVIRUS_HOST=clamav
      - _APP_STORAGE_ANTIVIRUS_PORT=3310
      - _APP_STORAGE_DEVICE=Local
      - _APP_STORAGE_S3_ACCESS_KEY=
      - _APP_STORAGE_S3_SECRET=
      - _APP_STORAGE_S3_REGION=us-east-1
      - _APP_STORAGE_S3_BUCKET=
      - _APP_STORAGE_DO_SPACES_ACCESS_KEY=
      - _APP_STORAGE_DO_SPACES_SECRET=
      - _APP_STORAGE_DO_SPACES_REGION=us-east-1
      - _APP_STORAGE_DO_SPACES_BUCKET=
      - _APP_STORAGE_BACKBLAZE_ACCESS_KEY=
      - _APP_STORAGE_BACKBLAZE_SECRET=
      - _APP_STORAGE_BACKBLAZE_REGION=us-west-004
      - _APP_STORAGE_BACKBLAZE_BUCKET=
      - _APP_STORAGE_LINODE_ACCESS_KEY=
      - _APP_STORAGE_LINODE_SECRET=
      - _APP_STORAGE_LINODE_REGION=eu-central-1
      - _APP_STORAGE_LINODE_BUCKET=
      - _APP_STORAGE_WASABI_ACCESS_KEY=
      - _APP_STORAGE_WASABI_SECRET=
      - _APP_STORAGE_WASABI_REGION=eu-central-1
      - _APP_STORAGE_WASABI_BUCKET=
      - _APP_FUNCTIONS_SIZE_LIMIT=30000000
      - _APP_FUNCTIONS_TIMEOUT=900
      - _APP_FUNCTIONS_BUILD_TIMEOUT=900
      - _APP_FUNCTIONS_CONTAINERS=10
      - _APP_FUNCTIONS_CPUS=0
      - _APP_FUNCTIONS_MEMORY=0
      - _APP_FUNCTIONS_MEMORY_SWAP=0
      - _APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0
      - _APP_EXECUTOR_SECRET=your-secret-key
      - _APP_EXECUTOR_HOST=http://appwrite-executor/v1
      - _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes
      - _APP_FUNCTIONS_ENVS=node-16.0,php-7.4,python-3.9,ruby-3.0
      - _APP_FUNCTIONS_INACTIVE_THRESHOLD=60
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=
      - _APP_STATSD_HOST=telegraf
      - _APP_STATSD_PORT=8125
      - _APP_MAINTENANCE_INTERVAL=86400
      - _APP_MAINTENANCE_RETENTION_EXECUTION=1209600
      - _APP_MAINTENANCE_RETENTION_CACHE=2592000
      - _APP_MAINTENANCE_RETENTION_ABUSE=86400
      - _APP_MAINTENANCE_RETENTION_AUDIT=1209600
      - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000
      - _APP_SMS_PROVIDER=
      - _APP_SMS_FROM=

  appwrite-realtime:
    image: appwrite/appwrite:1.1.1
    entrypoint: realtime
    container_name: appwrite-realtime
    <<: *x-logging
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.constraint-label-stack=appwrite"
      - "traefik.docker.network=appwrite"
      - "traefik.http.services.appwrite_realtime.loadbalancer.server.port=80"
      #ws
      - traefik.http.routers.appwrite_realtime_ws.entrypoints=appwrite_web
      - traefik.http.routers.appwrite_realtime_ws.rule=PathPrefix(`/v1/realtime`)
      - traefik.http.routers.appwrite_realtime_ws.service=appwrite_realtime
      # wss
      - traefik.http.routers.appwrite_realtime_wss.entrypoints=appwrite_websecure
      - traefik.http.routers.appwrite_realtime_wss.rule=PathPrefix(`/v1/realtime`)
      - traefik.http.routers.appwrite_realtime_wss.service=appwrite_realtime
      - traefik.http.routers.appwrite_realtime_wss.tls=true
      - traefik.http.routers.appwrite_realtime_wss.tls.certresolver=dns
    networks:
      - appwrite
    depends_on:
      - mariadb
      - redis
    environment:
      - _APP_ENV=production
      - _APP_WORKER_PER_CORE=6
      - _APP_OPTIONS_ABUSE=enabled
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_DB_HOST=MARIADB
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=APPWRITE
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_USAGE_STATS=enabled
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-audits:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-audits
    <<: *x-logging
    container_name: appwrite-worker-audits
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-webhooks:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-webhooks
    <<: *x-logging
    container_name: appwrite-worker-webhooks
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - [email protected]
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-deletes:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-deletes
    <<: *x-logging
    container_name: appwrite-worker-deletes
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    volumes: 
      - /portainer/Files/AppData/Config/appwrite/uploads:/storage/uploads:rw
      - /portainer/Files/AppData/Config/appwrite/cache:/storage/cache:rw
      - /portainer/Files/AppData/Config/appwrite/functions:/storage/functions:rw
      - /portainer/Files/AppData/Config/appwrite/builds:/storage/builds:rw
      - /portainer/Files/AppData/Config/appwrite/certificates:/storage/certificates:rw
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_STORAGE_DEVICE=Local
      - _APP_STORAGE_S3_ACCESS_KEY=
      - _APP_STORAGE_S3_SECRET=
      - _APP_STORAGE_S3_REGION=us-east-1
      - _APP_STORAGE_S3_BUCKET=
      - _APP_STORAGE_DO_SPACES_ACCESS_KEY=
      - _APP_STORAGE_DO_SPACES_SECRET=
      - _APP_STORAGE_DO_SPACES_REGION=us-east-1
      - _APP_STORAGE_DO_SPACES_BUCKET=
      - _APP_STORAGE_BACKBLAZE_ACCESS_KEY=
      - _APP_STORAGE_BACKBLAZE_SECRET=
      - _APP_STORAGE_BACKBLAZE_REGION=us-west-004
      - _APP_STORAGE_BACKBLAZE_BUCKET=
      - _APP_STORAGE_LINODE_ACCESS_KEY=
      - _APP_STORAGE_LINODE_SECRET=
      - _APP_STORAGE_LINODE_REGION=eu-central-1
      - _APP_STORAGE_LINODE_BUCKET=
      - _APP_STORAGE_WASABI_ACCESS_KEY=
      - _APP_STORAGE_WASABI_SECRET=
      - _APP_STORAGE_WASABI_REGION=eu-central-1
      - _APP_STORAGE_WASABI_BUCKET=
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=
      - _APP_EXECUTOR_SECRET=your-secret-key
      - _APP_EXECUTOR_HOST=http://appwrite-executor/v1

  appwrite-worker-databases:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-databases
    <<: *x-logging
    container_name: appwrite-worker-databases
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-builds:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-builds
    <<: *x-logging
    container_name: appwrite-worker-builds
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_EXECUTOR_SECRET=your-secret-key
      - _APP_EXECUTOR_HOST=http://appwrite-executor/v1
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-certificates:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-certificates
    <<: *x-logging
    container_name: appwrite-worker-certificates
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    volumes: 
      - /portainer/Files/AppData/Config/appwrite/config:/storage/config:rw
      - /portainer/Files/AppData/Config/appwrite/certificates:/storage/certificates:rw
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_DOMAIN=localhost
      - _APP_DOMAIN_TARGET=localhost
      - [email protected]
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-functions:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-functions
    <<: *x-logging
    container_name: appwrite-worker-functions
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
      - appwrite-executor
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_FUNCTIONS_TIMEOUT=900
      - _APP_EXECUTOR_SECRET=your-secret-key
      - _APP_EXECUTOR_HOST=http://appwrite-executor/v1
      - _APP_USAGE_STATS=enabled
      - DOCKERHUB_PULL_USERNAME=
      - DOCKERHUB_PULL_PASSWORD=
      - DOCKERHUB_PULL_EMAIL=
  appwrite-executor:
    image: appwrite/appwrite:1.1.1
    entrypoint: executor
    <<: *x-logging
    container_name: appwrite-executor
    restart: unless-stopped
    stop_signal: SIGINT
    networks:
      appwrite:
      runtimes:
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /portainer/Files/AppData/Config/appwrite/functions:/storage/functions:rw
      - /portainer/Files/AppData/Config/appwrite/builds:/storage/builds:rw
      - /portainer/Files/AppData/Config/appwrite/tmp:/tmp:rw
    depends_on:
      - redis
      - mariadb
      - appwrite
    environment:
      - _APP_ENV=production
      - _APP_VERSION=
      - _APP_FUNCTIONS_TIMEOUT=900
      - _APP_FUNCTIONS_BUILD_TIMEOUT=900
      - _APP_FUNCTIONS_CONTAINERS=10
      - _APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0
      - _APP_FUNCTIONS_CPUS=0
      - _APP_FUNCTIONS_MEMORY=0
      - _APP_FUNCTIONS_MEMORY_SWAP=0
      - _APP_FUNCTIONS_INACTIVE_THRESHOLD=60
      - _APP_EXECUTOR_SECRET=your-secret-key
      - OPEN_RUNTIMES_NETWORK=appwrite_runtimes
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=
      - _APP_STORAGE_DEVICE=Local
      - _APP_STORAGE_S3_ACCESS_KEY=
      - _APP_STORAGE_S3_SECRET=
      - _APP_STORAGE_S3_REGION=us-east-1
      - _APP_STORAGE_S3_BUCKET=
      - _APP_STORAGE_DO_SPACES_ACCESS_KEY=
      - _APP_STORAGE_DO_SPACES_SECRET=
      - _APP_STORAGE_DO_SPACES_REGION=us-east-1
      - _APP_STORAGE_DO_SPACES_BUCKET=
      - _APP_STORAGE_BACKBLAZE_ACCESS_KEY=
      - _APP_STORAGE_BACKBLAZE_SECRET=
      - _APP_STORAGE_BACKBLAZE_REGION=us-west-004
      - _APP_STORAGE_BACKBLAZE_BUCKET=
      - _APP_STORAGE_LINODE_ACCESS_KEY=
      - _APP_STORAGE_LINODE_SECRET=
      - _APP_STORAGE_LINODE_REGION=eu-central-1
      - _APP_STORAGE_LINODE_BUCKET=
      - _APP_STORAGE_WASABI_ACCESS_KEY=
      - _APP_STORAGE_WASABI_SECRET=
      - _APP_STORAGE_WASABI_REGION=eu-central-1
      - _APP_STORAGE_WASABI_BUCKET=
      - DOCKERHUB_PULL_USERNAME
      - DOCKERHUB_PULL_PASSWORD

  appwrite-worker-mails:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-mails
    <<: *x-logging
    container_name: appwrite-worker-mails
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_SYSTEM_EMAIL_NAME=Appwrite
      - [email protected]
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_SMTP_HOST=
      - _APP_SMTP_PORT=
      - _APP_SMTP_SECURE=
      - _APP_SMTP_USERNAME=
      - _APP_SMTP_PASSWORD=
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-worker-messaging:
    image: appwrite/appwrite:1.1.1
    entrypoint: worker-messaging
    <<: *x-logging
    container_name: appwrite-worker-messaging
    networks:
      - appwrite
    depends_on:
      - redis
    environment:
      - _APP_ENV=production
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_SMS_PROVIDER=
      - _APP_SMS_FROM=
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-maintenance:
    image: appwrite/appwrite:1.1.1
    entrypoint: maintenance
    <<: *x-logging
    container_name: appwrite-maintenance
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_DOMAIN=localhost
      - _APP_DOMAIN_TARGET=localhost
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=appwrite
      - _APP_DB_USER=user
      - _APP_DB_PASS=password
      - _APP_MAINTENANCE_INTERVAL=86400
      - _APP_MAINTENANCE_RETENTION_EXECUTION=1209600
      - _APP_MAINTENANCE_RETENTION_CACHE=2592000
      - _APP_MAINTENANCE_RETENTION_ABUSE=86400
      - _APP_MAINTENANCE_RETENTION_AUDIT=1209600
      - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000
  appwrite-usage:
    image: appwrite/appwrite:1.1.1
    entrypoint: usage
    container_name: appwrite-usage
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - influxdb
      - mariadb
    environment:
      - _APP_ENV=production
      - _APP_OPENSSL_KEY_V1=just-a-key
      - _APP_DB_HOST=mariadb
      - _APP_DB_PORT=3306
      - _APP_DB_SCHEMA=APPWRITE
      - _APP_DB_USER=USER
      - _APP_DB_PASS=PASSWORD
      - _APP_INFLUXDB_HOST=influxdb
      - _APP_INFLUXDB_PORT=8086
      - _APP_USAGE_AGGREGATION_INTERVAL=30
      - _APP_USAGE_TIMESERIES_INTERVAL=30
      - _APP_USAGE_DATABASE_INTERVAL=900
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=
      - _APP_LOGGING_PROVIDER=
      - _APP_LOGGING_CONFIG=

  appwrite-schedule:
    image: appwrite/appwrite:1.1.1
    entrypoint: schedule
    container_name: appwrite-schedule
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    depends_on:
      - redis
    environment:
      - _APP_ENV=production
      - _APP_REDIS_HOST=redis
      - _APP_REDIS_PORT=6379
      - _APP_REDIS_USER=
      - _APP_REDIS_PASS=

  mariadb:
    image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
    container_name: appwrite-mariadb
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    volumes:
      - /portainer/Files/AppData/Config/appwrite/mariadb:/var/lib/mysql:rw
    environment:
      - MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}
      - MYSQL_DATABASE=${_APP_DB_SCHEMA}
      - MYSQL_USER=${_APP_DB_USER}
      - MYSQL_PASSWORD=${_APP_DB_PASS}
    command: 'mysqld --innodb-flush-method=fsync'

  redis:
    image: redis:7.0.4-alpine
    container_name: appwrite-redis
    <<: *x-logging
    restart: unless-stopped
    command: >
      redis-server
      --maxmemory            512mb
      --maxmemory-policy     allkeys-lru
      --maxmemory-samples    5
    networks:
      - appwrite
    volumes:
      - /portainer/Files/AppData/Config/appwrite/redis:/data:rw

  # clamav:
  #   image: appwrite/clamav:1.2.0
  #   container_name: appwrite-clamav
  #   restart: unless-stopped
  #   networks:
  #     - appwrite
  #   volumes:
  #     - /portainer/Files/AppData/Config/appwrite/uploads:/storage/uploads

  influxdb:
    image: appwrite/influxdb:1.5.0
    container_name: appwrite-influxdb
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    volumes:
      - /portainer/Files/AppData/Config/appwrite/influxdb:/var/lib/influxdb:rw

  telegraf:
    image: appwrite/telegraf:1.4.0
    container_name: appwrite-telegraf
    <<: *x-logging
    restart: unless-stopped
    networks:
      - appwrite
    environment: 
      - _APP_INFLUXDB_HOST=influxdb
      - _APP_INFLUXDB_PORT=3306

networks:
  gateway:
  appwrite:
  runtimes:

volumes:
  appwrite-mariadb:
  appwrite-redis:
  appwrite-cache:
  appwrite-uploads:
  appwrite-certificates:
  appwrite-functions:
  appwrite-builds:
  appwrite-influxdb:
  appwrite-config:
  appwrite-executor:

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/appwrite.yml up -d

More install options in our documentation.

Container Documentation

traefik Documentation

Traefik, The Cloud Native Edge Router

appwrite Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-realtime Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-audits Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-webhooks Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-deletes Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-databases Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-builds Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-certificates Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-functions Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-executor Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-mails Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-worker-messaging Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-maintenance Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-usage Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

appwrite-schedule Documentation

End to end backend server for frontend and mobile apps. 👩‍💻👨‍💻

mariadb Documentation

MariaDB Server is a high performing open source relational database, forked from MySQL.

redis Documentation

Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.

telegraf Documentation

Serve Appwrite on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying appwrite.example.com to http://traefik:80

Add this to your Caddyfile

appwrite.example.com {
	reverse_proxy http://traefik:80
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:80 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :80
  • Stop the other service, or pick a different host port. In 80:80 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:80. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, appwrite can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 80

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/appwrite/config (and the same for the other mapped folders)

Can't reach the Docker socket

appwrite talks to Docker through /var/run/docker.sock. If the logs show "permission denied while trying to connect to the Docker daemon socket", the app's user can't access it.

  • Check the socket exists on the host: ls -l /var/run/docker.sock
  • Run the container as root, or add the docker group's id to the container with group_add.

Image won't pull

Test the pull directly on the host: docker pull traefik:2.7

  • "manifest unknown" means the tag no longer exists.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Required settings are blank

_APP_CONSOLE_WHITELIST_EMAILS, _APP_CONSOLE_WHITELIST_IPS, _APP_SYSTEM_RESPONSE_FORMAT, _APP_REDIS_USER, _APP_REDIS_PASS, _APP_SMTP_HOST, _APP_SMTP_PORT, _APP_SMTP_SECURE, _APP_SMTP_USERNAME, _APP_SMTP_PASSWORD, _APP_STORAGE_S3_ACCESS_KEY, _APP_STORAGE_S3_SECRET, _APP_STORAGE_S3_BUCKET, _APP_STORAGE_DO_SPACES_ACCESS_KEY, _APP_STORAGE_DO_SPACES_SECRET, _APP_STORAGE_DO_SPACES_BUCKET, _APP_STORAGE_BACKBLAZE_ACCESS_KEY, _APP_STORAGE_BACKBLAZE_SECRET, _APP_STORAGE_BACKBLAZE_BUCKET, _APP_STORAGE_LINODE_ACCESS_KEY, _APP_STORAGE_LINODE_SECRET, _APP_STORAGE_LINODE_BUCKET, _APP_STORAGE_WASABI_ACCESS_KEY, _APP_STORAGE_WASABI_SECRET, _APP_STORAGE_WASABI_BUCKET, _APP_LOGGING_PROVIDER, _APP_LOGGING_CONFIG, _APP_SMS_PROVIDER, _APP_SMS_FROM, DOCKERHUB_PULL_USERNAME, DOCKERHUB_PULL_PASSWORD, DOCKERHUB_PULL_EMAIL, _APP_VERSION have no default value, and appwrite may crash or misbehave if left empty.

  • Fill them in on the deploy screen before hitting deploy.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Appwrite is a Compose stack, a set of containers (20 of them) defined in one file and brought up together by Portainer, then started and stopped as a single app.

The services

This stack is built from 20 containers that run side by side. Here's each one, with the image it runs and anything it waits for first:

  • traefik runs traefik:2.7, starts after appwrite
  • appwrite runs appwrite/appwrite:1.1.1, starts after mariadb, redis, influxdb
  • appwrite-realtime runs appwrite/appwrite:1.1.1, starts after mariadb, redis
  • appwrite-worker-audits runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-webhooks runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-deletes runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-databases runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-builds runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-certificates runs appwrite/appwrite:1.1.1, starts after redis, mariadb
  • appwrite-worker-functions runs appwrite/appwrite:1.1.1, starts after redis, mariadb, appwrite-executor
  • appwrite-executor runs appwrite/appwrite:1.1.1, starts after redis, mariadb, appwrite
  • appwrite-worker-mails runs appwrite/appwrite:1.1.1, starts after redis
  • appwrite-worker-messaging runs appwrite/appwrite:1.1.1, starts after redis
  • appwrite-maintenance runs appwrite/appwrite:1.1.1, starts after redis
  • appwrite-usage runs appwrite/appwrite:1.1.1, starts after influxdb, mariadb
  • appwrite-schedule runs appwrite/appwrite:1.1.1, starts after redis
  • mariadb runs mariadb:10.7
  • redis runs redis:7.0.4-alpine
  • influxdb runs appwrite/influxdb:1.5.0
  • telegraf runs appwrite/telegraf:1.4.0

Ports

A port is the door the app answers on. A mapping like 80:80 means it's reachable on port 80 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:80 in a browser. It opens:

  • 80:80, likely the web interface
  • 443:443, likely the web interface

Volumes

A volume is where Appwrite keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /var/run/docker.sock from /var/run/docker.sock on the host (a socket it talks to, not storage)
  • /storage/config from /portainer/Files/AppData/Config/appwrite/config on the host
  • /storage/certificates from /portainer/Files/AppData/Config/appwrite/certificates on the host
  • /storage/uploads from /portainer/Files/AppData/Config/appwrite/uploads on the host
  • /storage/cache from /portainer/Files/AppData/Config/appwrite/appwrite/cache on the host
  • /storage/functions from /portainer/Files/AppData/Config/appwrite/functions on the host
  • /storage/cache from /portainer/Files/AppData/Config/appwrite/cache on the host
  • /storage/builds from /portainer/Files/AppData/Config/appwrite/builds on the host
  • /tmp from /portainer/Files/AppData/Config/appwrite/tmp on the host
  • /var/lib/mysql from /portainer/Files/AppData/Config/appwrite/mariadb on the host
  • /data from /portainer/Files/AppData/Config/appwrite/redis on the host
  • /var/lib/influxdb from /portainer/Files/AppData/Config/appwrite/influxdb on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Appwrite takes 96 of them, and 33 need a value before it'll start properly:

  • _APP_ENV, defaults to production
  • _APP_WORKER_PER_CORE, defaults to 6
  • _APP_LOCALE, defaults to en
  • _APP_CONSOLE_WHITELIST_ROOT, defaults to enabled
  • _APP_CONSOLE_WHITELIST_EMAILS, needs a value
  • _APP_CONSOLE_WHITELIST_IPS, needs a value
  • _APP_SYSTEM_EMAIL_NAME, defaults to Appwrite
  • _APP_SYSTEM_EMAIL_ADDRESS, defaults to [email protected]
  • _APP_SYSTEM_SECURITY_EMAIL_ADDRESS, defaults to [email protected]
  • _APP_SYSTEM_RESPONSE_FORMAT, needs a value
  • _APP_OPTIONS_ABUSE, defaults to enabled
  • _APP_OPTIONS_FORCE_HTTPS, defaults to disabled
  • _APP_OPENSSL_KEY_V1, defaults to just-a-key
  • _APP_DOMAIN, defaults to localhost
  • _APP_DOMAIN_TARGET, defaults to localhost
  • _APP_REDIS_HOST, defaults to redis
  • _APP_REDIS_PORT, defaults to 6379
  • _APP_REDIS_USER, needs a value
  • _APP_REDIS_PASS, needs a value
  • _APP_DB_HOST, defaults to mariadb
  • _APP_DB_PORT, defaults to 3306
  • _APP_DB_SCHEMA, defaults to APPWRITE
  • _APP_DB_USER, defaults to USER
  • _APP_DB_PASS, defaults to PASSWORD
  • _APP_DB_ROOT_PASS, defaults to rootsecretpassword
  • _APP_SMTP_HOST, needs a value
  • _APP_SMTP_PORT, needs a value
  • _APP_SMTP_SECURE, needs a value
  • _APP_SMTP_USERNAME, needs a value
  • _APP_SMTP_PASSWORD, needs a value
  • _APP_USAGE_STATS, defaults to enabled
  • _APP_INFLUXDB_HOST, defaults to influxdb
  • _APP_INFLUXDB_PORT, defaults to 3306
  • _APP_STORAGE_LIMIT, defaults to 30000000
  • _APP_STORAGE_PREVIEW_LIMIT, defaults to 20000000
  • _APP_STORAGE_ANTIVIRUS, defaults to disabled
  • _APP_STORAGE_ANTIVIRUS_HOST, defaults to clamav
  • _APP_STORAGE_ANTIVIRUS_PORT, defaults to 3310
  • _APP_STORAGE_DEVICE, defaults to Local
  • _APP_STORAGE_S3_ACCESS_KEY, needs a value
  • _APP_STORAGE_S3_SECRET, needs a value
  • _APP_STORAGE_S3_REGION, defaults to us-east-1
  • _APP_STORAGE_S3_BUCKET, needs a value
  • _APP_STORAGE_DO_SPACES_ACCESS_KEY, needs a value
  • _APP_STORAGE_DO_SPACES_SECRET, needs a value
  • _APP_STORAGE_DO_SPACES_REGION, defaults to us-east-1
  • _APP_STORAGE_DO_SPACES_BUCKET, needs a value
  • _APP_STORAGE_BACKBLAZE_ACCESS_KEY, needs a value
  • _APP_STORAGE_BACKBLAZE_SECRET, needs a value
  • _APP_STORAGE_BACKBLAZE_REGION, defaults to us-west-004
  • _APP_STORAGE_BACKBLAZE_BUCKET, needs a value
  • _APP_STORAGE_LINODE_ACCESS_KEY, needs a value
  • _APP_STORAGE_LINODE_SECRET, needs a value
  • _APP_STORAGE_LINODE_REGION, defaults to eu-central-1
  • _APP_STORAGE_LINODE_BUCKET, needs a value
  • _APP_STORAGE_WASABI_ACCESS_KEY, needs a value
  • _APP_STORAGE_WASABI_SECRET, needs a value
  • _APP_STORAGE_WASABI_REGION, defaults to eu-central-1
  • _APP_STORAGE_WASABI_BUCKET, needs a value
  • _APP_FUNCTIONS_SIZE_LIMIT, defaults to 30000000
  • _APP_FUNCTIONS_TIMEOUT, defaults to 900
  • _APP_FUNCTIONS_BUILD_TIMEOUT, defaults to 900
  • _APP_FUNCTIONS_CONTAINERS, defaults to 10
  • _APP_FUNCTIONS_CPUS, defaults to 0
  • _APP_FUNCTIONS_MEMORY, defaults to 0
  • _APP_FUNCTIONS_MEMORY_SWAP, defaults to 0
  • _APP_FUNCTIONS_RUNTIMES, defaults to node-16.0,php-8.0,python-3.9,ruby-3.0
  • _APP_EXECUTOR_SECRET, defaults to your-secret-key
  • _APP_EXECUTOR_HOST, defaults to http://appwrite-executor/v1
  • _APP_EXECUTOR_RUNTIME_NETWORK, defaults to appwrite_runtimes
  • _APP_FUNCTIONS_ENVS, defaults to node-16.0,php-7.4,python-3.9,ruby-3.0
  • _APP_FUNCTIONS_INACTIVE_THRESHOLD, defaults to 60
  • _APP_LOGGING_PROVIDER, needs a value
  • _APP_LOGGING_CONFIG, needs a value
  • _APP_STATSD_HOST, defaults to telegraf
  • _APP_STATSD_PORT, defaults to 8125
  • _APP_MAINTENANCE_INTERVAL, defaults to 86400
  • _APP_MAINTENANCE_RETENTION_EXECUTION, defaults to 1209600
  • _APP_MAINTENANCE_RETENTION_CACHE, defaults to 2592000
  • _APP_MAINTENANCE_RETENTION_ABUSE, defaults to 86400
  • _APP_MAINTENANCE_RETENTION_AUDIT, defaults to 1209600
  • _APP_MAINTENANCE_RETENTION_USAGE_HOURLY, defaults to 8640000
  • _APP_SMS_PROVIDER, needs a value
  • _APP_SMS_FROM, needs a value
  • DOCKERHUB_PULL_USERNAME, needs a value
  • DOCKERHUB_PULL_PASSWORD, needs a value
  • DOCKERHUB_PULL_EMAIL, needs a value
  • _APP_VERSION, needs a value
  • OPEN_RUNTIMES_NETWORK, defaults to appwrite_runtimes
  • _APP_USAGE_AGGREGATION_INTERVAL, defaults to 30
  • _APP_USAGE_TIMESERIES_INTERVAL, defaults to 30
  • _APP_USAGE_DATABASE_INTERVAL, defaults to 900
  • MYSQL_ROOT_PASSWORD, pulled from your own environment
  • MYSQL_DATABASE, pulled from your own environment
  • MYSQL_USER, pulled from your own environment
  • MYSQL_PASSWORD, pulled from your own environment

Restart policy

The restart policy here is unless-stopped, so Docker restarts Appwrite after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Portainer puts these services on one shared private network, so they can find each other by name (like traefik) while only the ports above are open to you.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Appwrite up. Add the template list to Portainer once, then deploying Appwrite is a click rather than a wall of config.