Skip to content

Add custom startup hooks - #1632

Open
flx5 wants to merge 1 commit into
netbox-community:developfrom
SUSE:feature/hooks
Open

Add custom startup hooks#1632
flx5 wants to merge 1 commit into
netbox-community:developfrom
SUSE:feature/hooks

Conversation

@flx5

@flx5 flx5 commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

New Behavior

Add a folder for scripts that are run on startup. That way users can then for example create groups at startup.

Contrast to Current Behavior

Currently it is a manual process.

Changes to the Wiki

Automated provisioning:

You can run custom scripts at application startup.

For example the script 01-groups.py would create groups at startup:

from netbox.authentication import Group

for group in [  'admins', 'default-users' ]:
    Group.objects.get_or_create(name=group)

Proposed Release Note Entry

Add custom startup hooks

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

@tacerus

tacerus commented Feb 25, 2026

Copy link
Copy Markdown

Would it make sense to ship this directory (with some dummy file and the *.py in .gitignore) and to mount it in the default docker-compose setup for convenience?

@flx5
flx5 force-pushed the feature/hooks branch 2 times, most recently from fb9dd02 to 255f8b3 Compare February 25, 2026 14:18
Comment thread docker-compose.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants