Skip to content

Setup GotHub in a Docker container

Note

Installing an automatic container update tool alongside GotHub is highly recommended. We recommend Watchtower.

Requirements

  • Docker (duh)
  • A web server (we recommend Caddy)

Run method

Note

We recommend you to use the Compose method mentioned below, because it's easier to maintain and update.

Our Docker image is available on the Codeberg registry here.

You can run GotHub in a Docker container by running the following command:

docker run -d --name gothub -p 3000:3000 codeberg.org/gothub/gothub:dev

You can also run the master branch of GotHub by replacing dev with latest. Confusing, right?

Warning

GotHub requires a couple of environment variables if you'd like to get listed on the instances list. We mention the most minimal command up there just in case someone wants to run GotHub locally. You can pass a .env file to the docker run command by adding --env-file .env to the command.

Compose method

We have a compose.yml file available on our Codeberg repository. You can find it here.

You can run GotHub in a Docker container by running the following command:

mkdir gothub
cd gothub
wget https://codeberg.org/gothub/gothub/raw/branch/dev/compose.yml
docker compose up -d

Warning

You should definitely edit the compose.yml file, as it contains a couple of environment variables you should fill out if you want to get listed on the instances list.

Keep GotHub up-to-date

We recommend you get an automatic container update tool alongside GotHub. We recommend Watchtower for this.

If you don't want to use Watchtower, you can update GotHub by running the following command:

docker compose pull && docker compose down && docker compose up -d