Installation lacks missing content

My version of HedgeDoc is: 1.10.3

What I expected to happen: All HedgeDoc content would appear when browsed

Procedure

We follow the instructions on:

https://docs.hedgedoc.org/setup/docker/
https://docs.hedgedoc.org/setup/manual-setup/

After the step ‘After executing docker-compose up , HedgeDoc should be available at http://localhost:3000’ is reached, we navigate a web browser to the HedgeDoc server address and port.

What actually happened:

We see a partial window with missing content and broken links.

I already tried:

  1. Adding the Caddyfile fragment to reverse proxy from localhost:3000
  2. Changing the HedgeDoc config.json to serve from a public address
  3. Reviewing the (inactive) firewall configuration on the computer
  4. Trying both manual installation and docker installation

Hi @michael and welcome to the HedgeDoc community!

This looks as if your configuration is a bit incomplete. Did you follow the configuration advice over here?

https://docs.hedgedoc.org/guides/reverse-proxy/#using-a-reverse-proxy-with-hedgedoc

Thanks Erik! I couldn’t follow the official HedgeDoc webserver configuration advice, because the new Caddy proxy server is not documented at all on that page. I will try to use the information for Ngix I guess, if you think this will solve the problem.

However, even when I use no webserver at all and let HedgeDoc serve everything (by changing the config.json file to serve on a public address) the problem is still there.

I’m really struggling to get Hedgedoc running correctly.

Here is my compose.yaml file:

services:
  database:
    image: postgres:13.4-alpine
    environment:
      - POSTGRES_USER=hedgedoc
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=hedgedoc
    volumes:
      - database:/var/lib/postgresql/data
    restart: always
  app:
    # Make sure to use the latest release from https://hedgedoc.org/latest-release
    image: quay.io/hedgedoc/hedgedoc:1.10.3
    environment:
      - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
      - CMD_DOMAIN=pad.myhost.tld
      - CMD_HOST=localhost
      - CMD_URL_ADDPORT=true
    volumes:
      - uploads:/hedgedoc/public/uploads
    ports:
      - "3000:3000"
    restart: always
    depends_on:
      - database
volumes:
  database:
  uploads:

Hey @michael,

if you specify CMD_URL_ADDPORT to be true, you need to access the page via http://pad.myhost.tld:3000.

I think this section should explain it best https://docs.hedgedoc.org/guides/reverse-proxy/#configure-asset-link-generation

This is working so poorly that I decided to remove all proxy logic.

If I change the environment section of the compose file like this:

  - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
  - CMD_DOMAIN=pad.host.tld
  - CMD_HOST=pad.host.tld
  - CMD_PORT=80
  - CMD_URL_ADDPORT=false
ports:
  - "80:80"

…then I would expect Hedgedoc to serve normally, without any other server or proxy.

$ sudo docker-compose up
 ✔ Container hedgedoc-database-1  Creat...                                 0.0s 
 ✔ Container hedgedoc-app-1       Created                                  0.0s 
Attaching to app-1, database-1
database-1  | 
database-1  | PostgreSQL Database directory appears to contain a database; Skipping ...
[...]
app-1       | 2025-04-22T08:19:51.729Z error:   An uncaught exception has occured.
app-1       | 2025-04-22T08:19:51.731Z error:   listen EADDRNOTAVAIL: address not available 123.456.789.123:80
app-1       | 2025-04-22T08:19:51.731Z error:   Process will exit now.

There is no firewall or strange networking and there are no processes using port 80 on any ip in this system (verified with netstat) so I assume that the Hedgedoc sources are responsible for this failure, is that your impression as well?

After a week of confusion and work, here is what I concluded. In order to make the default configuration (as documented) work on a new computer without any webserver or proxy sorftware, change CMD_DOMAIN=localhost to become your domain name (according to the DNS A record.)

In order to make the default configuration (as documented) work on a new computer with a reverse proxy server, change CMD_DOMAIN=localhost to become your domain name (according to the DNS A record) and set CMD_URL_ADDPORT=false. If using TLS (HTTPS URLs) then add USESSL=true.

If the reverse proxy is served by Caddy, here is the configuration fragment:

your.hostname.tld {
reverse_proxy localhost:3000
}