Homepage HTTP Error 404 API request to my portainer #4437
-
DescriptionHello, im experincing a weird problem with my homelab, which im in the progress of setting up. The API key was created in the Access token on the web interface of portainer. This is the logs of my homepage container: Does any1 have an idea to whats happening? homepage versionv0.9.13 Installation methodDocker Configuration- Portainer:
href: url:9000
description: portainer
icon: portainer.png
siteMonitor: url:9000
widget:
type: portainer
url: url:9000
key: api_key Container Logs(error: HTTP Error 500 calling http://url:9000/api/endpoints//docker/containers/json?all=1) Browser LogsAPI Error: Unknown error TroubleshootingLogs etc. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
EDIT: i found out you need a env file. created a file in my app/config directory called .env and wrote: But now it says: API Error: Invalid JWT token |
Beta Was this translation helpful? Give feedback.
-
There is no requirement or expectation that you use ENV variables for any of this, but that is fine if you prefer to do it that way. I'd suggest, however, that you make sure it's working the most basic way first (e.g. copy and pasting the API key into the config example in your original post). Perhaps the problem was that the config in your original post was missing the Finally, note that changing environment variables (like |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically closed because it was marked as answered. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
There is no requirement or expectation that you use ENV variables for any of this, but that is fine if you prefer to do it that way. I'd suggest, however, that you make sure it's working the most basic way first (e.g. copy and pasting the API key into the config example in your original post).
Perhaps the problem was that the config in your original post was missing the
env: 2
line, which refers to the portainer environment, not anything to do with using ENV variables (.env) in docker.Finally, note that changing environment variables (like
HOMEPAGE_VAR_...
) in docker requires re-creating (not just restarting) a container.