Team Collaboration Stack
Complete team platform with Mattermost chat, Outline wiki, and MinIO file storage
Overview
Mattermost is an open-source team messaging platform designed as a Slack alternative, offering enterprise-grade security and self-hosted deployment. Originally developed by SpinPunch in 2016, Mattermost has become the go-to solution for organizations requiring full control over their communication data while maintaining modern chat functionality including channels, direct messages, file sharing, and extensive integrations. This stack combines Mattermost with Outline wiki for knowledge management and MinIO for S3-compatible object storage, creating a comprehensive team collaboration environment. The integration leverages PostgreSQL databases for both Mattermost and Outline, with Redis providing session management and caching for Outline, while MinIO handles file attachments and media storage across both platforms. This combination addresses the core challenge of fragmented team tools by providing chat, documentation, and file storage in a unified, self-hosted environment. Small to medium businesses, development teams, and organizations with strict data sovereignty requirements will find this stack particularly valuable, as it eliminates the need for multiple SaaS subscriptions while providing enterprise-level collaboration features under complete organizational control.
Key Features
- Mattermost Team Edition with unlimited users and message history
- Outline wiki with real-time collaborative editing and markdown support
- S3-compatible MinIO storage for file attachments and media across both platforms
- PostgreSQL databases providing ACID compliance for message and document integrity
- Redis-powered caching for improved Outline performance and session management
- Mattermost plugin ecosystem supporting custom integrations and bots
- Outline's advanced search capabilities across all team documentation
- MinIO web console for direct file management and bucket administration
Common Use Cases
- 1Software development teams needing chat, documentation, and code artifact storage
- 2Healthcare organizations requiring HIPAA-compliant team communication and knowledge base
- 3Educational institutions wanting student collaboration tools without data sharing concerns
- 4Government agencies needing secure internal communication and document management
- 5Remote-first companies building comprehensive digital workplace infrastructure
- 6IT departments replacing multiple SaaS tools with self-hosted alternatives
- 7Startups requiring professional team tools without recurring subscription costs
Prerequisites
- Minimum 4GB RAM (2GB for MinIO, 1GB each for PostgreSQL instances, remainder for other services)
- Available ports 3000, 8065, 9000, and 9001 on the host system
- Environment variables configured for database credentials and MinIO access keys
- Basic understanding of Mattermost team setup and user management
- Familiarity with S3 bucket concepts for MinIO storage configuration
- PostgreSQL administration knowledge for database maintenance and backups
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 mattermost: 3 image: mattermost/mattermost-team-edition:latest4 container_name: mattermost5 restart: unless-stopped6 ports: 7 - "${MM_PORT:-8065}:8065"8 environment: 9 - TZ=${TZ:-UTC}10 - MM_SQLSETTINGS_DRIVERNAME=postgres11 - MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable12 - MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}13 volumes: 14 - mattermost_data:/mattermost/data15 - mattermost_logs:/mattermost/logs16 - mattermost_config:/mattermost/config17 - mattermost_plugins:/mattermost/plugins18 depends_on: 19 - mattermost-db2021 mattermost-db: 22 image: postgres:15-alpine23 container_name: mattermost-db24 restart: unless-stopped25 environment: 26 - POSTGRES_USER=${DB_USER}27 - POSTGRES_PASSWORD=${DB_PASSWORD}28 - POSTGRES_DB=mattermost29 volumes: 30 - mattermost_db_data:/var/lib/postgresql/data3132 outline: 33 image: outlinewiki/outline:latest34 container_name: outline35 restart: unless-stopped36 ports: 37 - "${OUTLINE_PORT:-3000}:3000"38 environment: 39 - SECRET_KEY=${OUTLINE_SECRET}40 - UTILS_SECRET=${OUTLINE_UTILS_SECRET}41 - DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline42 - REDIS_URL=redis://outline-redis:637943 - URL=http://localhost:${OUTLINE_PORT:-3000}44 - AWS_ACCESS_KEY_ID=${MINIO_USER}45 - AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}46 - AWS_S3_UPLOAD_BUCKET_URL=http://minio:900047 - AWS_S3_UPLOAD_BUCKET_NAME=outline48 depends_on: 49 - outline-db50 - outline-redis51 - minio5253 outline-db: 54 image: postgres:15-alpine55 container_name: outline-db56 restart: unless-stopped57 environment: 58 - POSTGRES_USER=${DB_USER}59 - POSTGRES_PASSWORD=${DB_PASSWORD}60 - POSTGRES_DB=outline61 volumes: 62 - outline_db_data:/var/lib/postgresql/data6364 outline-redis: 65 image: redis:7-alpine66 container_name: outline-redis67 restart: unless-stopped6869 minio: 70 image: minio/minio:latest71 container_name: collab-minio72 restart: unless-stopped73 ports: 74 - "${MINIO_PORT:-9000}:9000"75 - "${MINIO_CONSOLE:-9001}:9001"76 environment: 77 - MINIO_ROOT_USER=${MINIO_USER}78 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}79 volumes: 80 - minio_data:/data81 command: server /data --console-address ":9001"8283volumes: 84 mattermost_data: 85 mattermost_logs: 86 mattermost_config: 87 mattermost_plugins: 88 mattermost_db_data: 89 outline_db_data: 90 minio_data: .env Template
.env
1# Team Collaboration Stack2MM_PORT=80653OUTLINE_PORT=30004MINIO_PORT=90005MINIO_CONSOLE=90016TZ=UTC78# Database9DB_USER=collab10DB_PASSWORD=collab_password1112# Outline secrets (generate with: openssl rand -hex 32)13OUTLINE_SECRET=your-secret-key14OUTLINE_UTILS_SECRET=your-utils-secret1516# MinIO17MINIO_USER=minioadmin18MINIO_PASSWORD=minioadminUsage Notes
- 1Mattermost at http://localhost:8065 (create team)
- 2Outline wiki at http://localhost:3000
- 3MinIO Console at http://localhost:9001
- 4Configure SSO between Mattermost and Outline
- 5Create 'outline' bucket in MinIO for attachments
- 6Mattermost supports Slack-like integrations
Individual Services(6 services)
Copy individual services to mix and match with your existing compose files.
mattermost
mattermost:
image: mattermost/mattermost-team-edition:latest
container_name: mattermost
restart: unless-stopped
ports:
- ${MM_PORT:-8065}:8065
environment:
- TZ=${TZ:-UTC}
- MM_SQLSETTINGS_DRIVERNAME=postgres
- MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable
- MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}
volumes:
- mattermost_data:/mattermost/data
- mattermost_logs:/mattermost/logs
- mattermost_config:/mattermost/config
- mattermost_plugins:/mattermost/plugins
depends_on:
- mattermost-db
mattermost-db
mattermost-db:
image: postgres:15-alpine
container_name: mattermost-db
restart: unless-stopped
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=mattermost
volumes:
- mattermost_db_data:/var/lib/postgresql/data
outline
outline:
image: outlinewiki/outline:latest
container_name: outline
restart: unless-stopped
ports:
- ${OUTLINE_PORT:-3000}:3000
environment:
- SECRET_KEY=${OUTLINE_SECRET}
- UTILS_SECRET=${OUTLINE_UTILS_SECRET}
- DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline
- REDIS_URL=redis://outline-redis:6379
- URL=http://localhost:${OUTLINE_PORT:-3000}
- AWS_ACCESS_KEY_ID=${MINIO_USER}
- AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}
- AWS_S3_UPLOAD_BUCKET_URL=http://minio:9000
- AWS_S3_UPLOAD_BUCKET_NAME=outline
depends_on:
- outline-db
- outline-redis
- minio
outline-db
outline-db:
image: postgres:15-alpine
container_name: outline-db
restart: unless-stopped
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=outline
volumes:
- outline_db_data:/var/lib/postgresql/data
outline-redis
outline-redis:
image: redis:7-alpine
container_name: outline-redis
restart: unless-stopped
minio
minio:
image: minio/minio:latest
container_name: collab-minio
restart: unless-stopped
ports:
- ${MINIO_PORT:-9000}:9000
- ${MINIO_CONSOLE:-9001}:9001
environment:
- MINIO_ROOT_USER=${MINIO_USER}
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 mattermost:5 image: mattermost/mattermost-team-edition:latest6 container_name: mattermost7 restart: unless-stopped8 ports:9 - "${MM_PORT:-8065}:8065"10 environment:11 - TZ=${TZ:-UTC}12 - MM_SQLSETTINGS_DRIVERNAME=postgres13 - MM_SQLSETTINGS_DATASOURCE=postgres://${DB_USER}:${DB_PASSWORD}@mattermost-db:5432/mattermost?sslmode=disable14 - MM_SERVICESETTINGS_SITEURL=http://localhost:${MM_PORT:-8065}15 volumes:16 - mattermost_data:/mattermost/data17 - mattermost_logs:/mattermost/logs18 - mattermost_config:/mattermost/config19 - mattermost_plugins:/mattermost/plugins20 depends_on:21 - mattermost-db2223 mattermost-db:24 image: postgres:15-alpine25 container_name: mattermost-db26 restart: unless-stopped27 environment:28 - POSTGRES_USER=${DB_USER}29 - POSTGRES_PASSWORD=${DB_PASSWORD}30 - POSTGRES_DB=mattermost31 volumes:32 - mattermost_db_data:/var/lib/postgresql/data3334 outline:35 image: outlinewiki/outline:latest36 container_name: outline37 restart: unless-stopped38 ports:39 - "${OUTLINE_PORT:-3000}:3000"40 environment:41 - SECRET_KEY=${OUTLINE_SECRET}42 - UTILS_SECRET=${OUTLINE_UTILS_SECRET}43 - DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@outline-db:5432/outline44 - REDIS_URL=redis://outline-redis:637945 - URL=http://localhost:${OUTLINE_PORT:-3000}46 - AWS_ACCESS_KEY_ID=${MINIO_USER}47 - AWS_SECRET_ACCESS_KEY=${MINIO_PASSWORD}48 - AWS_S3_UPLOAD_BUCKET_URL=http://minio:900049 - AWS_S3_UPLOAD_BUCKET_NAME=outline50 depends_on:51 - outline-db52 - outline-redis53 - minio5455 outline-db:56 image: postgres:15-alpine57 container_name: outline-db58 restart: unless-stopped59 environment:60 - POSTGRES_USER=${DB_USER}61 - POSTGRES_PASSWORD=${DB_PASSWORD}62 - POSTGRES_DB=outline63 volumes:64 - outline_db_data:/var/lib/postgresql/data6566 outline-redis:67 image: redis:7-alpine68 container_name: outline-redis69 restart: unless-stopped7071 minio:72 image: minio/minio:latest73 container_name: collab-minio74 restart: unless-stopped75 ports:76 - "${MINIO_PORT:-9000}:9000"77 - "${MINIO_CONSOLE:-9001}:9001"78 environment:79 - MINIO_ROOT_USER=${MINIO_USER}80 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}81 volumes:82 - minio_data:/data83 command: server /data --console-address ":9001"8485volumes:86 mattermost_data:87 mattermost_logs:88 mattermost_config:89 mattermost_plugins:90 mattermost_db_data:91 outline_db_data:92 minio_data:93EOF9495# 2. Create the .env file96cat > .env << 'EOF'97# Team Collaboration Stack98MM_PORT=806599OUTLINE_PORT=3000100MINIO_PORT=9000101MINIO_CONSOLE=9001102TZ=UTC103104# Database105DB_USER=collab106DB_PASSWORD=collab_password107108# Outline secrets (generate with: openssl rand -hex 32)109OUTLINE_SECRET=your-secret-key110OUTLINE_UTILS_SECRET=your-utils-secret111112# MinIO113MINIO_USER=minioadmin114MINIO_PASSWORD=minioadmin115EOF116117# 3. Start the services118docker compose up -d119120# 4. View logs121docker 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/team-collaboration-stack/run | bashTroubleshooting
- Mattermost shows database connection error: Ensure mattermost-db container is fully started before Mattermost, check DB_USER and DB_PASSWORD variables match
- Outline fails to load with 'Redis connection failed': Verify outline-redis container is running and accessible, restart outline service if Redis was restarted
- File uploads fail in Outline: Check MinIO container is running, verify MINIO_USER and MINIO_PASSWORD match AWS credentials in Outline configuration
- MinIO console shows 'outline' bucket missing: Manually create the 'outline' bucket through MinIO console at localhost:9001 before uploading files
- Mattermost performance degrades over time: Monitor PostgreSQL container memory usage, consider increasing shared_buffers and work_mem settings
- Outline wiki shows 'Database migration failed': Stop Outline container, ensure outline-db is running and accessible, then restart Outline to retry migrations
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
mattermostoutlinepostgresredisminio
Tags
#mattermost#chat#wiki#outline#collaboration#team
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download