sudo useradd -mU -s /bin/bash -u 2000 data
sudo passwd data
sudo gpasswd -a $USER data
sudo curl -sSL https://get.docker.com/ | sh
sudo gpasswd -a $USER docker
sudo cp -f ~/.local/ubuntu/etc/default-docker /etc/default/docker
sudo service docker restart
sudo cp -f ~/.local/ubuntu/etc/default-ufw /etc/default/ufw
sudo ufw reload
sudo ufw allow 4243/tcp
This setup requires a static IP and a bridge network interface. Copy and
paste the following into /etc/network/interfaces
adjusting the primary
network interface (em1), the server's IP address (10.0.0.2) and the
gateway's IP address (10.0.0.1) as necessary:
# The loopback network interface
auto lo
iface lo inet loopback
# The bridge network interface
auto br0
iface br0 inet static
address 10.0.0.2
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
dns-nameservers 10.0.0.2 8.8.8.8 8.8.4.4
bridge_ports em1
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
# The primary network interface
auto em1
iface em1 inet manual
up ip link set $IFACE up promisc on
down ip link set $IFACE down promisc off
Before rebooting, make sure to allow IP forwarding:
sudo echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
sudo reboot now
git clone git@github.com:suderman/docker.git $HOME/docker
export PATH="$PATH:$HOME/docker/bin"
# Server's domain name (all services are subdomains off this)
export DOMAIN="domain.com"
# Server IP Address
export SERVER="10.0.0.2"
# Data directory on Server
export DATA="/data"
# Comma-delimited authentication for services (username:password) base64-encoded
export PASSWORDS="admin:super_secr3t,guest:passw0rd"
# CloudFlare and/or DNSimple API key (email:password)
# router.domain.com should point to the router's public IP address
export CLOUDFLARE="myname@email.com:my-secr3t-passw0rd"
export DNSIMPLE="myname@email.com:my-secr3t-passw0rd"