Main features
- Deploys with git push over SSH
- Detects Python, Node, Go, Java, Clojure and Ruby apps
- Isolated dependencies per app, such as a virtualenv for Python
- Procfile workers plus a release task run on each deploy
- config:set and ps:scale commands as on Heroku
- Several apps per server with nginx virtual hosts
- Let's Encrypt or private certificates for HTTPS
- Static sites and static asset paths
- Response caching set in an ENV file
What Piku does
Piku is a very small platform-as-a-service inspired by Dokku. It gives you the Heroku workflow (add a Git remote, push, and the app is running) on servers that are too small or too simple for a container platform. Its authors wanted to deploy to a few ARM boards at a time when Dokku did not run on ARM and Docker seemed like overkill, so Piku runs apps directly on the host instead of in containers.
When you push, Piku works out the runtime and installs dependencies in isolation for each app: a virtualenv for Python, a separate GOPATH for Go, node_modules for Node, Maven or Gradle builds for Java, Leiningen or the Clojure CLI for Clojure, and Bundler for Ruby. It then reads the app’s Procfile and starts each worker under uWSGI, which acts as a generic process manager. A release worker can run once per deploy, for example to apply database migrations. As on Heroku, settings are changed with config:set and workers scaled with ps:scale, or both are written into an ENV file in the repository.
Web serving and HTTPS
nginx sits in front of all apps, with virtual hosts so several apps can share a server under different host names. Piku can obtain certificates from Let’s Encrypt or create a private certificate. A static worker type serves a site from a folder, in the style of GitHub Pages, and the ENV file can map URL prefixes to static asset folders or cache back-end responses.
Self-hosting Piku
Piku needs Python 3.10 or later, nginx, uWSGI and SSH, and runs under its own user account in the www-data group. The project targets the latest two Debian and Ubuntu LTS releases, and it has also been used on FreeBSD, Cygwin and Windows Subsystem for Linux. Development started on an original Raspberry Pi Model B with 256 MB of memory, and the README says it still runs reliably there.
There is a one-line installer, but the installation guide states it is not recommended for production servers and asks you to read any script before running it. The alternatives are cloud-init templates for common cloud providers, an Ansible playbook and manual setup.
Hosted version
None. Piku is installed on your own machine.
Limitations
Piku deliberately does little. Apps are not isolated in containers, so they share the host’s operating system packages and resources. It does not create databases or other backing services, offers no web interface and works on a single host. The README describes it as stable with a largely finished feature set, updated mainly when a new language runtime is added or a reproducible bug is found. That suits a tool you want to leave alone, but do not expect new features.
Who it suits
Piku suits hobbyists, schools and developers who want to push small web apps, bots or static sites to a cheap virtual server or a Raspberry Pi with as little machinery as possible. If you want containers and database plugins with the same workflow, use Dokku; for a web dashboard, look at Coolify.
Technical details
Self-hosting needs
- nginx
- uWSGI
Built with
- Python
GitHub topics
- arm
- heroku
- nodejs
- paas
- python
- raspberry-pi
- raspbian
- ubuntu
Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.