# Install Docker with AUFS on Linode

**URL:** <https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831>\
**Category:** Sysadmins\
**Tags:** docker, how-to\
**Created:** [February 19, 2016, 2:59am UTC](https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831 "2016-02-19T02:59:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)\
**Post date:** [February 19, 2016, 2:59am UTC](https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831/1 "2016-02-19T02:59:04Z")

</div>

The [30-minute Discourse installation guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) assumes you’ll be using Digital Ocean and makes no mention of an important requirement for Docker:

> If you use another hosting provider, you should really make sure that a Linux kernel feature called “[AUFS](https://docs.docker.com/engine/userguide/storagedriver/aufs-driver/)” is supported. Docker not using AUFS can cause [terrible pain](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/37).

If you want to use Linode, here’s how to enable AUFS support in Ubuntu (for other OSes, refer to [Linode’s guide](https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distribution-supplied-kernel-with-kvm) and update the instructions below accordingly:

1. Create the Linode and pick Ubuntu 14.04 LTS
2. Resize the main disk down to allow for a larger swap partition than the default 512MB. For example, for the $10 Linode 1024, resize the main partition to 22528MB, then resize the swap partition to 2048MB.
3. Boot
4. SSH into the VPS and run the following commands while remaining root:
5. `sudo apt-get update`
6. `apt-get install -y linux-image-virtual grub2 mc htop`

- Optional: run `htop` and confirm the swap is 2048MB

1. Choose the main disk for Grub to boot from, if asked
2. `mcedit /etc/default/grub` and match the config to these settings:  
`GRUB_CMDLINE_LINUX="console=ttyS0,19200n8"`  
`GRUB_DISABLE_LINUX_UUID=true`  
[?: `GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"` was present in the guide, but I didn’t find it to be necessary]
3. Save and run `update-grub`
4. In your Linode’s Dashboard, Click on Edit under the Configuration Profiles section.
5. In the Boot Settings section, select GRUB 2 from the Kernel drop down menu
6. Save changes and reboot.
7. SSH in again and run [these commands](https://gist.github.com/parente/025dcb2b9400a12d1a9f) (credit Peter Parente):  
`apt-get -y install linux-image-extra-$(uname -r)`  
`sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"`  
`sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"`  
`apt-get update`  
`apt-get -y install lxc-docker`
8. Confirm that you have AUFS support by running `docker info`. You should _not_ see `devicemapper`.
9. Continue with the Discourse installation guide, starting with “[Install Discourse](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md#install-discourse)” (since you have already installed Docker).

**Disclaimer** : I don’t exactly understand everything that’s going on here, but I’ve just performed these steps, and they’ve worked for me. Here’s Docker using AUFS:

```plaintext
root@localhost:/var/discourse# docker info
Containers: 0
Images: 7
Server Version: 1.9.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 7
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-77-generic
Operating System: Ubuntu 14.04.1 LTS
CPUs: 1
Total Memory: 993.9 MiB
Name: localhost

```

Note that this method of installing Docker might not add it to the startup script. I found that was fixed by launching the app and rebooting the Linode later.

---

_[View the full topic](https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831)._
