Trusted-CGI logo

Trusted-CGI

  •  0 ratings
In category: Software Development / FaaS & Serverless

About Trusted-CGI

Lightweight self-hosted lambda/applications/cgi/serverless-functions platform.

  •   1111  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Self-host this app for $0.99/mo only!

Languages/Platforms/Technologies:
Lincenses:

More about Trusted-CGI

Trusted-CGI

license donate

Lightweight self-hosted lambda/applications/cgi/serverless-functions engine.

see docs

Features:

  • No specific requirements: just one binary. Working "as-is"
  • One-click new lambda with public link and handler. Available immediately.
  • Rich API
  • Security: user switch, IP restrictions, Origin restrictions, tokens ....
  • Time limits
  • Permanent links (aliases)
  • Actions - independent instruction that could be run via UI/API on server
  • Scheduler: run actions in cron-tab like style
  • Queues and retries
  • ... etc - see docs

P.S

There is minimal version of trusted-cgi: nano-run. Check it out - it DevOps friendly with configuration-first approach (ie easier to use for infrastructure-as-a-code).

Installation

Since 0.3.3 Linux, Darwin and even Windows OS supported: pre-built binaries could be found in releases

TL;DR;

  • for production for debian servers - use ~~bintray repository~~ github release (recommend)
  • locally or non-debian server - download binary and run
  • for quick tests or for limited production - use docker image (docker run --rm -p 3434:3434 reddec/trusted-cgi)

See installation manual

Overview

The process flow is quite straightforward: one light daemon in background listens for requests and launches scripts/apps on demand. An executable shall read standard input (stdin) for request data and write a response to standard output (stdout).

Technically any script/application that can parse STDIN and write something to STDOUT should be capable of the execution.

Trusted-cgi designed keeping in mind that input and output data is quite small and contains structured data (json/xml), however, there are no restrictions on the platform itself.

Key differences with classic CGI:

  • Only request body is being piped to scripts input (CGI pipes everything, and application has to parse it by itself - it could be very not trivial and slow (it depends))
  • Request headers, form fields, and query params are pre-parsed by the platform and can be passed as an environment variable (see mapping)
  • Response headers are pre-defined in manifest

Due to changes, it's possible to make the simplest script with JSON input and output like this:

import sys
import json

request = json.load(sys.stdin) # read and parse request
response = ['hello', 'world']  # do some logic and make response
json.dump(response, sys.stdout)  # send it to client

Keep in mind, the platform also adds a growing number of new features - see features.

target audience

It's best (but not limited) for

  • for hobby projects
  • for experiments
  • for projects with a low number of requests: webhooks, scheduled processing, etc..
  • for a project working on low-end machines: raspberry pi, cheapest VPS, etc..

However, if your projects have overgrown the platform limitations, it should be quite easy to migrate to any other solutions, because most low-level details are hidden and could be replaced in a few days (basically - just wrap script to HTTP service)

Also, it is possible to scale the platform performance by just launching the same instances of the platform with a shared file system (or docker images) with a balancer in front of it.

Contributing

The platform is quite simple Golang project with Vue + Quasar frontend and should be easy for newcomers. Caveats and tips for backend check here

For UI check sub-repo

Any PR (docs, code, styles, features, ...) will be very helpful!

Comments (0)

Please login to join the discussion on this project.

Trusted-CGI Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

RackNerd Medium Rectangle Banner

Popular Projects

FluxBB

in Social Networks and Forums
 49k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 46k    1    1    0  

Teddit

in Social Networks and Forums
 27k    0    0    0  

Libre Translate

in Miscellaneous
 20k    0    0    0  

RustDesk

in Remote Access
 18k    0    0    0  

Dashboard

in Personal Dashboards
 17k    0    0    0  

Audiobookshelf

in Audio Streaming
 16k    0    1    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 46k    1    1    0  

Tube Archivist

in Automation
 8k    0    1    0  

OneDev

in Project Management
 6k    0    0    0  

iodine

in Proxy
 5k    0    0    0  

Alf.io

in Booking and Scheduling
 5k    0    0    0  

sysPass

in Password Managers
 3k    0    0    0  

Misskey

in Social Networks and Forums
 6k    0    0    0  
pCloud Lifetime

Top Rated Projects

Technitium DNS Server

 1 rating
in DNS

Pydio

 1 rating
in File Transfer & Synchronization

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Gitea

 1 rating
in Project Management

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

LocalStack logo
LocalStack cover

LocalStack

LocalStack is a fully functional local AWS cloud stack. Thi…

IronFunctions logo
IronFunctions cover

IronFunctions

The serverless microservices platform by iron.io.

Appwrite logo
Appwrite cover

Appwrite

End to end backend server for web, native, and mobile devel…