1
Migrate Smarter Windows to Docker
Question asked by mh - 4/20/2025 at 8:36 PM
Unanswered

I had seen this, and showed the mapping comparison of pathing from Windows to Linux. How does this translate to docker paths?

My assumptions -
C:\Smartermail on Windows translates to /app/Data on docker
C:\Program Files (x86)\SmarterTools\SmarterMail\Service\Settings on Windows translates to /app/SystemData on docker

Is this correct? Would copying the files from a Windows installation to here and starting up the docker perform a migration? I don't really see any articles detailing this

7 Replies

Reply to Thread
1
Matt Petty Replied
Employee Post
The docker page has a good compose file to follow as an example.
https://hub.docker.com/r/smartertools/smartermail

That should be all you need to do just double check you don't have any other path references first. You may see a wizard before SM fully starts that is confirming your file paths are correct.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
mh Replied
Ok, and what do I move to where to migrate from a Windows installation to a docker? I have the compose, but moving files as I listed above seems to get ignored and starting up the docker just sets up a fresh SmarterMail instance rather than doing anything with the files being imported. There are no real clear directions on doing this.
0
Kyle Kerst Replied
Employee Post
Hi Mh, I'd be happy to see if I can help get you going in the right direction. The pathing you should move files to is the pathing noted in that compose file, so I suspect something else might be going on here. In the compose file the /app/Data pathing usually correlates to an actual folder on disk like /var/lib/smartermail or somewhere similar. As an example - here is the volume section from one of our test servers using docker: 

      - /var/lib/smartermail:/app/Data
      - /etc/smartermail:/app/SystemData

So, if I wanted to move a domain into this environment I would place the domain folder under /var/lib/smartermail/Domains/domain.com and docker would see that under /app/Data/Domains/domain.com. Is it possible you have a mismatch here?

If that isn't the issue my next question is around versions. Are you upgrading from an older version of SmarterMail? I ask because our previous versions (16 and prior) used XML configuration files instead of JSON and this can introduce another layer of complexity to your migration along with affecting how we advise you on your next steps. 
Kyle Kerst Acting IT Manager SmarterTools Inc. www.smartertools.com
0
mh Replied
Hello Kyle -

Running build 9168 from February, and on Windows. This is why I was asking about migration from Windows to docker. My assumption is this would be handled by the docker the same as installing directly on a linux server. If that's not the case, and needs to be migrated to a linux server first to handle converting to the linux environment, and then can be moved to a docker, then this is what I would need to know.

On a docker setup I had just created directories under /opt/SmarterMail/Data and /opt/SmarterMail/SystemData and having these volumes referenced for the /app/Data and /app/SystemData for the compose.yaml.

I had copied the files from the Windows server to these folders via rsync, and upon starting up the docker it seemed to ignore them and just set up a fresh installation.

Here is the full compose file -

version: '3.8'

services:
  smartermail:
    image: smartertools/smartermail:latest
    container_name: smartermail
    environment:
      - TZ=America/New_York
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
      - "25:25"
      - "110:110"
      - "143:143"
      - "465:465"
      - "587:587"
      - "993:993"
      - "995:995"
      - "5222:5222"
    volumes:
      - /opt/SmarterMail/Data:/app/Data
      - /opt/SmarterMail/SystemData:/app/SystemData
    restart: always
1
Zach Sylvester Replied
Employee Post

Hello,

Thank you for getting back to us. Your YAML looks correct, so the most likely issue is the file structure you're using. If possible, I suggest opening a ticket with our support team so they can review your configuration. If that isn't an option, I recommend doing a fresh install and examining how SmarterMail arranges its files. Make sure you're placing them in the same structure. After that, it should bring up a conversion wizard similar to what appears when migrating from Windows to Linux.

Kind regards,

Zach Sylvester Software Developer SmarterTools Inc. www.smartertools.com
0
Kyle Kerst Replied
Employee Post
I agree with Zach's assessment, a ticket should help get this going in the right direction. You should have no XML concerns coming from that build so this should be a pretty simple migration in most cases and I bet there is something we're missing there. 
Kyle Kerst Acting IT Manager SmarterTools Inc. www.smartertools.com
0
mh Replied
I'll likely have to open one next week. I did try setting up a linux server and let it rsync files for hours overnight, and got the OS migration wizard popping up there. I'll give it another try to the docker before opening any ticket.

Reply to Thread

Enter the verification text