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...
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
- Guide to Deploy ActivePieces on VPS: Open-Source Automation Solution Replacing Zapier and Make
- Guide to Deploy Decentralized Social Platform Lemmy on Cloud VPS with Minimum 2-Core Configuration
- High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways
- Dedicated Compute Servers for AI & Inference Workloads
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.
VPS-4E
10% VAT included
- CPU: 4 vCPU
- RAM: 8 GB
- SSD: 50 GB NVMe
