Prerequisites

  • A GitLab account (cloud or self-hosted) with a repository containing your static site
  • A statichost.uk account (sign up free)

Step 1: Create a Site

  1. Log in to your statichost.uk dashboard
  2. Click New Site
  3. Enter your site name and GitLab repository URL
    • For GitLab.com: https://gitlab.com/username/repo.git
    • For self-hosted: https://your-gitlab.example.com/username/repo.git
  4. Select your branch (usually main)
  5. Choose your framework (Hugo, Jekyll, or Static)
  6. Set the publish directory

Step 2: Add Deploy Key (Private Repos)

If your repository is private:

  1. In your site settings, copy the SSH deploy key
  2. Go to your GitLab project → SettingsRepositoryDeploy keys
  3. Click Add key
  4. Paste the key and give it a title
  5. Leave “Write access” disabled

Step 3: Set Up Webhooks

GitLab webhooks enable automatic deployments:

  1. In your site settings, copy the Webhook URL and Webhook secret
  2. Go to your GitLab project → SettingsWebhooks
  3. Enter the webhook URL
  4. Paste the secret token
  5. Check Push events
  6. Uncheck SSL verification if using a self-signed certificate on your GitLab instance
  7. Click Add webhook

Self-Hosted GitLab

statichost.uk fully supports self-hosted GitLab instances. The setup is identical — just use your self-hosted GitLab URL when creating the site.

Requirements for self-hosted GitLab:

  • Your GitLab instance must be accessible from the internet (we need to clone the repo and receive webhooks)
  • SSH access on port 22 (for deploy key cloning)
  • HTTPS webhook endpoint (for push notifications)

If your self-hosted GitLab uses a non-standard SSH port, include it in the repository URL configuration.

Step 4: Deploy

Push to your configured branch or click Deploy in your dashboard. Your GitLab webhook will trigger an automatic build and your site will be live within seconds.

Adding a Custom Domain

  1. Go to your site → Domains
  2. Click Add Domain and enter your domain name
  3. Add the DNS records shown with your domain registrar
  4. Click Verify — your TLS certificate is issued automatically
  5. Set as primary domain to redirect all traffic