# Migrate an old Discourse install to Docker

**URL:** https://meta.discourse.org/t/migrate-an-old-discourse-install-to-docker/12439
**Category:** Self-Hosting
**Tags:** migrations, how-to
**Created:** [February 5, 2014, 1:24am UTC](https://meta.discourse.org/t/migrate-an-old-discourse-install-to-docker/12439 "2014-02-05T01:24:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [February 5, 2014, 1:24am UTC](https://meta.discourse.org/t/migrate-an-old-discourse-install-to-docker/12439/1 "2014-02-05T01:24:41Z")

</div>

> ℹ 2022.10.21 @pfaffman adds: If you are somehow using a non-docker installation in 2022 then this guide might help you. There is not much way to test it, but it should work.

### Kept for historical purposes

Deploying [Discourse on Docker](https://github.com/discourse/discourse_docker) is currently our recommended setup. It avoids many pitfalls installations have, such as misconfigured nginx, sub-optimal Ruby defaults and so on.

The Docker based setup ensures we are all on the same page when diagnosing installation issues and completely eradicates a class of support calls.

Today, all sites hosted by Discourse are on Docker.

This is a basic guide on how to move your current Discourse setup to a Docker based setup.

## Getting started

First, get a blank site with working email installed. Follow the guide at [GitHub - discourse/discourse\_docker: A Docker image for Discourse · GitHub](https://github.com/discourse/discourse_docker) and install a new, empty Discourse instance.

**Tips:**

- Bind the web to a different port than port 80, if you are on the same box. Eg:

- Be sure to enter your email in the developer email section, so you get admin:

- Make sure email is setup and working by visiting `/admin/email` and sending a test email.

- Make sure you have can enter your container `./launcher enter my_container` must work.

**If any of the above is skipped your migration will fail.**

At the end of this process you will have a working website. Carry on.

## Exporting and importing the old site

- Ensure you are running the absolute latest version of Discourse. We had bugs in the export code in the past, make sure you are on latest before attempting an export.

- On your current instance

- On your newly installed docker instance

- Change port binding so its on 80

- Rebuild container `./launcher rebuild app`

Yay. You are done.

> Last edited by @JammyDodger 2024-08-21T13:43:11Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 21, 2022, 10:28pm UTC](https://meta.discourse.org/t/migrate-an-old-discourse-install-to-docker/12439/27 "2022-11-21T22:28:21Z")

</div>


