-
Acquire a VPS like a Droplet on Digital Ocean.
-
Configure the following DNS A record for the VPS's public IP address: *.yourdomain.
-
Install Docker on the VPS.
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
- Initialize Swarm mode on the VPS by running
docker swarm init.
- You may need to run this command with the
--advertise-addroption if the VPS has multiple IP addresses. Choose the public one. The full command will look likedocker swarm init --advertise-addr pub.lic.ip.add
-
Download backpack's installation scripts by running
git clone https://github.com/baaspack/backpack-installation.git. -
From within the
backpack-installationfolder, update the.envfile:
- Fill in the domain name you used in Step 2 into the DOMAIN variable.
- Fill in the email address you used to register your domain name in the SSL_EMAIL variable.
- From within the
backpack-installationfolder, run the following command. This will read the env variables from the.env& use them to configure your stack:
set -a && . .env && set +a && docker stack deploy -c docker-admin-stack.yml admin- The first time you run this, it will take a minute or two for all the containers to spin up since Docker needs to download their images first. If you'd like to watch their progress, run
watch docker service lsuntil you see theREPLICAScolumn show1/1.
- After a few minutes, see if you can hit https://admin.yourdomain.tld from your browser.
Optional, but recommended:
- add more nodes to your swarm.
- secure your nodes' firewalls by following these instructions. Don't forget to allow traffic through ports 443 & 80 for HTTP/S.