Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
September 19, 2021 23:02
May 20, 2020 23:25
September 19, 2021 23:11
May 21, 2020 03:38
September 19, 2021 19:02
September 19, 2021 19:04
May 21, 2020 02:56
August 15, 2023 01:03
May 3, 2023 18:40
March 12, 2022 19:38
May 21, 2020 03:38


Synology Package Repository

Build Discord



  1. Install dependencies with poetry install
  2. Run the next commands in the virtual environment poetry shell
  3. Create the tables with python create
  4. Populate the database with some fake packages with python populate
  5. Add an user with python user create -u Admin -e admin@admin.adm -p adminadmin
  6. Grant the created user with Administrator permissions python roles add admin@admin.adm admin
  7. Grant the created user with Package Administrator permissions python roles add admin@admin.adm package_admin
  8. Grant the created user with Developer permissions python roles add admin@admin.adm developer

To reset the environment, clean up with python clean.


  1. Start the development server with python run
  2. Website is available at http://localhost:5000
  3. Admin interface is available at http://localhost:5000/admin
  4. NAS interface is available at http://localhost:5000/nas
  5. API is available at http://localhost:5000/api
  6. Run the test suite with poetry run pytest -v

Docker Compose Run

It is also possible to start a development environment with postgres database using docker compose:

  1. Build and run docker-compose up --build
  2. On first run you can apply database migrations with docker exec spkrepo_spkrepo_1 python db upgrade. Also run any other command that you need (populate the databse, create user) as mentioned above but by prefixing with docker exec {container_id} [...].
  3. Browse to http://localhost:5000
  4. To tear down the environment, run docker-compose down --remove



Create a config file ./ to disable debug logs, connect to a database, set a secure key and optionally set a cache:

Use LC_CTYPE=C tr -cd '[:print:]' < /dev/urandom | head -c 64 or base64 < /dev/urandom | head -c 64 to get a random string

DEBUG = False
SECRET_KEY = "Please-change-me-to-some-random-string"
SQLALCHEMY_DATABASE_URI = "postgresql://user:pass@localhost/dbname"
CACHE_TYPE= "simple"
# For signing packages
GNUPG_PATH= "/usr/local/bin/gpg"


Example usage:

docker run -it --rm --name spkrepo -v $(pwd)/data:/data -p 8000:8000

Additional configuration can be mounted in the container and loaded by putting the path into SPKREPO_CONFIG environment variable.


docker run -it --rm --name spkrepo -v $(pwd)/data:/data -v $(pwd)/ -e SPKREPO_CONFIG=/ -p 8000:8000

Serve app via a WSGI server.


pip install gunicorn
SPKREPO_CONFIG="$PWD/" gunicorn -w 4 'wsgi:app'

Add migration

cd migrations/
alembic revision -m "update build path length"