{"id":28586207,"url":"https://github.com/timgws/domain-manager","last_synced_at":"2026-04-15T18:32:16.845Z","repository":{"id":298248701,"uuid":"999340674","full_name":"timgws/domain-manager","owner":"timgws","description":"Automate all scaffolding for getting a bunch of PHP sites up and running in isolated containers quickly","archived":false,"fork":false,"pushed_at":"2026-04-15T04:39:12.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"development","last_synced_at":"2026-04-15T06:28:51.843Z","etag":null,"topics":["control-panel","docker","golang","hosting","mysql","nginx","percona"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timgws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-10T05:35:20.000Z","updated_at":"2026-04-15T04:39:16.000Z","dependencies_parsed_at":"2025-06-10T06:39:50.297Z","dependency_job_id":null,"html_url":"https://github.com/timgws/domain-manager","commit_stats":null,"previous_names":["timgws/domain-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timgws/domain-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fdomain-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fdomain-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fdomain-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fdomain-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timgws","download_url":"https://codeload.github.com/timgws/domain-manager/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgws%2Fdomain-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31854747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["control-panel","docker","golang","hosting","mysql","nginx","percona"],"created_at":"2025-06-11T07:00:26.878Z","updated_at":"2026-04-15T18:32:16.831Z","avatar_url":"https://github.com/timgws.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domain-manager\n\n**Domain Manager** is a lightweight CLI tool written in Go to help you self-host multiple PHP-based websites — especially WordPress or Laravel — using per-domain `php-fpm` containers, backed by Docker or Podman. It's designed for a simplified setup where nginx and MySQL run directly on the host, and each site gets its own isolated PHP runtime. The tool automates all scaffolding: directory layout, container config, MySQL database creation, and nginx integration. Ideal for developers who want to self-host multiple sites with minimal overhead, full control, and no panel bloat.\n\n---\n\n## Why Use domain-manager Instead of cPanel?\n\nTraditional hosting panels are heavy, opinionated, and often come with licensing costs, background services, and bundled features you may never use. `domain-manager` is built for developers and sysadmins who want:\n\n* 🧱 **Full control** — No hidden automation or black-box behavior\n* 🐧 **Linux-native** — Works seamlessly with your system's users, files, and firewalls\n* 🐳 **Container-based isolation** — Each site runs its own PHP-FPM container for clean separation\n* 🔍 **Transparent configuration** — Every file (nginx, Docker, MySQL) is visible and editable\n* 📦 **DevOps-friendly** — Easily integrates with GitOps, systemd, and shell automation\n\n`domain-manager` is ideal for minimal, scalable, modern PHP hosting — no control panel bloat required.\n\n---\n\n## ✨ Features\n\n- 🔧 Per-domain `php-fpm` container generation (Docker/Podman)\n- 📂 Mount WordPress files from `/data/websites/{domain}`\n- 💾 Per-domain backup command that creates a `.tar.bz2` archive\n- 🐧 Creates isolated Unix system user per domain\n- 🐬 MySQL database provisioning with namespaced DBs (e.g. `example_com_main`)\n- 🔑 Auto-generated secure MySQL passwords (displayed once)\n- 🔌 nginx configuration with FastCGI routing\n- ⚙️ Configurable via `config.yaml` (powered by `spf13/viper`)\n- 📋 Domain and DB state tracking with `storm` (BoltDB wrapper)\n- 🧪 Lifecycle commands: `add`, `list`, `info`, `delete`\n- 🚀 Supports `--runtime`, `--force`, `--no-up`, `--no-reload` flags\n\n---\n\n## 🛠 Requirements\n\n- Go 1.20+\n- Podman or Docker\n- nginx installed and running on the host\n- MySQL server running on the host\n- Directory structure: `/data/websites/{domain}`\n\n---\n\n## 🐬 Installing MySQL (Percona Server 8.4 LTS)\nTo keep your setup lean, Domain Manager assumes that **MySQL is running on the host**, not in a container. For maximum compatibility and long-term support, we recommend using Percona Server for [MySQL 8.4 LTS][https://www.percona.com/software/mysql-database/percona-server-for-mysql], a drop-in replacement for MySQL with extended support and observability features.\n\nHere's how to install it on RHEL-based systems (e.g. AlmaLinux, Rocky Linux):\n\n```\ndnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm\npercona-release enable pdps-84-lts\ndnf install percona-server-server percona-server-client\n\n# Disable telemetry\nsystemctl stop percona-telemetry-agent\nsystemctl mask percona-telemetry-agent\n\nsystemctl enable --now mysqld\n```\n\nMake sure that you \n\n```\nCREATE USER 'root'@'127.0.0.1' IDENTIFIED BY ')AS8SDA(sgd89a98';\nGRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION;\nFLUSH PRIVILEGES;\n```\n\n---\n\n## Allowing users to SFTP files\nAdd the SFTP config from `system-config/sshd_config` to `/etc/sshd_config` to ensure that users are jailed to `jailhomes`.\n\nEither give users access to SFTP with a password using `passwd \u003cuser\u003e` (not recommended) or set them up with an SSH key.\n\n---\n\n## 📦 Install\n\n```bash\ngit clone https://github.com/timgws/domain-manager.git\ncd domain-manager\ngo build -o domain-manager .\n```\n\n## 🚀 Usage\n```sh\n# List all of the domains that we are managing\n./domain-manager list\n\n# Add, find info, and delete domains\n./domain-manager add example.com\n./domain-manager info example.com\n./domain-manager delete example.com\n\n# Manage MySQL databases\n./domain-manager mysql create example.com example_db_name\n./domain-manager mysql list example.com --stats\n\n# SSL\n./domain-manager enable-ssl example.com --cloudflare\n```\n\n## Backups\n\nThe `backup` command creates a `.tar.bz2` archive containing:\n\n- `site/` — the website root for the domain\n- `databases/` — SQL dumps for all MySQL databases associated with the domain\n- `metadata.txt` — basic domain backup metadata\n\nExample:\n\n```bash\n./domain-manager backup example.com --output-dir /backups\n```\n\n### Flags\n* `--runtime docker|podman` — override container runtime\n* `--force` — recreate existing container (runs down before up)\n* `--no-up` — skip container startup\n* `--no-reload` — skip nginx reload\n\n## 🧱 Stack\n* `nginx` serves static files and proxies `.php` requests to host-mapped container ports\n* `PHP-FPM` runs per-site in containers\n* MySQL is shared across all sites\n\n## 📁 Directory Structure\n```\n/opt/domain-manager/docker/example.com/\n  ├── Dockerfile (from template)\n  └── docker-compose.yaml\n\n/etc/nginx/conf.d/example-com.conf\n\n/data/websites/example.com/\n```\n\n## 📚 License\n\nMIT License — use it, modify it, fork it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgws%2Fdomain-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimgws%2Fdomain-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgws%2Fdomain-manager/lists"}