This is a guide to setup an IOTA node and IPM using docker.

Create directories

mkdir -p /data/iri/conf
mkdir -p /data/iri/data

Download current tangle

cd /data/iri/data
curl --output db.tar.gz https://iota.lukaseder.de/downloads/db.tar.gz
tar zxvf db.tar.gz
mv db/ mainnetdb
rm -f mainnetdb/LOCK

The database image is provided by https://iota.lukaseder.de/ please consider donating a few IOTA to the host as the 9GB download imposes some costs. (The IOTA address can be found on the page itself)

Start docker container

docker run -d \  
  --name iota-node \
  -e API_PORT=14265 \
  -e UDP_PORT=14600 \
  -e TCP_PORT=15600 \
  -e REMOTE_API_LIMIT=nothing \
  -p 15600:15600 \
  -p 14600:14600/udp \
  -v /data/iri/data:/iri/data \
  -v /data/iri/conf/neighbors:/iri/conf/neighbors \
  -e VIRTUAL_HOST=node.foo.bar.com \
  -e VIRTUAL_PORT=14265 \
  -e LETSENCRYPT_HOST=node.foo.bar.com  \
  -e LETSENCRYPT_EMAIL=foo@bar.com \
  bluedigits/iota-node:latest --rescan

Now you have a node running, the API is proxied by nginx companion (Setup).

Please also create a htpasswd file for the api if you use nginx companion or remove -e REMOTE_API_LIMIT=nothing \ from the run command above to disable getNeighbours and add-/removeNode commands.

It may take a while (1 hour for me) until the node has rescanned and is ready, it is ready when latestMilestone and latestSolidSubtangleMilestoneIndex are present with real values like this:

latestMilestone: 'PYGY9ZGIFQDRQRTEKBJXTDLXIXXQR9EJYE9PGMSOVKYYZTJEOU9RAPPZTK9FGWMWECISQIRBDOWDZ9999',  
  latestMilestoneIndex: 302745,
  latestSolidSubtangleMilestone: 'PYGY9ZGIFQDRQRTEKBJXTDLXIXXQR9EJYE9PGMSOVKYYZTJEOU9RAPPZTK9FGWMWECISQIRBDOWDZ9999',
  latestSolidSubtangleMilestoneIndex: 302745,

If you dont want to use nginx-proxy for the api, you can use the following start command. (It disables getNeighbours and add-/removeNode by default)

docker run -d \  
  --name iota-node \
  -e API_PORT=14265 \
  -e UDP_PORT=14600 \
  -e TCP_PORT=15600 \
  -p 15600:15600 \
  -p 14600:14600/udp \
  -p 14265:14265 \
  -v /data/iri/data:/iri/data \
  -v /data/iri/conf/neighbors:/iri/conf/neighbors \
  bluedigits/iota-node:latest --rescan

IOTA Peer Manager

IPM

docker run -d \  
  --name iota-pm \
  --link iota-node \
  -e IRI=http://iota-node:14265 \
  -e VIRTUAL_HOST=ipm.foo.bar.com \
  -e VIRTUAL_PORT=3000 \
  -e LETSENCRYPT_HOST=ipm.foo.bar.com  \
  -e LETSENCRYPT_EMAIL=foo@bar.com \
  michaelermer/iota-peer-manager