# Ubuntu 16.04 LTS - upgrade or migrate?

**URL:** <https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751>\
**Category:** Self-hosting\
**Created:** [2016年十月19日 19:41 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751 "2016-10-19T19:41:11Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2016年十月19日 19:41 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/1 "2016-10-19T19:41:11Z")

</div>

I’ve finally found a moment to breathe between my various other projects, which means I’ve a few idle cycles to think about our Discourse environments and how, when or if we should approach the Ubuntu 16.04 LTS upgrade.

Ubuntu 14.04 is supported through until late 2019, so there’s no huge rush to accomplish this, but I like to check in on such topics and at least be aware of the potential risks and benefits. From what I can see elsewhere 16.04 is officially supported for fresh installations, but has anyone weighed up upgrading the OS versus migrating the Discourse install to a clean box?

From what I can gather, hosts such as DO will leave 16.04 machines on an older kernel that may not be upgradable for some time, are there any other gotchas?

Has anyone successfully upgraded their machines from 14.04-\>16.04? What state was Discourse in post-install?

---

<div class="post-metadata">

**Author:** ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)\
**Post date:** [2016年十月19日 19:53 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/2 "2016-10-19T19:53:07Z")

</div>

I did an upgrade on two droplets on DO for a client. I had a bit of an issue with Docker that I had to reinstall on one droplet (I didn’t do the install and I had trouble with Docker on this droplet before that) but other than that, it went well on both. No trouble with the database or anything else. If you do a backup or even better a snapshot, you don’t have to worry.

The duration was about 15 minutes. The forum is still running the first minutes, but not for the rest.

If I remember correctly, you may have to do a

```
cd /var/discourse
./launcher restart app

```

After the upgrade, but I’m not sure.

---

<div class="post-metadata">

**Author:** ![Grex315](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grex315/32/115868_2.png) [@Grex315](https://meta.discourse.org/u/Grex315)\
**Post date:** [2016年十月19日 20:27 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/3 "2016-10-19T20:27:38Z")

</div>

I upgraded from 14.04-\>16.04 on a DO droplet. All went well except I had to add the new repository for Xenial for Docker and update it. Did a restart app as @Steven said and I was up and running again.

All your third party apt repositoires will be disabled when you upgrade as you need to point them to new Xenial ones if needed.

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [2016年十月19日 20:28 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/4 "2016-10-19T20:28:12Z")

</div>

On my Windows 10 localhost set-up I installed VMware Player.  
I created a VM using the `ubuntu-16.04-desktop-amd64.iso` image.  
I then installed Discourse following [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) but skipping the “cloud server” stuff.

The “Discourse Advanced Developer Install Guide” has

> To get your Ubuntu 16.04 LTS install up and running to develop Discourse and Discourse plugins follow the commands below.

So based on that and my not having had any noticeable problems using Ubuntu 16.04 LTS on my localhost, I think either version would work OK.

Just the same, to be safe I think it would be wise to try 16.04 in a staging set-up before making the switch on a live site.

---

<div class="post-metadata">

**Author:** ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)\
**Post date:** [2016年十月20日 03:39 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/5 "2016-10-20T03:39:57Z")

</div>

FWIW, I’ve clean installed docker+discourse on clean 16.04 LTS without any glitches.

---

<div class="post-metadata">

**Author:** ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)\
**Post date:** [2016年十月20日 12:20 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/6 "2016-10-20T12:20:41Z")

</div>

The only minor issue I’ve had on 16.04 (clean or upgraded) is that when I reboot the droplet (only on droplets who have a swap), the forum takes ~5 minutes to come back instead of 1 min on 14.04.

It’s more a Ubuntu issue tho.

---

<div class="post-metadata">

**Author:** ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)\
**Post date:** [2016年十月20日 12:55 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/7 "2016-10-20T12:55:38Z")

</div>

Is it necessary to upgrade to 16.04 LTS or i could stay with v14.04 itself?

---

<div class="post-metadata">

**Author:** ![PaulSolt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulsolt/32/120561_2.png) [@PaulSolt](https://meta.discourse.org/u/PaulSolt)\
**Post date:** [2019年二月12日 19:23 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/8 "2019-02-12T19:23:07Z")

</div>

I was debating upgrading my 14.04 install, but was’t sure if I should. However, when I updated docker, it broke my discourse setup.

I attempted to upgrade using the script from the notes [How do I manually update Discourse and Docker image to latest?](https://meta.discourse.org/t/how-do-i-manually-update-discourse-and-docker-image-to-latest/23325)

```
wget -qO- https://get.docker.com/ | sh

```

Error!

```
/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam

```

I noticed on Docker’s website the minimum verison was Ubuntu 16.04.

I attempted to downgrade docker back to what I had (17.05.0~ce-0~ubuntu-trusty), but couldn’t get it to work with this command:

```
sudo apt-get install docker-ce=17.05.0~ce-0~ubuntu-trusty docker-ce-cli=17.05.0~ce-0~ubuntu-trusty containerd.io

```

Everyone seems to recommend a fresh install, but I don’t know how to do that with my limited experience with Digital Ocean/Ubuntu … and all the steps it seems to require.

So in my final attempt I updated Ubuntu 14.04 to 16.04 and everything worked again with Docker.

```
do-release-upgrade

```

Note: I backed up everything after updating my Discourse install, before I attempted to install system updates.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年二月12日 19:28 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/9 "2019-02-12T19:28:31Z")

</div>

Yep, my standard practice now for any OS dot release is an in-place upgrade, for anything more I just move backups to a new server, copy the yml files over and reinstall. It’s very quick, and almost completely painless.

---

<div class="post-metadata">

**Author:** ![PaulSolt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulsolt/32/120561_2.png) [@PaulSolt](https://meta.discourse.org/u/PaulSolt)\
**Post date:** [2019年二月13日 02:42 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/10 "2019-02-13T02:42:06Z")

</div>

> [@Stephen](#):
>
> I just move backups to a new server, copy the yml files over and reinstall.

Are you hosting on Digital Ocean or elsewhere? What process do you follow when you migrate to a new server?

It seemed like a lot more hoops to jump through with Digital Ocean in having to spin up a new Droplet, migrate, and spin-down? an older server.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年二月13日 02:44 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/11 "2019-02-13T02:44:45Z")

</div>

Sure, that’s exactly what you do, just re-run the 30 minute install, which thee days takes me 10 minutes or less, copy over your yml, repoint DNS and restore the backup.

We’re talking about an operation you do once every couple of years at best, if you’re trying to minimise risk of an OS upgrade hosing docker it’s a small price to pay.

Servers costs are prorated, and you’re not going to parallel run for long at all.

---

<div class="post-metadata">

**Author:** ![PaulSolt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulsolt/32/120561_2.png) [@PaulSolt](https://meta.discourse.org/u/PaulSolt)\
**Post date:** [2019年二月13日 03:02 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/12 "2019-02-13T03:02:53Z")

</div>

Thanks! I’ll give that a try next time. I haven’t done this much before, so it’s challenging when issues pop up.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年二月13日 04:02 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/13 "2019-02-13T04:02:55Z")

</div>

I just migrated to a new server for one of my personal Discourse sites, and while I was at it, we did a complete pass on the #howto docs for migrating your Discourse from server to server (via backups) recently. They’re in very good shape. 🤗

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2022年三月5日 16:06 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/14 "2022-03-05T16:06:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2023年三月28日 03:21 UTC](https://meta.discourse.org/t/ubuntu-16-04-lts-upgrade-or-migrate/51751/15 "2023-03-28T03:21:44Z")

</div>


