SHSF (Self-Hostable Serverless Functions)
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
-
Clone the repository
git clone https://github.com/Space-Banane/shsf.git cd shsf -
Configure environment
cp .env.example .env nano .env # Edit configuration to your needs -
Start the services
docker-compose up -d -
Access the interface
Open your browser and navigate to
http://localhost:3000(or your configured port)
📖 Usage
Getting Started
-
Initial Setup
- Open the web interface in your browser
- Register as an admin user (first registration becomes admin)
- Log in with your credentials
-
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
-
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