this post was submitted on 20 Feb 2025
17 points (94.7% liked)

Selfhosted

42716 readers
482 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I've tried GetHomepage and while I've configured most of it I've had a few troubles due to the instructions being very incomplete and confusing.

The one problem that eluded me was setting paperlessngx widget. Worth nothing that, unlike the other services, paperlessngx is running on docker-compose on my server. While the widget detects the service, it never gets any information

Eventually it just gives an API error

# services.yaml (just the relevant part)
   
     - Paperless-ngx:
        href: http://<myserverhost:port>
        description: Document Management System
        icon: https://static-00.iconduck.com/assets.00/paperless-icon-426x512-eoik3emb.png
        server: paperless
        widget:
          type: paperlessngx
          url: http://<local-ip:port>
          token: <token-configured-inside-paperless>


    #docker.yaml

    paperless:
      host: <local-ip>
      port: <port>    

I'm out of ideas. Unfortunately the only instructions are on the site and they aren't easy to follow if you're not already familiarized with docker.

top 10 comments
sorted by: hot top controversial new old
[–] B0rax@feddit.org 1 points 22 hours ago

Try adding the / after the port in your widget config.

[–] Darkassassin07@lemmy.ca 1 points 1 day ago

What is the api error (click on the red box)?

Likely unable to reach the host provided.

In paperless' docker compose, set 'container_name:' to 'paperless' or similar, then use that same name as the host given to homepage:

   widget:
     type: paperlessngx
     url: "http://paperless:8000/"
     key: [key]
[–] silmarine@discuss.tchncs.de 3 points 1 day ago (1 children)

Where is paperless in relation to homepage? For me i have both of them in the same docker host and same docker network on that host and with that i only need to set the paperless container name in the widget. If paperless is on another machine make sure there is no firewall blocking the port number.

[–] spirinolas@lemmy.world 2 points 1 day ago (1 children)

They are both a docker-compose on the same machine.

[–] silmarine@discuss.tchncs.de 2 points 1 day ago* (last edited 1 day ago)

Then you should be able to do like I said and it might solve whatever is happening. I also have both homepage and paperless in the same docker-compose file. If you set the container name for each container then you can just reference that in homepage widgets. For example here is my homepage and paperless:

homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - /opt/docker/homepage:/app/config
      - /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations)

  paperless:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    container_name: paperless
    restart: unless-stopped
    depends_on:
      - paperless-redis
      - postgres
    networks:
      - proxy
    user: "1000"
    environment:
      - USERMAP_UID=1000
      - USERMAP_GID=1000
      - TZ=Europe/Berlin
      - PAPERLESS_REDIS=redis://paperless-redis:6379
      - PAPERLESS_TIKA_ENABLED=1
      - PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://gotenberg:3000/
      - PAPERLESS_TIKA_ENDPOINT=http://tika:9998/
      - PAPERLESS_DBENGINE=postgresql
      - PAPERLESS_DBHOST=postgres
      - PAPERLESS_DBNAME=paperless
      - PAPERLESS_DBUSER=paperless
      - PAPERLESS_DBPASS=password
    volumes:
      - /opt/docker/paperless/data:/usr/src/paperless/data
      - /opt/docker/paperless/export:/usr/src/paperless/export
      - /opt/docker/paperless/consume:/usr/src/paperless/consume
      - /mnt/paperless:/usr/src/paperless/media

so both have conatiner_name set to the same string as the service name. And in my homepage widgets I just use the container name in the URL, example:

    - Paperless:
        icon: paperless-ngx
        href: https://paperless.local.tld/
        widget:
            type: paperlessngx
            url: http://paperless:8000/
            username: username
            password: password

This only works if they are in the same docker network. If you don't explicitly set the network for the containers and they are in the same compose file then they should be in the same network.

[–] tofubl@discuss.tchncs.de 4 points 1 day ago (1 children)

I don't think it's you. The paperless widget stopped working for me recently after it had been fine before. Similar setup to yours.

It bothered me a little but since the widget isn't actually very useful to me I didn't care to invest more time to get to the bottom of it.

[–] swerler@lemm.ee 2 points 1 day ago* (last edited 1 day ago) (1 children)

Mine works but I'm not in a position to confirm what my yaml looks like, I'll try to remember to check before work.

[–] tofubl@discuss.tchncs.de 1 points 1 day ago (1 children)

Would love to see it.

Here's mine from the Paperless compose.yml (non functional):

  webserver:
    image: ghcr.io/paperless-ngx/paperless-ngx
    [...]
    labels:
      - homepage.group=Productivity
      - homepage.name=Paperless
      - homepage.icon=paperless.png
      - homepage.href=https://[LOCAL URL]
      - homepage.description=Document Management
      - homepage.widget.type=paperlessngx
      - homepage.widget.url=http://[PAPERLESS IP:PORT]
      - homepage.widget.key=[PAPERLESS API TOKEN]

And here's the error from Homepage frontend:

    API Error: Unknown error
    URL: http://[PAPERLESS IP:PORT]/api/statistics/?format=json
    Raw Error:
    {
        "errno": -110,
        "code": "ETIMEDOUT",
        "syscall": "connect",
        "address": "[PAPERLESS IP]",
        "port": [PAPERLESS PORT]
    }
[–] Darkassassin07@lemmy.ca 1 points 1 day ago* (last edited 23 hours ago) (1 children)

"code": "ETIMEDOUT"

Homepage is unable to reach the host you gave it. IP/hostname changed.

Don't use the IP of the container, use its name (which you should set in paperless' compose file: 'container_name: paperless')

[–] tofubl@discuss.tchncs.de 1 points 20 hours ago

I need to use the IP for specific reasons concerning my setup; and I don't want the two containers to share a Docker network.

This used to work exactly as is when I set it up, but doesn't anymore.

I tinkered with it some more now and I found that while I can ping the docker host, I can't actually wget anything from any docker services from within the Homepage container. Currently at a loss why that might be.