Skip to content

Coolify Deployment

MilestoneStatus
Phase 1 — Monorepo + Git setupDone
Phase 2 — Coolify + single tenant (Brinxx)Done
Phase 2b — Magic Access + MonitoringDone
Phase 3 — Feature flag integrationDone
Phase 4 — N8N, Agents, Redis, Supporting ServicesDone (2026-03-25)
Phase 5a — Internal commerce tenants (dev, demo, default, master)Done (2026-03-25)
Phase 5b — Client commerce tenants (bovisales, jodasign, logohorloge, spranz)Done (2026-03-26)
Phase 5c — Backend-only tenants (desluis, toolvizion)Done (2026-03-26)
Phase 6 — PIM system migrationDone (2026-03-26)
Phase 7 — Portal + MySQL migrationDone (2026-03-26)
Phase 8 — Business services (Connector, Contact)Done (2026-03-26)
Phase 9 — Tools (Editor, 3D, Logo, Modal, Moodshot, Resize)Done (2026-03-26)
Phase 10 — DNS cutover + decommission old serverPlanned
Preview DeploymentsDone (2026-03-29)

Developer opens PR #42 on midego1/Magic-e-VERSE
GitHub App webhook → Coolify
├── Builds preview container from PR branch
├── Assigns preview domain via Traefik
Preview available at:
Backend: pr-42.admin-development.magicomniverse.online
Storefront: pr-42.development.magicomniverse.online
PR closed/merged → Coolify cleans up preview
AppRepoPreview URL Pattern
development-backendMagic-e-VERSEpr-{id}.admin-development.magicomniverse.online
development-storefrontMagic-e-VERSEpr-{id}.development.magicomniverse.online
master-backendMagic-e-VERSEpr-{id}.admin-master.magicomniverse.online
magic-monitorMagic-Monitorpr-{id}.monitor.magicomniverse.online
portalMagic-Portalpr-{id}.portal.magicomniverse.online
pim-backendMagic-PIMpr-{id}.pim.magicomniverse.online
price-importMagic-Price-Importpr-{id}.price-import.magicomniverse.online

All preview URLs resolve automatically via the existing *.magicomniverse.online wildcard DNS record pointing to 159.195.68.41.

The Coolify webhook endpoint is routed via /data/coolify/proxy/dynamic/coolify-webhook.yaml. This file also makes the Coolify dashboard accessible at https://coolify.magicomniverse.online.

DetailValue
App namemagic-everse-coolify
App ID3171127
Installation ID118592927
Eventspush, pull_request
Permissionscontents:read, pull_requests:write, metadata:read, administration:read
Manage reposhttps://github.com/settings/installations/118592927

DetailValue
ProviderContabo VPS
IP159.195.68.41
OSDebian 13 (Trixie)
CPU12 cores
RAM32 GB
Disk1 TB (965 GB free)
SSHroot@159.195.68.41

DetailValue
URLhttps://coolify.magicomniverse.online
Emailadmin@magicomniverse.online
PasswordSee Vaultwarden
API TokenSee Vaultwarden

DomainPoints to
*.magicomniverse.online159.195.68.41

ServiceURLStatus
Storefronthttps://brinxx.magicomniverse.onlineLive
Admin Panelhttps://admin-brinxx.magicomniverse.online/appLive
Backend APIhttps://admin-brinxx.magicomniverse.onlineLive
ResourceUUID
Backend Apples7duuk6opipbl38vvq35il
Storefront Appjkm70m01bv0uf9xqwa6leu8j
PostgreSQLypigwo3w0yteib6qscn4gs3t
Redisvh8unk1tbyqxoxncrvjt1ucm
DetailValue
Hostypigwo3w0yteib6qscn4gs3t (internal Docker)
Port5432
Databasemagic_b2b_brinxx
CredentialsSee Vaultwarden
DetailValue
Hostvh8unk1tbyqxoxncrvjt1ucm (internal Docker)
Port6379
CredentialsSee Vaultwarden

Product images and uploads are stored on the host filesystem and mounted into the backend container:

Host PathContainer PathSize
/data/magic-commerce/brinxx/static-products/app/static/products~28 GB
/data/magic-commerce/brinxx/uploads/app/uploads~3.8 GB

Image breakdown by supplier:

SupplierFilesSize
xdconnect~93K11 GB
midocean~53K9.1 GB
pfconcept~155K2.6 GB
spranz~4.3K1.4 GB
langenberg~1.6K475 MB
moxz54147 MB

DetailValue
Repogithub.com/midego1/magic-commerce
Branchmain
AuthGitHub PAT embedded in Coolify git URL
StructureMonorepo: backend/ (Medusa v2) + storefront/ (Next.js 15) + tenants/ (config)

┌─────────────────────────────────────────────────┐
│ Coolify (159.195.68.41) │
│ │
│ ┌──────────┐ ┌──────────────────────────┐ │
│ │ Traefik │───▶│ brinxx-backend (:9000) │ │
│ │ :80/:443 │ │ Medusa v2 + Admin Panel │ │
│ │ │ │ + Static Image Serving │ │
│ │ │ └──────────┬───────────────┘ │
│ │ │ │ │
│ │ │ ┌──────────▼───────────────┐ │
│ │ │───▶│ brinxx-storefront (:3000)│ │
│ │ │ │ Next.js 15 (standalone) │ │
│ │ │ └──────────────────────────┘ │
│ └──────────┘ │
│ │
│ ┌──────────────┐ ┌─────────────────────┐ │
│ │ PostgreSQL 16│ │ Redis 7 │ │
│ │ :5432 │ │ :6379 │ │
│ └──────────────┘ └─────────────────────┘ │
│ │
│ /data/magic-commerce/brinxx/ │
│ ├── static-products/ (28 GB, bind mount) │
│ └── uploads/ (3.8 GB, bind mount) │
└─────────────────────────────────────────────────┘

All services are protected by Magic Access — a custom Express.js authentication proxy running as a Docker container on the Coolify network. It uses Traefik’s forwardAuth middleware to validate every request before it reaches the backend or storefront.

DetailValue
Containermagic-access
Port3334
Login URLhttps://access.magicomniverse.online
DatabasePostgreSQL magic_access (on same Coolify PostgreSQL instance)
Auth methodsEmail/password + WhatsApp 2FA

How it works:

Browser request → Traefik → forwardAuth → magic-access:3334/api/validate
┌────────────────┴────────────────┐
│ │
IP whitelisted? Has valid session?
or device token? (cookie check)
│ │
▼ ▼
200 → Allow 200 → Allow
401 → Blocked page 401 → Redirect to login

Features:

  • IP whitelisting (26 IPs migrated from old server)
  • Device tokens (30-day cookies, 14 tokens migrated)
  • WhatsApp 2FA via MessageBird API
  • Password policy: 28-day expiry, complexity requirements, history check
  • CAPTCHA protection on login
  • Session management with PostgreSQL-backed user table (19 users)
  • Branded “Access Denied” page showing visitor’s IP address

Traefik integration:

The magic-access container defines a magic-forward-auth middleware via Docker labels. Backend and storefront containers reference this middleware in their custom_labels (stored in Coolify’s DB):

traefik.http.middlewares.magic-forward-auth.forwardauth.address=http://magic-access:3334/api/validate
traefik.http.middlewares.magic-forward-auth.forwardauth.authRequestHeaders=X-Real-IP,X-Forwarded-For,Cookie,Host
DetailValue
URLhttps://monitor.magicomniverse.online
AuthTraefik basicAuth (Netdata has no built-in login)
CredentialsSee Vaultwarden
Containernetdata (on coolify network)

What it monitors:

  • All Docker containers (CPU, memory, network I/O, disk I/O per container)
  • Host system (CPU, RAM, disk, network interfaces)
  • PostgreSQL (connections, queries, locks, replication)
  • Redis (commands, memory, keys, connections)

Traefik config: Netdata routing is handled via a file provider config at /traefik/dynamic/netdata.yaml inside the coolify-proxy container — NOT via Docker labels. This keeps Netdata on basicAuth instead of the Magic Access forwardAuth.

StepOld Server (KVM 4, 4 cores)New Server (12 cores)
Backend npm ci + build~25 min~12 min
Storefront build~10 min~2 min

All Coolify API calls use the token in the Authorization header:

Terminal window
curl -H 'Authorization: Bearer <API_TOKEN>' \
http://localhost:8000/api/v1/servers
ActionMethodEndpoint
List serversGET/api/v1/servers
List appsGET/api/v1/applications
Deploy appGET/api/v1/deploy?uuid={app_uuid}
App env varsGET/api/v1/applications/{uuid}/envs
Add env varPOST/api/v1/applications/{uuid}/envs
Deployment statusGET/api/v1/deployments/{deploy_uuid}
Terminal window
# Backend
curl -H 'Authorization: Bearer <API_TOKEN>' \
'http://localhost:8000/api/v1/deploy?uuid=les7duuk6opipbl38vvq35il'
# Storefront
curl -H 'Authorization: Bearer <API_TOKEN>' \
'http://localhost:8000/api/v1/deploy?uuid=jkm70m01bv0uf9xqwa6leu8j'

IssueWorkaroundFix
Volume mounts lost on Coolify redeployRe-add volumes to docker-compose.yaml manuallyConfigure persistent storage via Coolify UI
Some DB image URLs reference brinxx.magiceverse.onlineImages still load via /static/products/ relative pathsUpdate absolute URLs in image table to use new domain
designer.spranz.de CORS errorsNon-critical — logo designer featureAdd magicomniverse.online to Spranz CORS allowlist

Phase 4 — N8N, Agents & Supporting Services (Completed 2026-03-25)

Section titled “Phase 4 — N8N, Agents & Supporting Services (Completed 2026-03-25)”

All services from the old server have been migrated to Coolify as Docker Image apps, each with HTTPS via Traefik and auto-SSL.

InstanceURLCoolify UUID
n8n-mainhttps://n8n.magicomniverse.onlinesqho704e2905xxsdd4s8pk6l
n8n-2https://n8n2.magicomniverse.onlinesoigrb120rwevac2yvtnfreh
n8n-3https://n8n3.magicomniverse.onlinetq1tfo9qogwqnu9q3oxod71m
n8n-cleanhttps://n8n-clean.magicomniverse.onlinesbmvvyqpu0xd3ntmm7dp3az8

All use n8nio/n8n:latest image, persistent data via bind mounts to /data/apps/n8n/.

All agents use the @magic-agent/brinxx package with per-tenant config. Each connects to its own PostgreSQL database (magic_agent_{name}) on the shared magic-postgres container.

AgentURLCoolify UUIDDatabase
brinxxhttps://aicheck.magicomniverse.onlinefdpes5yqkz3qgkyl3pm0ifj0magic_agent_brinxx
spranzhttps://aicheck-spranz.magicomniverse.onlineetinpscw8rot8wo36x381ryzmagic_agent_spranz
logohorlogehttps://agent-logohorloge.magicomniverse.onlinevj5i6t4bdcgza4zlrlyee7xvmagic_agent_logohorloge
jodasignhttps://agent-jodasign.magicomniverse.onlinell8lcrl9okcxztdu4di87itjmagic_agent_jodasign
topgivinghttps://agent-topgiving.magicomniverse.onlinetw67tf4ofzviuoftcrpk8n32magic_agent_topgiving
magiceversehttps://agent-magiceverse.magicomniverse.onlinev4d9swxahk65ez2oswld0ok6magic_agent_magiceverse
magic_dwfhttps://agent-dwf.magicomniverse.onlinetrd8jzgxengdyepem6vllfzxmagic_agent_magic_dwf
princesshttps://agent-princess.magicomniverse.onlineuxjs02nkqn9vtqz6af7xns6hmagic_agent_princess
support_agenthttps://agent-support.magicomniverse.onlinelobgykf2bwodk68ncj5fpw63magic_agent_support_agent
ollivandershttps://agent-ollivanders.magicomniverse.onlineig1d0mmkognsz14oz460esszmagic_agent_ollivanders

Docker images: Built locally using parameterized Dockerfile.fixed with AGENT_NAME build arg, pushed to local registry at localhost:5000/magic-agent-{name}:latest.

ServiceURLPortCoolify UUID
Widget Serverhttps://agent.magicomniverse.online4061u9gofqhziqoqxj88jvypkzq9
Escalation Serverhttps://escalation.magicomniverse.online11099zgwazvrmp09nm9sbxdo4rjzb
Webhook Serverhttps://webhook.magicomniverse.online11098jrihj7hljsfpy0mmwhsitflz
Flowbuilderhttps://flowbuilder.magicomniverse.online3003h6jkqajw1l84oy16omufpnkw
InstanceCoolify UUID
agent-redisibv29cyx5rg7rw14vjq75gtg
spranz-redisghuodyk9d2gxjp7wlog8rhi0

All agent databases, escalation, and flowbuilder share the magic-postgres container:

DetailValue
Containermagic-postgres
CredentialsSee Vaultwarden
Networkcoolify (all apps on same network)

A local Docker registry runs at localhost:5000 on the new server. Agent images are tagged as localhost:5000/magic-agent-{name}:latest and pulled by Coolify from there (avoids Docker Hub pulls for custom images).

ProjectUUIDContents
N8Nt10zqw5ff2czpvz0xl7akg6r4 N8N instances
Agentsly8emm9hcayrv31odbrxy9tr10 agents + 2 Redis + 4 supporting services

Phase 5 — Commerce Tenants (Completed 2026-03-26)

Section titled “Phase 5 — Commerce Tenants (Completed 2026-03-26)”

All commerce tenants deployed to Coolify. Each tenant has a Medusa v2 backend, optional Next.js storefront, and dedicated Redis instance. All connect to the shared magic-postgres PostgreSQL container.

TenantBackend URLStorefront URLBackend UUIDStorefront UUIDRedis UUID
developmenthttps://admin-development.magicomniverse.onlinehttps://development.magicomniverse.onlinehhsn382kdreoti6qselx8pqvaljo4cc71j3hzvw91fcjvkrfbtyz4e6rd0z2dvl64j2ipht1
demohttps://admin-demo.magicomniverse.onlinehttps://demo.magicomniverse.onlinehuplyx1ai5cktjfr50vj5779n12yur1y9hg0swzqk01vwji9t7ucku0ovwuylss9bazsiq47
defaulthttps://admin-default.magicomniverse.onlinehttps://default.magicomniverse.onlinebtey8640mz1v5gpdl19inw1ibfc2vpgbwdqvwj3tdnznpsxqgc6an6so5ks4jfcjyr0tc79c
masterhttps://admin-master.magicomniverse.onlineb9a51r3svo0he5ielrj4jrykon3y504gqu8axjtv3j7fxiyj

Phase 5b — Client Tenants (with storefronts)

Section titled “Phase 5b — Client Tenants (with storefronts)”
TenantBackend URLStorefront URLBackend UUIDStorefront UUIDRedis UUIDTierFeatures
bovisaleshttps://admin-bovisales.magicomniverse.onlinehttps://bovisales.magicomniverse.onlinemxhf9c78zb19yxyxsrxht03vskr998zk31u24g3i9vi5kj4yvbg9v3pswwrlu6amhx1do0c3standard
jodasignhttps://admin-jodasign.magicomniverse.onlinehttps://jodasign.magicomniverse.onlinel5bgqqg9l7yqq5p2qhfqadawsszuccvasjffsphte44zc7qrvlucag79axesn88iuprw4aywprofessionalquotation_source_filter
logohorlogehttps://admin-logohorloge.magicomniverse.onlinehttps://logohorloge.magicomniverse.onlinez4dxwwxb0mn21gst39580sgps7xx9c0wzrmvosa3ehx10atlfzmkgrtog3f43xxns5vt8cz1professionaldesigner_2d
spranzhttps://admin-spranz.magicomniverse.onlinehttps://spranz.magicomniverse.onlineetk3fvct78myk44ccqdiu1m4kyph41469erjcqv74spg7a02k55qs94bga8oqn79agd5qhgqprofessionaldesigner_external
TenantBackend URLBackend UUIDRedis UUIDTier
desluishttps://admin-desluis.magicomniverse.onlinelvk036c368yp507jb1ca96wyzff706yp3ij21p2fqxfyk8kkstandard
toolvizionhttps://admin-toolvizion.magicomniverse.onlineczb98ousqz6jgcw71aoxxixbfqtv8g818t4hn4w9ltoffd8zstarter
ProjectUUIDContents
Commerce Tenantsra5w4beuzwbsj39bxjtlp33aPhase 5a internal tenants + toolvizion
bovisalesu60xain9eru7mq9oepq40jwfbovisales backend + storefront + redis
jodasignp124fkya1oj1j16gobrzom7zjodasign backend + storefront + redis
logohorlogeo46mvqff13ukvhziaotcm1zrlogohorloge backend + storefront + redis
spranzmu2gbfvdliyucernkoa34z4ispranz backend + storefront + redis
desluiskekoexxuyou8j9w3n9bfywk6desluis backend + redis

All commerce backends are built from the midego1/Magic-e-VERSE monorepo (main branch) with:

  • Build pack: dockerfile
  • Base directory: /backend (backends) or /storefront (storefronts)
  • Ports: 9000 (backends), 9002 (storefronts)
  • GitHub App UUID: vt1agfhku2dybkk97qpi4yng

Phase 6 — PIM System (Completed 2026-03-26)

Section titled “Phase 6 — PIM System (Completed 2026-03-26)”

Magic PIM migrated to Coolify as a standalone app with its own GitHub repo, separate from the commerce monorepo.

DetailValue
GitHub Repomidego1/Magic-PIM (private)
Coolify App UUIDa5j3s2r6zqjter8ps2mpqf12
Coolify Projectpim (vinrsqy0eqf0k38aepzr05vq)
URLhttps://pim.magicomniverse.online
Admin Panelhttps://pim.magicomniverse.online/app
Build Packdockerfile (multi-stage, from /backend/Dockerfile)
Port4002
Databasemagic_pim (189 tables, on shared magic-postgres)
RedisShared instance (vh8unk1tbyqxoxncrvjt1ucm, db index 1)
  • Separate repo: midego1/Magic-PIM instead of midego1/Magic-e-VERSE
  • Port: 4002 (commerce tenants use 9000)
  • No storefront: PIM is backend/admin only
  • Supplier connectors: Built-in connectors for 8 suppliers (Spranz, XD Connect, PF Concept, Midocean, Toppoint, NewWave, Moxz, Langenberg)
  • PIM API port: 7992 for internal sync endpoints

First build takes ~20 minutes (no Docker layer cache). Subsequent builds are faster.

Product images (225 GB) are currently on the old server at /mnt/data/pim_data/. These will be migrated to Cloudflare R2 or S3 in a future phase. For now, the PIM serves images from its local filesystem.

Phase 7 — Portal + MySQL (Completed 2026-03-26)

Section titled “Phase 7 — Portal + MySQL (Completed 2026-03-26)”

Magic Portal migrated to Coolify. MySQL was already present on the new server with all databases imported.

DetailValue
GitHub Repomidego1/Magic-Portal (private)
Coolify App UUIDasobzrb38ogwdasunt4hm2mk
Coolify Projectportal (guiv6q9ktejyggk9rsbgldmc)
URLhttps://portal.magicomniverse.online
Build Packdockerfile (Node.js + pre-built React frontend)
Port4096
DatabaseMySQL magic_doc (60 tables, on mysql container)

The portal is a React 19 + TypeScript frontend (built with Vite) served by an Express.js backend (server.cjs). The frontend is pre-built and included in the Docker image — no build step needed at deploy time.

Stack: React 19 / Vite / Express 4 / MySQL 8 / Nodemailer / WhatsApp 2FA

DetailValue
Containermysql
Internal hostnamemysql (on coolify network)
Databasesmagic_doc (portal), uren, dartv2dev, magic_promotionalz, portal_db
CredentialsSee Vaultwarden

Phase 8 — Business Services (Completed 2026-03-26)

Section titled “Phase 8 — Business Services (Completed 2026-03-26)”

Business services migrated to Coolify as standalone apps with dedicated GitHub repos.

ServiceURLPortCoolify UUIDGitHub RepoDatabase
Magic Connectorhttps://connector.magicomniverse.online3085d375hlwqzjw1hwzfyevgyej8midego1/Magic-Connectormagic_connector (PostgreSQL)
Magic Contacthttps://contact.magicomniverse.online4095oh39xnmom4b9huhj7ttvogs8midego1/Magic-Contactmagic_contact (PostgreSQL)
ProjectUUID
business-servicesgwd6yqz3oat1ka9l9l9l9412

Phase 9 — Tools Migration (Updated 2026-03-29)

Section titled “Phase 9 — Tools Migration (Updated 2026-03-29)”

All tool services deployed to Coolify with dedicated GitHub repos, Dockerfiles, auto-deploy on push, and preview deployments on PRs.

ToolURLPortCoolify UUIDGitHub RepoType
Magic Editorhttps://editor.magicomniverse.online3091t7g0582igseam0w0bkipjecdmidego1/Magic-EditorStatic SPA (nginx)
Magic 3Dhttps://3d.magicomniverse.online3093p4rlxuu9iveqfz59uso1y1r0midego1/Magic-3DFull-stack Node.js (API only)
Magic Logohttps://logo.magicomniverse.online4055akk54cfnatn3ggice6v6z9xomidego1/Magic-LogoFull-stack (nginx + Express + Prisma)
Magic Modalhttps://modal.magicomniverse.online3092vlyfa7pswwll1wye8ocl290smidego1/Magic-ModalStatic SPA (nginx, Vite build)
Magic Moodshothttps://moodshot.magicomniverse.online4120x5efq9nt6tsoo48u917atox0midego1/Magic-MoodshotFull-stack (nginx + Express)
Magic Resizehttps://resize.magicomniverse.online3090w126215q2nmpp30bn8daqkqzmidego1/Magic-ResizeStatic SPA (nginx)
DatabaseUsed ByTables
magic_logoMagic Logo (Prisma ORM)20
moodshot_serviceMagic Moodshot1
ProjectUUID
toolsa11xohldkir9aodr2ek0l6as

Magic Terminal (midego1/Magic-Terminal, sshwifty-based) was not deployed because the repo was not added to the GitHub App installation. It can be deployed later when needed.


  1. Switch production DNS (magiceverse.online) to new server
  2. Verify all services with production domains
  3. Decommission old server (83.86.98.93)
  • Object storage — Move product images to Cloudflare R2 or S3 instead of local disk
  • CI/CD pipeline — GitHub Actions for automated testing before deploy
  • Alerting — Configure Netdata alerts for disk space, memory, and container health
  • Database backups — Automated daily pg_dump to off-site storage
  • Meilisearch — Add search service for product catalog
  • Watch paths refinement — Add more granular watch paths for shared config files

DetailValue
IP185.77.96.209
SSHmidego@185.77.96.209
CredentialsSee Vaultwarden
Domain*.magic.midego.net

DetailValue
Hostnamemagic-server
IP (public)83.86.98.93
IP (local)192.168.1.26
RoleCurrent production — all tenants run here
Data path/mnt/data/magic_omniverse/magic_commerce/
PIM images/mnt/data/pim_data/