Help · Your Mygration server

Security checklist for a new server

The settings a technician makes to keep a Mygration server safe, from the firewall and admins to backups, alerts and keys.

Last updated

Mygration holds the keys to your customers' tenants, so treat its server like a domain controller. Go through this list after you install, and again now and then.

Tip

Start with sudo mygration doctor. It checks many of these for you, and says what to fix.

The server #

  • Firewall: let in only TCP 443 and 80, and only from the networks your staff use (80 and 443 from the internet if you use Let's Encrypt). Allow SSH only from your own addresses, with keys rather than passwords.
  • Updates to the operating system: keep Ubuntu or Debian patched, as you would any server.
  • The clock: keep it in sync (NTP). A clock that's far off can stop the license being accepted. If doctor says it isn't synchronised, run sudo timedatectl set-ntp true.
  • HTTPS: prefer a Let's Encrypt certificate, or one from your own certificate authority behind your reverse proxy. If you use the server's own certificate (for a name used only inside your network), trust its root only on the PCs that need the panel.
  • The settings file (/opt/mygration/.env) holds the backup passphrase and other secrets. Keep it readable only by root (doctor checks), never copy it anywhere shared, and keep a copy in your password manager.

People and sign-in #

  • Only the people who need it have a role under Tenant → Access: Admin for the few who change settings, Technician for those who run migrations, Read only for those who just look. Put technicians in teams so they see only their customers.
  • Remove leavers the day they go. Disabled signs them out at once.
  • Keep one admin who signs in with a password and an authenticator, not single sign-on: your way in if single sign-on ever breaks. They set the authenticator up under My settings → Sign-in and security → Set up an authenticator.
  • Single sign-on for everyone else, so your Microsoft MFA and Conditional Access apply.
  • API tokens: check Tenant → Access → API tokens now and then, and revoke any that aren't used. See API tokens.

Backups #

  • The backup passphrase is in your password manager. Without it, no backup can be restored.
  • Backups are encrypted: Tenant → Backups says encrypted next to the last backup.
  • A copy off the server: the card says copied to …, not only on this server. See Backups.
  • A backup restores: Check it restores says Restores OK.

Alerts #

  • Email alerts are on, so failed backups, expiring secrets and finished runs reach someone. Send a test email: see Email alerts.
  • Secret expiry: Tenant → Microsoft 365 apps shows both apps' expiry dates. Put the renewal in your calendar too: see Renewing the app secrets.
  • The license: put a reminder in your calendar before it expires. See Licensing and activation.

System health #

Open System → Health and fix anything it warns about. Besides backups, it can say:

  • The encryption keys aren't protected: give the panel a certificate to protect the stored passwords' keys. sudo bash install.sh --repair makes one (new installs have one already); or put your own .pfx (with its private key) in /opt/mygration/certs, set DATA_PROTECTION_CERT_FILE (its file name) and DATA_PROTECTION_CERT_PASSWORD in .env, then run sudo mygration start panel. Keep the .pfx and its password off the server: backups don't include them, and a restored backup needs them. Then move the passwords saved before onto it: see Backups.

Workers at customer sites #

  • Revoke keys you don't use: on Workers → Overview, under Workers on other servers, Revoke the key of any site that's finished. Its workers stop within a minute.
  • Use the panel's https:// address in every worker's command.
  • Keep them on the panel's version: see Updating Mygration.

Keep up to date #

Install new versions when they come out: System → Updates. They include security fixes. See Updating Mygration.