Hostea is a Forgejo hosting service backend. It creates OpenStack virtual machines and installs Forgejo on them, as instructed by an Ansible inventory. It runs from a CI, every time a commit is pushed to the repository containing the Ansible inventory.

In a nutshell it goes like this:

$ git clone
$ # edit files in fleet
$ git commit -m 'Created the Forgejo instance foobar'
$ git push

And go to the CI dashboard to check that it actually does what is expected. In the following it is assumed that Hostea is configured to run from the content of the repository and manage Forgejo fleet under the domain name


Hostea is configured as as documented in this file and the values can be modified in the ~/.enough/ file.

  • Clone the repository git clone
  • Add the inventory/group_vars/all/domain.yml file to be something like:


  • Add the inventory/group_vars/all/clouds.yml with a dedicated OpenStack tenant
  • Commit and push

Setting the DNS glue record

Once Enough finished installing Hostea, the DNS server is up and ready to answer requests. But the registrar of does not know about it and it must be told by creating a Glue Record. See, for instance, how that [can be done for](

Assuming is checked out in ~/.enough/, it is possible to display the IP of the DNS with:


$ enough --domain info
bind-host ip= port=2222

Once this IP is set to be the Glue Record of the, all DNS requests will be delegated to it and Hostea will take over.


It may take a few hours for the Glue Record to propagate.

Creating a new Forgejo instance

  • pick unique name for the host, for instance hostea001-host
  • git clone
  • cd hostea
  • add the hosts-scripts/ script with the following:
enough --domain host create hostea001-host
enough --domain service create --host hostea001-host forgejo
  • add the inventory/host_vars/hostea001-host/forgejo.yml file using this example.
  • add the inventory/host_vars/hostea001-host/provision.yml file to contain one of the following: * openstack_flavor: ‘{{ openstack_flavor_small }}’ (default) * openstack_flavor: ‘{{ openstack_flavor_medium }}’ * openstack_flavor: ‘{{ openstack_flavor_large }}’
  • add the inventory/hostea001-backup.yml file with the following:
  • add the inventory/hostea001-service.yml file with the following:
    ansible_port: 2222
  • git add .
  • git commit -m ‘Created hostea001-host`
  • git push

Deleting a Forgejo instance

  • git clone
  • cd hostea
  • remove the directory inventory/host_vars/hostea001-host
  • remove the file inventory/hostea001-backup.yml
  • remove the file inventory/hostea001-service.yml
  • edit the hosts-scripts/ script with the following:
enough --domain host delete hostea001-host
  • git add .
  • git commit -m ‘Deleted hostea001-host`
  • git push