Deployment guide

DrawDB on VPS — open-source ERD editor for SQL schema design

Deploy on a VPS Cloud →

Self-hosting6 min read

DrawDB on VPS — open-source ERD editor for SQL schema design

Every new project starts with the same question: what does my database schema look like? DrawDB (AGPL-3.0, 39 k+ stars) answers without ceremony: a lightweight web interface, deployable in one click on your VPS, that gives you a canvas to draw your tables, trace your relationships and export SQL DDL to five engines — MySQL, PostgreSQL, SQLite, MariaDB and SQL Server. No SaaS account, no diagram quota, no data leaving your infrastructure.

Why self-host a schema editor

SaaS tools like dbdiagram.io, Lucidchart or draw.io store your data models on their servers. For schemas that touch confidential business logic, billing or personal data (GDPR), that's an unnecessary risk. DrawDB runs in a 30 MB Nginx container on your VPS: the interface executes entirely in the browser, data stays in client-side localStorage, and the server never sees your tables. You get a sovereign modelling tool, accessible only to your team, that co-exists frictionlessly on any existing 512 MB VPS.

What you get with self-hosted DrawDB

  • Visual table editor — create entities with columns, types, constraints (PK, FK, NOT NULL, UNIQUE, DEFAULT) and indexes by drag and drop.
  • Multi-dialect SQL export — DDL for MySQL, PostgreSQL, SQLite, MariaDB and SQL Server from the same diagram in one click.
  • SQL import — paste existing CREATE TABLE statements to reconstruct the ERD graph instantly.
  • Visual FK relationships — draw links between columns; DrawDB manages ON DELETE, ON UPDATE and referenced-column validation.
  • PNG / SVG / JSON export — share an image for documentation or commit the JSON to Git to version the schema.
  • No server-side database — state lives in localStorage; the Nginx container processes no data.
  • ~30 MB Docker image, a few MB of RAM — deployable on any VPS without impacting other services.
  • AGPL-3.0 — open source, no telemetry, no account required.

Prerequisites

A ServOrbit VPS with Ubuntu 24.04 and at least 512 MB RAM. Docker and Docker Compose are provisioned automatically during marketplace deployment. No domain name is required — DrawDB is accessible directly on port 3060, though placing it behind a reverse proxy with HTTPS is recommended for secure remote access.

Deploy DrawDB on your VPS

01

One-click deployment from the marketplace

Open your ServOrbit control panel, go to Marketplace → Development → DrawDB, and click Deploy. Docker pulls ghcr.io/drawdb-io/drawdb:latest and starts Nginx. The interface is available in under 10 seconds — no wizard, no configuration files.

02

Access the interface

If a domain is attached, open https://your-domain — the reverse proxy and HTTPS are already in place. Without a domain, open an SSH tunnel (ssh -L 3060:127.0.0.1:3060 root@<your-vps-ip>) then browse to http://localhost:3060 (3060 is the catalogue port; use the port shown on your app card in the ServOrbit client area). DrawDB opens directly on the canvas — no login required.

03

Create your first ERD

Click Add table to create your first entity. Name the table, add your columns (name, type, nullable, default value) and set the PRIMARY KEY. Repeat for each entity. Activate the Relationship tool and draw a line between two columns to create a FOREIGN KEY — DrawDB validates referenced columns and prompts for ON DELETE / ON UPDATE rules.

04

Export and version

Click Export → SQL, select your dialect (MySQL, PostgreSQL, SQLite, MariaDB or SQL Server) and copy the DDL into your migration file. For documentation, export to PNG or SVG. To version the schema, export to JSON and commit to your repository — each schema change becomes a readable Git diff.

Tip: version your schema in Git

Regularly export the DrawDB diagram to JSON (File → Export → JSON) and commit it to your repository alongside your migration files. Each schema PR becomes a readable diff: reviewers see exactly which tables and columns change without having to compare raw SQL DDL.

Common use cases

Before a migration: model the new schema in DrawDB, share the link with your team, collectively adjust types and constraints, then export the DDL directly into your Laravel or Django migration file. Documenting a legacy database: paste the CREATE TABLE statements into SQL import to generate the ERD graph in seconds, export to PNG and embed it in your README or wiki. Onboarding: share your DrawDB instance URL with new developers — they immediately visualise entities, relationships and constraints without direct access to the production database.

Deploy your infrastructure today

VPS Cloud. Preconfigured environments available.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.