Docker Server

Create a Droplet on Digital Ocean e.g. server and login.

Tailscale

Enable ssh:

tailscale set --ssh
# if 'server' is the name of your Droplet in Tailscale
ssh root@server

Configure the Firewall (for Tailscale):

_images/2025-12-11-firewall.png

WIP

  • 11/12/2025, Tailscale seems to work whatever I do in the Firewall!!

  • 12/12/2025, Tailscale did not work when I ssh with only the Inbound Rule. I added the Outbound Rule as well.

  • 12/12/2025, apt update does not work when I only have port 41641 open Inbound and Outbound so I accepted the defaults on Outbound Rules.

Install Docker

Create a server user:

# adduser server
# usermod -aG docker server

Login as the server user and create a containers folder:

ssh server@docker-c
mkdir ~/containers/

Containers

Create a folder for each container (application):

mkdir ~/containers/wordpress
cd ~/containers/wordpress

# put your 'compose.yaml' file into the folder e.g.
~/containers/wordpress/compose.yaml

docker compose up -d

# To log into the container
# (in this example, the container is called ``wordpress-wordpress-1``)
docker exec -it wordpress-wordpress-1 bash

Tip

If you are creating a web application, then you can browse to the site using the Tailscale network e.g. http://docker-c:8080/wp-admin/install.php

Database

Restore a dump file:

mysql -u doadmin -pMyDBPassword -h kb-do-user-1026.db.ondigitalocean.com -P 25060 my-database-name < 20251212_0100.sql

If you are using MySQL and you want to use the client from the command line (outside Docker):

apt install mysql-client-core-8.0

Issues

Make sure to add the port number to the WORDPRESS_DB_HOST e.g:

WORDPRESS_DB_HOST: private-kb-do-user-1026db.ondigitalocean.com:25060