Advice needed: How to migrate typical multi domain LAMP Server into a Docker based Environment

Hi - my first posting here…

As stated - I am looking for advice or good starting point to make my planned migration of my “classic” LAMP server happen.

This server hosts several domains and provides the following services per Domain:

  • Email (using Postfix, Dovecot & Roundcube)
  • WWW (using Apache, PHP, WordPress)

For one Domain I added

  • Nextcloud (File, Calendar Shearing)

For comfort reasons I also apply

  • phpmyadmin (mySQL Administration)
  • webmin (Services, Apache Virtual Hosts, LogRotation, …)

Shared “Service” for all Domains

  • MySQL (running and accessible only for localhost serving all WordPress installations)

New features to add during migration

  • SSL Certification for www and email (Let’s Encrypt based SSL Certificates)
  • (this is planned - Agile Project Management Tool)

The Server is a physical server (Xeon based, 8GB RAM) sitting in my hosters data center. DNS is provided by my hoster and not part of the server. OS is/will be Ubuntu LTS or Debian.
It will be the 3rd move of the server since 2005 because of aging hardware and I am able to maintain above’s configuration so fare.

Over the last couple of days I read through a lot of material around docker and I guess I understood the basics. I am used to ESX Server and VM Ware because of my job - and I liked the advantage of docker over VM based attempts. Due to the multiple domains and virtual host kind of setup, I feel, that I can not really try out the whole thing based on VM’s in my basement and I can not believe that I am the first person to accomplish a migration of a LAMP-multi-domain-Server towards a docker based architecture.

I also found 3-4 helpful blogs, websites and articles that talks about parts of my project. It is important for me, to avoid any mistakes in the overall concept/architecture and get the migration right the first time - I would run two servers over a period of time and some of the domains are used well (email or www) - the buget is somehow limited. Therefore I like to ask for advice.
Some tweaking is fine of course. And I would love to learn a lot about docker during my little project.
I hope I choose the right forum and looking forward to your advice where to start, how to split up the services and how to share some of them (MySQL, MariaDB, Postgress) and how to make it happen…



I’m now in a similar situation. I’ve moved all of my personal web apps (sonarr, radarr, jackett, get_iplayer, motioneye, gitlab, zabbix and more), and I’ve now come to a point where I need to move my hosting server. I host a number of domains for friends and local youth clubs, and use virtualmin to manage each one including mail, dns, file level access, backups etc.

Did you get anywhere with your setup? Do you have any advice?