How to use Argus with Homarr
In v1.32.0
we added the endpoint /api/info
which returns the current version of Homarr and can therefore be used in Argus to watch for updates.
This guide will show you how to set up a user with apiKey to access the endpoint without providing admin access through it.
Currently an apiKey has the same permissions as the user who created it, however you can only create an apiKey with admin permissions. This means we have to do some extra steps to create a user with only the permissions we need for Argus.
Create a groupโ
In a first step we have to create a group which will allow us to restrict the permissions of the user we will create later.
- Go to
Management
>Users
>Groups
- Click on
Create group
- Enter a name for the group, e.g.
Argus
- Click on
Create group
- Click on the newly created group to edit it
- In the
Permissions
tab, select the admin permission and save the changes
Create a userโ
Now we can create a user which will be used by Argus to access the /api/info
endpoint.
- Go to
Management
>Users
>Manage
- Click on
Create new user
- Enter a username, e.g.
argus
, click next - Enter a password for the user, click next
- Add previously created group
Argus
to the user, click next - Click on next to confirm the user creation
Create an apiKeyโ
Now we want to create therefore we have to log in with the user we just created.
- Log out of Homarr
- Log in with the user we just created
- Go to
Management
>Tools
>API Keys
- Click on
Create API Key
- Copy the generated API key and save it somewhere, you will not be able to see it again
- Logout of Homarr
Reduce permissions of the userโ
Now we can reduce the permissions of the user to only allow access to general authenticated, but not permission restricted endpoints.
- Log in with your admin user
- Go to
Management
>Users
>Groups
- Click on the
Argus
group - In the
Permissions
tab, remove all permissions - Save the changes
Configure Argusโ
Now you can configure Argus to use the user and apiKey we created.
Replace the <secret>
with the apiKey you created and the deployed version url with the url of your Homarr instance.