{"id":13558532,"url":"https://github.com/fffaraz/dockerweb","last_synced_at":"2025-04-03T13:31:28.962Z","repository":{"id":65982739,"uuid":"77162693","full_name":"fffaraz/dockerweb","owner":"fffaraz","description":"A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.","archived":true,"fork":false,"pushed_at":"2021-01-09T20:07:36.000Z","size":392,"stargazers_count":97,"open_issues_count":2,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-04T09:37:24.681Z","etag":null,"topics":["apache","certbot","dns-server","docker","dockerfile","hosting","letsencrypt","mariadb","mysql","nginx","paas","php","phpmyadmin","web-hosting","web-server"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fffaraz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T17:14:52.000Z","updated_at":"2024-06-13T01:07:54.000Z","dependencies_parsed_at":"2023-02-19T19:15:54.648Z","dependency_job_id":null,"html_url":"https://github.com/fffaraz/dockerweb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fdockerweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fdockerweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fdockerweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fdockerweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fffaraz","download_url":"https://codeload.github.com/fffaraz/dockerweb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009616,"owners_count":20868578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["apache","certbot","dns-server","docker","dockerfile","hosting","letsencrypt","mariadb","mysql","nginx","paas","php","phpmyadmin","web-hosting","web-server"],"created_at":"2024-08-01T12:05:00.593Z","updated_at":"2025-04-03T13:31:28.640Z","avatar_url":"https://github.com/fffaraz.png","language":"Shell","readme":"# DockerWeb\n\nA docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.\n\n## Requirements\n\n- A fresh installation of latest Ubuntu LTS x64 with the FQDN set.\n\t- DigitalOcean provides Cloud VPS Servers at affordable prices. You can sign up via [this referral link](https://m.do.co/c/fb7b38f12520) to get a free $100 bonus in credit.\n- At least 512MB of system memory. (1GB recommended)\n- A domain name pointed at the host's IP address. (Optional but highly recommended)\n\n## Installing\n\nAfter you changed the default root password and ssh port, to install the latest stable release, you can run the following commands as root:\n\n```\ngit clone https://github.com/fffaraz/dockerweb.git /opt/dockerweb\nexport PATH=$PATH:/opt/dockerweb\n```\n\nTo add `/opt/dockerweb` to your $PATH permanently run `echo 'export PATH=$PATH:/opt/dockerweb' \u003e\u003e ~/.profile`\n\nTo create swap space on a regular file run `docweb install:swapfile SIZE_IN_MB`\n\nIf you don't already have docker installed on your host run `docweb install:docker`\n\nTo create the network bridge used by dockerweb containers run `docweb install:network`\n\nFinally to build dockerweb images run `docweb build:all`\n\nOptionally, to install some useful packages run `docweb install:extras` and `docweb install:aliases`\n\n### Upgrading\n\nTo upgrade you just need to run `docweb upgrade` first and then if necessary rebuild all the images with `docweb build:all` and re-run all the containers to use new images built.\n\n## How to run services\n\n### The DNS Server\n\n[MicroDNS](https://github.com/fffaraz/microdns) is a tiny DNS server that is used to (almost) always return your host's IP address for any query sent to it. Hence you will just need to set your domains' dns setting to point to your host's IP address and you don't have to also add them in a config file on the host any more.\n\n```\ndocweb microdns:run [--ttl 3600] [--log]\ndocweb microdns:log\ndocweb stop microdns\n```\n\n### The Reverse Proxy Server\n\nThis is the main web server listening on ports 80 and 443 and proxying requests to the apps based on their domain names.\nIt also provides TLS/SSL encryption using valid certificates signed by [Let's Encrypt](https://letsencrypt.org/) and is responsible for output gzip compression.\nYou can add your apps to its config file at `/home/proxy/websites.conf`.\nYou need to run the update command each time you edit the config file.\nMake sure all your apps are running before updating the proxy server.\n\n```\ndocweb proxy:run [--debug] [SERVER_NAME]\ndocweb stop proxy\ndocweb proxy:update\ndocweb proxy:status\n```\n\nLogs Directory: `/home/proxy/log/nginx/`\n\nConfig File Format: `CONTAINER CATCHALL WILDCARD SSLCERT DOMAIN1 [DOMAINS...]`\n\n* `CONTAINER` : The name of App's container.\n* `CATCHALL` : Set to 1 for the default app. Proxies all unmatched domain names to that container. Optional. One app only.\n* `WILDCARD` : Whether to also proxy all subdomains of app's domain names to that container.\n* `SSLCERT` : Request for a valid TLS/SSL certificate from letsencrypt.\n* `HTTPSONLY` : Redirect all HTTP requests to HTTPS.\n* `DOMAIN1` : Primary domain name for the app.\n* `[DOMAINS...]` : Optional additional domain names.\n\n### MySQL Server\n\n```\ndocweb mysql:run [--debug] [--direct PORT] [--memory M] NAME MYSQL_ROOT_PASSWORD [mariadb|mysql|mysql/mysql-server]\ndocweb mysql:stop NAME\ndocweb mysql:client NAME\ndocweb mysql:status NAME\ndocweb mysql:optimize NAME\ndocweb mysql:backup NAME [--gzip] [DATABASES...]\ndocweb mysql:import NAME [--gzip] FILENAME [DATABASE]\ndocweb mysql:createuser NAME USERNAME PASSWORD\ndocweb mysql:createdb NAME DB\ndocweb mysql:listusers NAME\ndocweb mysql:listproc NAME\ndocweb mysql:listdbs NAME\ndocweb mysql:upgrade NAME\ndocweb mysql:tuner NAME MYSQL_ROOT_PASSWORD\n```\n\nDefault Image: `mariadb`\n\nMySQL Backup / Import Directory: `/home/NAME/backup`\n\n### PostgreSQL Server\n\n```\ndocweb postgres:run [--debug] NAME POSTGRES_PASSWORD\ndocweb stop NAME\n```\n\n### Redis Server\n\n```\ndocweb redis:run [--debug] NAME\ndocweb stop NAME\n```\n\n### Mail Forwarder\n\n```\ndocweb mailfwd:run\n```\n\nBased on [zixia/docker-simple-mail-forwarder](https://github.com/zixia/docker-simple-mail-forwarder). Config File: `/home/mailfwd/mail.conf`\n\n### Web Apps\n\n```\ndocweb run [--debug|--bash] [--direct PORT] IMAGE NAME [WEBUSER_PASSWORD SSH_PORT]\ndocweb stop NAME\ndocweb logs NAME\ndocweb update NAME\ndocweb exec [--root] NAME\ndocweb clean NAME\ndocweb backup NAME\ndocweb ps NAME\ndocweb status NAME\ndocweb log:nginx NAME [--error]\ndocweb log:php NAME [--error]\n```\n\nWWW (public_hmtl) root directory: `/home/NAME/www/public`\n\nDomains config file: `/home/NAME/domains.conf`\n\nOptional project init script: `/home/NAME/project.sh`\n\nList of availabe images: ` php7nginx php7apache php5apache python3 nodejs aspnet4 aspnet5 `\n\n### phpMyAdmin\n\n```\ndocweb pma:run [--debug] [--direct PORT] MYSQLSERVER MYSQLROOTPASSWORD [pma status] [CaptchaPublic CaptchaPrivate]\ndocweb stop MYSQLSERVER_pma\n```\n\nThen add the following line to your `/home/proxy/websites.conf` and then run `dockweb proxy:update`.\n\n```\nMYSQLSERVER_pma 0 0 0 0 pma.example.com\n```\n\nphpMyAdmin can be accessed from `http://pma.example.com/pma/`\n\nStatus page `http://pma.example.com/status/`\n\n### ClamAV\n\n```\ndocweb clamav:run\n```\n\n### Etc.\n\n* `docweb rm` To remove stopped containers, orphaned images and orphaned volumes.\n* `docweb rm:all` To remove all containers and volumes.\n* `docweb rm:img` To remove all images.\n* `docweb build NAME` To build an image.\n* `docweb stats` Prints host status.\n* `docweb volume:create NAME SIZE`\n\n## Examples\n\n### PHP 7.1 + NGINX + MySQL Stack\n\nTo create a new PHP website with NGINX webserver and MariaDB database server and phpMyAdmin run the following commands:\n\n```\ndocweb mysql:run db1 mysqlrootpassword\ndocweb mysql:createuser db1 example.com db_password\ndocweb pma:run db1 mysqlrootpassword\ndocweb run php7nginx example.com\ndocweb proxy:run\n```\n\nThen add the following lines to `/home/proxy/websites.conf`\n\n```\ndb1_pma 0 0 0 0 pma.example.com\nexample.com 0 0 0 0 example.com\n```\n\nThen update the proxy server with `docweb proxy:update`\n\n## See Also\n\n* [docker-webserver](https://github.com/nazar-pc/docker-webserver) - WebServer (MariaDB, PHP-FPM, Nginx) composed from several separate containers linked together.\n* [shipping-docker](https://github.com/shipping-docker)\n\n\u003c!---\n## Donation\n\nIf this helps you [why not buy me a beer](https://www.paypal.me/frz288) :beer:\n\nIf this project help you reduce time to develop and you would like to donate to this cause, feel free to send money my way via one of the links below:\n\n[![PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/frz288)\n[![Venmo](https://img.shields.io/badge/Donate-Venmo-green.svg)](https://venmo.com/?txn=pay\u0026audience=public\u0026recipients=fffaraz\u0026note=DockerWeb)\n[![Square](https://img.shields.io/badge/Donate-Square-green.svg)](https://cash.me/$fffaraz)\n[![SayThanks](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg)](https://saythanks.io/to/fffaraz)\n--\u003e\n","funding_links":["https://www.paypal.me/frz288"],"categories":["Shell","docker"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffaraz%2Fdockerweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffffaraz%2Fdockerweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffaraz%2Fdockerweb/lists"}