Setting Up My Hugo Blog with Forgejo and Tailscale

Aug 13, 2026

The Goal

I wanted to start a blog where I could talk through technical topics while collaborating with an AI assistant. The key requirements were:

The Setup Process

Step 1: Installing Hugo and Forgejo

Both tools are standalone binaries, which makes deployment simple:

# Install Hugo extended binary
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.165.0/hugo_extended_0.165.0_linux-amd64.tar.gz | tar xz -C ~/bin/

# Install Forgejo
curl -sL https://codeberg.org/forgejo/forgejo/releases/download/v16.0.2/forgejo-16.0.2-linux-amd64 -o ~/bin/forgejo
chmod +x ~/bin/forgejo

Step 2: Creating the Hugo Site

cd ~/Blog && hugo new site . --force
git init
git submodule add https://github.com/yihui/hugo-theme-console.git themes/hugo-theme-console

The hugo-theme-console theme gives us a clean, console/terminal-inspired layout with responsive design that works well on both desktop and mobile devices.

Step 3: Configuring Everything

Key files created:

Step 4: Connecting to Forgejo

The existing Forgejo instance at http://forgejo-1:3000/ was already running on our tailnet. We created the repository and pushed content:

git remote add origin http://forgejo-1:3000/elyons/blog.git
git push -u origin main

Step 5: Tailscale Serve (The Tricky Part)

This was where we hit our first snag. The correct syntax for exposing the Hugo server is:

# First, enable tailscale serve without sudo (one-time setup)
sudo tailscale set --operator=$USER

# Then expose the blog over HTTPS on your tailnet
cd ~/Blog && make serve

The make serve command runs both hugo build and starts Tailscale serve to expose port 1313. Your blog becomes accessible at:

The Workflow Going Forward

Now that everything is set up, the workflow is simple:

  1. Write Content → I create markdown files in content/posts/ with YAML frontmatter
  2. Build Site → make build generates static HTML to public/
  3. Preview Locally → make dev starts live-reload server at http://localhost:1313
  4. Publish via Tailscale → make serve exposes site over HTTPS on tailnet
  5. Version Control → make push commits and pushes to Forgejo

Lessons Learned

Next Steps

This is just the beginning. Future posts will cover:

The beauty of this setup is that content is just markdown files - we can migrate to Cloudflare Pages, Netlify, or any VPS with nginx later without changing the content workflow.


This post was written collaboratively with an AI assistant using Hugo and the hugo-theme-console theme.