Back to articles
AI & Cloud

Guide to Deploy Penpot on Docker Swarm: Open-Source Design Solution with High Availability

Detailed guide to deploy Penpot on Docker Swarm for a high-availability self-hosted graphic design platform, covering configuration, installation, authentication, and operational...

DPTCloud Engineering4 min read
Guide to Deploy Penpot on Docker Swarm: Open-Source Design Solution with High Availability

Image credit: Kranich17 · Pixabay Content License

Introduction to Penpot and Docker Swarm

Penpot is an open-source graphic design platform compatible with Figma, enabling users to create and share vector designs, user interfaces (UI), and user experiences (UX) online. With its open architecture and strong integration capabilities, Penpot is ideal for organizations seeking to self-host their design workflows without relying on closed platforms.

Docker Swarm is Docker’s leading container orchestration solution, allowing the deployment and operation of distributed applications across multiple servers (nodes) with high availability. Combining Penpot with Docker Swarm enables the construction of a self-hosted, scalable, stable, and easy-to-maintain graphic design system.

Requirements and Environment Preparation

To deploy Penpot on Docker Swarm, you need:

  • At least 3 Linux servers (Ubuntu 20.04/22.04 or CentOS 8)
  • Docker Engine version 20.10 or higher installed on all nodes
  • Docker Swarm initialized (one node as manager, others as workers)
  • Required ports open (80, 443, 5432, 6379)
  • A public domain name or IP address for Penpot access

Deploying Penpot on Docker Swarm

We use docker-compose.yml to define the services required for Penpot. Below is a basic configuration example:

version: '3.8'

services:
  postgres:
    image: postgres:14
    environment:
      POSTGRES_DB: penpot
      POSTGRES_USER: penpot
      POSTGRES_PASSWORD: penpotpassword
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - penpot-network

  redis:
    image: redis:6-alpine
    command: redis-server --requirepass penpotpassword
    environment:
      REDIS_PASSWORD: penpotpassword
    networks:
      - penpot-network

  penpot:
    image: penpot/penpot:latest
    ports:
      - "80:80"
      - "443:443"
    environment:
      - DATABASE_URL=postgresql://penpot:penpotpassword@postgres:5432/penpot
      - REDIS_URL=redis://penpotpassword@redis:6379/0
      - SECRET_KEY_BASE=your-secret-key-base
      - RAILS_SERVE_STATIC_FILES=true
      - RAILS_LOG_TO_STDOUT=true
    depends_on:
      - postgres
      - redis
    networks:
      - penpot-network
    deploy:
      replicas: 2
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.role == worker

volumes:
  postgres_data:

networks:
  penpot-network:
    driver: overlay

To deploy, save this file as docker-compose.yml and run:

docker stack deploy -c docker-compose.yml penpot

Authentication and Operational Validation

After deployment, you can verify functionality by accessing the manager node's IP or domain via a web browser. Penpot will automatically create the first account if none exists.

To authenticate and check service status:

docker stack ps penpot

To test high availability, stop a worker node and verify Penpot continues running on the remaining node.

Troubleshooting and Maintenance

  • Penpot fails to start: Check logs with docker service logs penpot_penpot
  • Cannot connect to PostgreSQL: Ensure port 5432 is open and PostgreSQL is running
  • Redis not working: Verify Redis password and service connectivity
  • 502 Bad Gateway error: Check reverse proxy configuration (if used) and container status

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478