Migration from another host
Don't have your own Mastodon instance yet? You'll find the right hosting with us.
If you would like to switch to us from another host, we're happy to support you with the takeover and migration of your data. With this guide, we want to prepare you well so that the transition goes as smoothly as possible.
Get in touch
Please contact us as early as possible. That way, we can coordinate everything important with you and carry out the preparations together without time pressure.
To give you a rough estimate of the effort involved, we first need the following information from you:
- Version of your Mastodon instance
- Version of the PostgreSQL database
- Storage required for the database
- Storage required for the media data
If you have command-line access to your current instance, please run the following commands before determining the storage requirements, if possible. They remove cached posts and media from other servers as well as older link preview images that are not needed for the migration. Posts and media attachments from your own users are kept.
tootctl statuses remove --days 3
tootctl media remove --days 3
tootctl preview_cards remove --days 14
On a standard installation, run the commands as the mastodon user in the ~/live directory with RAILS_ENV=production bin/tootctl …. On a Docker installation, use the web container, for example with docker compose exec web tootctl ….
Overview
A successful data migration requires several documents and files, which can usually be found in the backup of the environment.
Required components
This section describes which components need to be provided.
1. PostgreSQL database
PostgreSQL contains:
- User accounts
- Posts (toots)
- Federation data
- Settings and metadata
The database is the most critical component of the migration.
2. Media directory (/public/system)
Contains:
- Profile pictures
- Header images
- Attachments (images, videos, audio files)
- Emojis
This data can get very large.
3. Configuration files
Typical files:
.env.productiondocker-compose.yml(for Docker)- Nginx/Apache configurations
- systemd services
4. Optional: Redis
Redis is mostly used as a cache.
If you cannot find this data in the export section of your current host, ask them about it in advance.
To ensure that no information is lost, please create a ticket in your client area and upload all relevant information there. Alternatively, you can send us an email at info@ossrox.org or a message via our contact form. We will get back to you promptly and ask for further information if necessary.
Support
Need more support? Feel free to ask us about our flat-rate support. Either way, we're here to help with any questions about running your Mastodon instance.