Upgrading Trains Server

This page describes the upgrade instructions for Trains Server in the following formats:

  • Linux
  • Max OS X
  • Windows 10

To upgrade in other formats, see:

To upgrade your Trains Server Docker deployment, do the following:

The following upgrade instructions use the Linux OS as an example.

  1. Shut down the docker containers. Execute the following command:
    docker-compose down
  2. We highly recommend backing up your data directory before upgrading.

    Data directory backup and restore example commands

    If your data directory is /opt/trains, then archive all data into ~/trains_backup.tgz by executing the following command:

    sudo tar czvf ~/trains_backup.tgz /opt/trains/data
    Restore from this backup by executing the following commands:
    sudo rm -R /opt/trains/data
    sudo tar -xzf ~/trains_backup.tgz -C /opt/trains/data
  3. Download the latest docker-compose.yml file.
    curl https://raw.githubusercontent.com/allegroai/trains-server/master/docker-compose.yml -o docker-compose.yml
  4. Spin up the docker containers. This automatically pulls the latest Trains Server build.
    docker-compose -f docker-compose.yml pull
    docker-compose -f docker-compose.yml up -d

If issues arise during your upgrade, see our FAQ page, How do I fix Docker upgrade errors?.