Skip to content

[Feature] Built-in automatic task to synchronize with local app store #13026

@willow-god

Description

@willow-god

1Panel Version

v2.2.1

Please describe your needs or suggestions for improvements

Remote application stores already support automatic synchronization, but local application stores currently require manual synchronization.

For users who maintain their own local application stores and frequently update application definitions, it is inconvenient to manually enter the panel and click the Sync button after every update. This can also lead to situations where application updates are not reflected in 1Panel in a timely manner because synchronization was forgotten.

It would be helpful if local application stores could provide a similar experience to remote application stores regarding synchronization.

Please describe the solution you suggest

I suggest providing one of the following solutions:

Add a built-in automatic synchronization feature for local application stores.
Allow users to configure a synchronization interval or Cron expression.
Execute the same synchronization process currently triggered by the manual Sync button.
Record synchronization results in task logs for troubleshooting.

Alternatively, if automatic synchronization is not planned, it would also be helpful to provide an officially supported and documented API endpoint for synchronizing local application stores, allowing users to implement automation themselves through scheduled tasks or CI/CD workflows.

Additional Information

I attempted to implement automatic synchronization myself using a scheduled task and the panel API, but I was unable to find clear documentation for synchronizing local application stores.

For example, I tried the following script:

#!/bin/bash

ONEPANEL_URL="https://1p.example.com"
ONEPANEL_APIKEY="API_KEY"

timestamp=$(date +%s)
token=$(echo -n "1panel${ONEPANEL_APIKEY}${timestamp}" | md5sum | awk '{print $1}')

curl -X POST "${ONEPANEL_URL}/api/v2/apps/sync/local" \
  -H "1Panel-Timestamp: $timestamp" \
  -H "1Panel-Token: $token"

However, the request always returns:

{"code":400,"message":"请求参数错误: EOF","data":null}

This suggests that additional request parameters may be required or that the API is not intended for external use.

Providing either built-in automatic synchronization or an officially documented synchronization API would make local application stores much easier to maintain and automate.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions