- Convert all require()/module.exports to import/export across 260+ files - Add "type": "module" to package.json to enable ESM by default - Add migrations/package.json with "type": "commonjs" to keep db-migrate compatible - Convert eslint.config.js to ESM with sourceType: "module" - Replace __dirname/__filename with import.meta.dirname/import.meta.filename - Replace require.main === module with process.argv[1] === import.meta.filename - Remove 'use strict' directives (implicit in ESM) - Convert dynamic require() in switch statements to static import lookup maps (dns.js, domains.js, backupformats.js, backupsites.js, network.js) - Extract self-referencing exports.CONSTANT patterns into standalone const declarations (apps.js, services.js, locks.js, users.js, mail.js, etc.) - Lazify SERVICES object in services.js to avoid circular dependency TDZ issues - Add clearMailQueue() to mailer.js for ESM-safe queue clearing in tests - Add _setMockApp() to ldapserver.js for ESM-safe test mocking - Add _setMockResolve() wrapper to dig.js for ESM-safe DNS mocking in tests - Convert backupupload.js to use dynamic imports so --check exits before loading the module graph (which requires BOX_ENV) - Update check-install to use ESM import for infra_version.js - Convert scripts/ (hotfix, release, remote_hotfix.js, find-unused-translations) - All 1315 tests passing Migration stats (AI-assisted using Cursor with Claude): - Wall clock time: ~3-4 hours - Assistant completions: ~80-100 - Estimated token usage: ~1-2M tokens Co-authored-by: Cursor <cursoragent@cursor.com>
Cloudron
Cloudron is the best way to run apps on your server.
Web applications like email, contacts, blog, chat are the backbone of the modern internet. Yet, we live in a world where hosting these essential applications is a complex task.
We are building the ultimate platform for self-hosting web apps. The Cloudron allows anyone to effortlessly host web applications on their server on their own terms.
Features
-
Single click install for apps. Check out the App Store.
-
Per-app encrypted backups and restores.
-
App updates delivered via the App Store.
-
Secure - Cloudron manages the firewall. All apps are secured with HTTPS. Certificates are installed and renewed automatically.
-
Centralized User & Group management. Control who can access which app.
-
Single Sign On. Use same credentials across all apps.
-
Automatic updates for the Cloudron platform.
-
Trivially migrate to another server keeping your apps and data (for example, switch your infrastructure provider or move to a bigger server).
-
Comprehensive REST API.
-
CLI to configure apps.
-
Alerts, audit logs, graphs, dns management ... and much more
Demo
Try our demo at https://my.demo.cloudron.io (username: cloudron password: cloudron).
Installing
Note: This repo is just a part of what gets installed on the server. Database addons, Mail Server, Stat contains etc are not part of this repo. As such, don't clone this repo and npm install and expect something to work.
License
Please note that the Cloudron code is under a source-available license. This is not the same as an open source license but ensures the code is available for transparency and introspection (and hacking!).
Contributions
We are very restrictive in merging changes. We are a small team and would like to keep our maintenance burden low, not to mention legal issues. It might be best to discuss features first in the forum, to also figure out how many other people will use it to justify maintenance for a feature.
