# Baserow

> Open-source Airtable alternative.

- Category: Productivity & Collaboration
- Difficulty: intermediate
- Components: baserow, postgres, redis
- Tags: baserow, database, airtable, spreadsheet
- Source: https://docker.recipes/productivity/baserow

## Overview

Baserow is an open-source, no-code database platform that provides a user-friendly alternative to Airtable, allowing teams to create collaborative databases, spreadsheets, and applications without programming knowledge. Founded in 2020, Baserow emerged as a response to the need for data sovereignty and customization that proprietary solutions couldn't provide, offering real-time collaboration, custom field types, and automatic API generation for every database created. This Docker stack combines Baserow with PostgreSQL for robust relational data storage and Redis for high-performance caching and session management. PostgreSQL serves as the primary data store, leveraging its ACID compliance and JSON support to handle Baserow's flexible schema requirements, while Redis accelerates user sessions, caches frequently accessed data, and manages real-time collaboration features. Small businesses seeking Airtable alternatives, development teams requiring custom database solutions, and organizations prioritizing data privacy will find this stack particularly valuable. The combination delivers enterprise-grade reliability through PostgreSQL's proven stability, lightning-fast user interactions via Redis caching, and the flexibility to host sensitive data on-premises while maintaining the intuitive interface that makes Baserow accessible to non-technical users.

## Features

- Visual database builder with drag-and-drop interface for creating tables, views, and relationships without SQL knowledge
- Automatic REST API generation for every database and table created, enabling custom integrations and mobile app development
- Real-time collaborative editing with live updates across multiple users and conflict resolution
- PostgreSQL-powered advanced field types including lookups, formulas, file attachments, and relational links between tables
- Redis-accelerated performance for instant loading of large datasets and responsive user interface interactions
- Row-level permissions and team-based access controls with granular sharing options
- Plugin architecture supporting custom field types, views, and integrations through Baserow's extensible framework
- Multi-view support including grid, gallery, kanban, and calendar views with custom filtering and sorting

## Use cases

- Small business CRM replacement for managing customers, leads, and sales pipelines with custom fields and automated workflows
- Project management hub for development teams tracking tasks, sprints, and deliverables with integrated file storage
- Content management system for marketing teams organizing campaigns, assets, and publication schedules
- Inventory management for e-commerce businesses tracking products, suppliers, and stock levels with automated reordering
- Event planning platform coordinating venues, vendors, attendees, and logistics with real-time collaboration
- Research data collection and analysis for academic institutions managing survey responses and experimental data
- HR management system for tracking employee records, performance reviews, and recruitment processes with privacy compliance

## Prerequisites

- Minimum 2GB RAM (4GB recommended) to accommodate PostgreSQL data processing and Redis caching simultaneously
- Ports 80 and 443 available for Baserow web interface and SSL termination
- Basic understanding of database concepts and user permission management
- Docker Compose knowledge for environment variable configuration and volume management
- SSL certificate setup knowledge if deploying with HTTPS in production environments
- Backup strategy planning for PostgreSQL data persistence and disaster recovery

## docker-compose.yml

```yaml
services:
  baserow:
    image: baserow/baserow:latest
    container_name: baserow
    restart: unless-stopped
    environment:
      BASEROW_PUBLIC_URL: http://localhost
      DATABASE_HOST: postgres
      DATABASE_NAME: baserow
      DATABASE_USER: baserow
      DATABASE_PASSWORD: ${DB_PASSWORD}
      REDIS_HOST: redis
      SECRET_KEY: ${SECRET_KEY}
    volumes:
      - baserow_data:/baserow/data
    ports:
      - "80:80"
      - "443:443"
    depends_on:
      - postgres
      - redis
    networks:
      - baserow

  postgres:
    image: postgres:15-alpine
    container_name: baserow-postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: baserow
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: baserow
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - baserow

  redis:
    image: redis:alpine
    container_name: baserow-redis
    restart: unless-stopped
    networks:
      - baserow

volumes:
  baserow_data:
  postgres_data:

networks:
  baserow:
    driver: bridge
```

## .env

```bash
DB_PASSWORD=changeme
SECRET_KEY=generate-a-secret-key
```

## Usage notes

- Access at http://localhost
- No-code database builder
- API auto-generation

## Troubleshooting

- Baserow fails to start with database connection error: Verify DATABASE_HOST matches the PostgreSQL service name and ensure DB_PASSWORD environment variable is properly set
- Redis connection timeout during user sessions: Check Redis container status and verify REDIS_HOST environment variable points to the correct service name
- PostgreSQL data corruption after container restart: Ensure postgres_data volume is properly mounted and has sufficient disk space with appropriate write permissions
- Baserow API requests return 500 errors: Verify SECRET_KEY environment variable is set and consistent across container restarts
- File uploads fail or disappear: Confirm baserow_data volume is correctly mounted to /baserow/data and has adequate storage space
- BASEROW_PUBLIC_URL mismatch causing authentication issues: Update the public URL to match your actual domain or IP address for proper CORS and session handling

