This project connects to multiple self-hosted applications (called sources here) and creates an iFrame to be used in any dashboard (not only Homarr, despite the project's name).
The iFrames will be available under the project's API routes, like /v1/iframe/linkwarden
. These routes accept query parameters to change the iFrame, like limiting the number of items or specifying whether you want the iFrames to check for updates automatically (the iframe reloads if the source contents change (like adding new bookmarks on Linkwarden)).
The API can create iFrames for multiple sources, like the Vikunja source that creates an iFrame with your tasks, or the Linkwarden source that creates an iFrame with your bookmarks.
The sources may require environment variables with specific information like the application address or credentials. The way you provide these environment variables depends on how you run the API.
The API docs are under the path /v1/swagger/index.html
, like http://192.168.1.44/v1/swagger/index.html
or https://sub.domain.com/v1/swagger/index.html
, depending on how you access the API.
http://192.168.1.15:8080
) + the source path (/v1/iframe/linkwarden
) + query parameters, like http://192.168.1.15:8080/v1/iframe/linkwarden?collectionId=1&limit=3&theme=dark
.When you add an iFrame to your dashboard, it's >your< web browser that fetches the iFrame from the API and shows it to you, not your dashboard application running on your server. So your browser needs to be able to access the API, that's how an iFrame works.
This project doesn't have any built-in authentication system, so anyone who can access the API will be able to get all information from the API routes, like your Vikunja tasks, Linkwarden bookmarks, etc. You can add an authentication portal like Authelia or Authentik in front of the project to secure it, that's how I do it.
For Docker and Docker Compose: by default, the API will be available on port 8080
and is not accessible by other machines. To be accessible by other machines, you need to run the API behind a reverse proxy or run the container in host network mode.
You can change the API port using the environment variable PORT
.
root
instead of the user 1000
used in the examples and the docker-compose.yml
file.docker run --name homarr-iframes -p 8080:8080 -e VARIABLE_NAME=VARIABLE_VALUE -e VARIABLE_NAME=VARIABLE_VALUE ghcr.io/diogovalentte/homarr-iframes:latest
docker-compose.yml
file in this repository. You can clone this repository to use this file or create one yourself..env
file with the environment variables you want to provide to the API. It should be like the .env.example
file and be in the same directory as the docker-compose.yml
file.docker compose up
go mod download
go run main.go