selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

PyRunner logo

Self-host PyRunner

v2.0.0

Self-hosted Python script automation platform

ReleaseOpen SourceMIT
Updated10 hours ago
LanguagePython
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
167
RAM
1GB minimum (2GB recommended)
Port
8000 (HTTP web interface)
Docker
hasanaboulhasan/pyrun
Install with Docker

What is PyRunner?

PyRunner runs in a single Docker container and provides a web dashboard for managing Python scripts. You can create and edit scripts in a built-in code editor, schedule them with cron expressions or intervals, and run each in its own virtual environment with custom pip packages. Secrets are stored encrypted and injected as environment variables at runtime. The platform integrates with AI providers including Anthropic Claude, OpenRouter, Ollama, and custom Anthropic-compatible endpoints. Scripts can be triggered via HTTP webhooks from services like GitHub, Slack, or Stripe. Every execution captures full stdout/stderr for debugging. The backend uses Django with django-q2 for background tasks, SQLite by default with optional PostgreSQL, and Tailwind CSS for the frontend.

Should you self-host PyRunner?

PyRunner scores 45/100 on selfhost.directory (how scoring works) and ranks #22 of 26 in Automation. It has 167 GitHub stars.

It shipped 5 stable releases in the past year. The latest, v2.0.0, came out on 23 October 2026. New versions land roughly every 8 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Node RED (81/100, 23 791 stars). It scores higher overall, so compare the two before you pick. See PyRunner vs Node RED side by side.

Features

  • AI Integration
  • Flexible scheduling
  • Invite-Only Authentication
  • Managed Databases
  • Notifications
  • Run History & Logs
  • Script Management
  • Secrets Management
  • Single-Container Deployment
  • Vector Stores
  • Virtual Environments
  • Webhook Triggers

PyRunner README

How to install PyRunner

Install PyRunner with Docker

Environment variables
SECRET_KEY, ENCRYPTION_KEY, DEBUG, ALLOWED_HOSTS, SECURE_SSL_REDIRECT, SESSION_COOKIE_SECURE, CSRF_COOKIE_SECURE

docker run -d --name pyrunner -p 8000:8000 -v pyrunner_data:/app/data -v pyrunner_plugins:/app/plugins --pids-limit 2048 -e SECRET_KEY='' -e ENCRYPTION_KEY='' -e DEBUG=False -e ALLOWED_HOSTS=localhost -e SECURE_SSL_REDIRECT=False -e SESSION_COOKIE_SECURE=False -e CSRF_COOKIE_SECURE=False hasanaboulhasan/pyrun:latest

Generate SECRET_KEY and ENCRYPTION_KEY first using the commands in the documentation

How to configure PyRunner

  • ALLOWED_HOSTSlocalhost,127.0.0.1Comma-separated hostnames this instance answers on

    Comma-separated hostnames this instance answers on

  • CSRF_COOKIE_SECURETrueCSRF cookies require HTTPS

    CSRF cookies require HTTPS

    values: True, False

  • DATABASE_URLPostgreSQL connection URL (leave unset for SQLite default)

    PostgreSQL connection URL (leave unset for SQLite default)

  • DEBUGFalseDebug mode (disable in production)

    Debug mode (disable in production)

    values: True, False

  • DEFAULT_FROM_EMAILnoreply@pyrunner.localDefault from email address

    Default from email address

  • EMAIL_BACKENDdjango.core.mail.backends.console.EmailBackendEmail backend

    Email backend

  • ENCRYPTION_KEYFernet key for encrypting stored secrets

    Fernet key for encrypting stored secrets

  • GUNICORN_THREADS4Gunicorn threads per worker

    Gunicorn threads per worker

  • GUNICORN_TIMEOUT120Gunicorn timeout in seconds

    Gunicorn timeout in seconds

  • GUNICORN_WORKERS2Gunicorn worker processes

    Gunicorn worker processes

  • PORT8000Container internal port

    Container internal port

  • PYRUNNER_ALLOW_PRIVATE_NETWORKFalseAllow outbound connections to private networks

    Allow outbound connections to private networks

    values: True, False

  • PYRUNNER_BACKUP_MAX_EXPANDED_MB256Max expanded backup size for browser restore

    Max expanded backup size for browser restore

  • PYRUNNER_DATA_DB_URLPostgreSQL URL for managed databases feature

    PostgreSQL URL for managed databases feature

  • PYRUNNER_VECTOR_CACHE_MB256Memory budget for vector search cache

    Memory budget for vector search cache

  • Q_WORKERS2Background task workers

    Background task workers

  • REDIS_URLRedis connection URL for cache (optional)

    Redis connection URL for cache (optional)

  • RESEND_API_KEYResend API key for email

    Resend API key for email

  • SECRET_KEYDjango secret key (container exits if unset)

    Django secret key (container exits if unset)

  • SECURE_SSL_REDIRECTFalse301 http->https redirect

    301 http->https redirect

    values: True, False

  • SESSION_COOKIE_SECURETrueSecure cookies require HTTPS

    Secure cookies require HTTPS

    values: True, False

  • USE_RESENDFalseUse Resend for email

    Use Resend for email

    values: True, False

PyRunner releases & version history

More in Task Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…