We are using own virtual server with Dokploy for staging.
Create some cheap server with 4 GB memory.
Create firewall rules:
ICMPopen for everyoneTCP 80open for everyoneTCP 443open for everyoneTCP 22only for admin’s IP addressTCP 3000only for admin’s IP address
Get new server IP4 and IP6 address.
Add A and AAAA DNS record for hplush.dev.
Add CNAME for cloud to hplush.dev.
Connect to the server by IP address: ssh root@hplush.dev
Update system:
apt update && apt upgrade -yAdd custom user and disconnect.
sudo adduser ai
sudo usermod -aG sudo ai
mkdir -p /home/ai/.ssh
cp /root/.ssh/authorized_keys /home/ai/.ssh/
chown -R ai:ai /home/ai/.ssh
chmod 700 /home/ai/.ssh
chmod 600 /home/ai/.ssh/authorized_keys
exitConnect with new user and DNS name: ssh ai@hplush.dev.
Install basic tools:
sudo apt-get install microSet bash settings by adding to micro ~/.bashrc:
export PS1="\n\e[01;31m\h \e[01;36m\w\n\e[0;32m❯\e[m "
alias ..='cd ..'Disable root SSH access and text password in sudo micro /etc/ssh/sshd_config:
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
PubkeyAuthentication yesInstall tool to prevent SSH brute-force:
sudo apt install fail2ban -y
sudo systemctl enable fail2banCreate /etc/fail2ban/jail.local config:
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
mode = aggressive
maxretry = 3
findtime = 1h
bantime = 24hReboot the system:
sudo reboot nowGet token for Ubuntu Pro.
Enable auto-update with kernel live patch:
sudo apt install ubuntu-advantage-tools -y
sudo pro attach YOUR_TOKEN
sudo dpkg-reconfigure -plow unattended-upgradesRun script:
curl -sSL https://dokploy.com/install.sh | sudo shCreate account in web UI.
Set cloud.hplush.dev in /dashboard/settings/server.
Add Docker access to admin user.
sudo usermod -aG docker aiCreate domains:
dev.slowreader.app:A/AAAAto server’s IP addresses.server.dev.slowreader.app:CNAMEtodev.slowreader.app.proxy.dev.slowreader.app:CNAMEtodev.slowreader.app.*.app.hplush.dev:CNAMEtodev.slowreader.app.
Create Slow Reader organization with Slow Reader Dev project.
Define project’s environment:
STAGING=1Create Web application with slowreader-dev-web name and dev.slowreader.app domain to 8000 domain with HTTPS. Enable Docker deployment from ghcr.io/hplush/slowreader-web:dev.
Create Database of postgres:18 with slowreader-dev-database name.
Create Server application with slowreader-dev-server name and server.dev.slowreader.app domain to 2554 domain with HTTPS. Enable Docker deployment from ghcr.io/hplush/slowreader:dev. Environment variables:
ASSETS=
PROXY_ORIGIN=
DATABASE_URL=<COPY FROM DATABASE UI>Create Proxy application with slowreader-dev-proxy name and proxy.dev.slowreader.app domain to 5284 domain with HTTPS. Enable Docker deployment from ghcr.io/hplush/slowreader-proxy:dev. Environments:
PROXY_ORIGIN=^https:\/\/dev\.slowreader\.app$Copy application ID (last part of application’s URL) to applicationId in GitHub workflows.
Create new token in Dokploy and set as DOKPLOY_TOKEN secret in GitHub.