2025-12-01 08:20:32 +01:00
2025-12-01 08:20:32 +01:00
2025-12-01 08:20:32 +01:00
2025-12-01 08:20:32 +01:00
2025-12-01 08:20:32 +01:00
2025-11-01 13:32:45 +01:00
2025-12-01 08:20:32 +01:00
2025-12-01 08:20:32 +01:00
2025-04-03 00:04:26 +02:00
2025-12-01 08:20:32 +01:00

SHSF (Self-Hostable Serverless Functions)

License: MIT Docker

A lightweight, self-hostable serverless functions platform for running functions on your own infrastructure. Perfect for developers who want the convenience of serverless without vendor lock-in.

🌟 Overview

SHSF allows you to deploy and manage serverless functions on any infrastructure you control - from powerful servers to Raspberry Pis or even that old computer gathering dust in your closet. With support for multiple runtimes and easy management through a web interface, SHSF brings serverless capabilities to your homelab or private cloud.

Features

  • 🏠 Self-Hosted: Run on your own infrastructure with complete control
  • 🚀 Multiple Runtimes: Support for Python (Node.js coming soon)
  • 🌐 Web Interface: Easy-to-use dashboard for function management
  • 📊 Data Handling: Seamless input/output data passing
  • 🔧 Environment Variables: Secure configuration management
  • Cron Jobs: Schedule functions to run automatically
  • 🔗 HTTP Triggers: REST API endpoints for your functions
  • 🐳 Docker Ready: Simple deployment with Docker Compose
  • 📈 Scalable: Works on everything from Raspberry Pi to enterprise servers

📋 Prerequisites

Before installing SHSF, ensure you have:

  • Docker: Version 20.10 or later
  • Docker Compose: Version 2.0 or later
  • Git: For cloning the repository
  • At least 512MB RAM: Minimum system requirements

🚀 Installation

Quick Start

  1. Clone the repository

    git clone https://github.com/Space-Banane/shsf.git
    cd shsf
    
  2. Configure environment

    cp .env.example .env
    nano .env  # Edit configuration to your needs
    
  3. Start the services

    docker-compose up -d
    
  4. Access the interface

    Open your browser and navigate to http://localhost:3000 (or your configured port)

📖 Usage

Getting Started

  1. Initial Setup

    • Open the web interface in your browser
    • Register as an admin user (first registration becomes admin)
    • Log in with your credentials
  2. Create Your First Function

    • Click "Create Function" in the dashboard
    • Choose your runtime (currently Python supported)
    • Write your function code
    • Configure input/output parameters
    • Save and deploy
  3. Invoke Functions

    • Manual: Click "Run" in the web interface
    • HTTP: Use the generated API endpoint
    • Scheduled: Set up cron jobs for automatic execution

Function Structure

Python function example:

def main(args):
    # Your function logic here
    name = args.get('body', {}).get('name', 'World')
    return f"Hello, {name}!"

🔧 API Reference

Function Execution

# HTTP trigger
POST FUNCTION_URL/exec
Content-Type: application/json

{
    "input": {
        "key": "value"
    }
}

🗺️ Roadmap

  • SHSF ACTION(soon) runtime support
  • Function versioning
  • Metrics and monitoring dashboard
  • Function templates library
  • Function marketplace

🤝 Contributing

I'm welcome contributions!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Ai Generated Content

This README, except this part, was fully generated by Github Copilot. You'll notice


Made with ❤️ for the self-hosting community

S
Description
Ever wanted to have Serverless functions hostable? Well now you can!
Readme 3.4 MiB
Languages
TypeScript 97.7%
Python 1.4%
Go 0.5%
JavaScript 0.2%