How I’m Hosting This Site

Just for fun I thought I’d give a quick run down of how I deployed and am self-hosting danielmeeks.net. The site itself is WordPress hosted within an Ubuntu 24.04.2 LTS based Linux Container (LXC) running on the Proxmox hypervisor on x86-64 hardware. I’m using Docker for deployment and all of my variables are set within a docker-compose.yml file. Below is my compose file.

services:
   db:
     image: mariadb:noble
     command: '--default-authentication-plugin=mysql_password'
     volumes:
       - db_data:/var/lib/mysql
     restart: unless-stopped
     environment:
       - MYSQL_ROOT_PASSWORD=<password>
       - MYSQL_DATABASE=<password>
       - MYSQL_USER=<user>
       - MYSQL_PASSWORD=<password>
     expose:
       - 3306
       - 33060
   wordpress:
     image: wordpress:latest
     volumes:
       - wp_data:/var/www/html
     ports:
       - 80:80
      restart: unless-stopped
     environment:
       - WORDPRESS_DB_HOST=<host>
       - WORDPRESS_DB_USER=<user>
       - WORDPRESS_DB_PASSWORD=<password>
       - WORDPRESS_DB_NAME=<name>
volumes:
   db_data:
   wp_data:

Feel free to use my file as a template, just remember that yaml is indentation specific just like python.

The environment variables in angle brackets are unique to my particular installation. The database is MariaDB and port 80 is exposed for access. The site is being proxied via an nginx reverse proxy server to 443. Let’s Encrypt is the certificate authority and the TLS cert itself is generated via certbot for SSL web access.

Let’s take a look at resources.

Resource usage for the WordPress LXC

As you can see it’s running in an unprivileged LXC with one vCPU, 512MB of RAM, 256MB of SWAP, and 32GB of storage. It uses about half of the memory it’s been allocated.

The LXC itself is shutdown and backed up every morning at 4:30 AM to a PBS (Proxmox Backup Server), then brought back online.

Backup schedule for danielmeeks.net

Cloudflare is my domain and DNS provider and it costs about $12 a year. My actual server stack is multiple local x86-64 nodes all connected under one Datacenter structure. A PBS is also located offsite at a colleague’s house where my backups are stored as well. Eventually I will make a post describing my entire lab. For now, hopefully this is enough to go on if you would like to cheaply and easily host your own site.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.