Skip to main content

🚢 shipit

CI PyPI License: MIT

Self-hosted, open-source auto deploy that works with any language. git push → webhook → clone → build (Docker) → run → health check → auto rollback on failure.

  • Zero dependencies (Python 3.11+ stdlib only) + Docker + git
  • Auto-detects Node, Python, Go, Rust, Java (Maven/Gradle), PHP, Ruby, .NET, Elixir, static sites
  • Python start command is inferred for Django (gunicorn), FastAPI (uvicorn) and Flask (gunicorn)
  • Any other language: put a Dockerfile in your repo – it always takes priority
  • GitHub / Gitea / Forgejo (HMAC) and GitLab (token) webhooks
  • Private repos via token from an env var (never written to disk)
  • Safe deploys: the new version starts beside the live one and must pass its health check before the swap; a bad release never touches production
  • Automatic rollback if it fails right after the swap, or manually with shipit rollback <app>
  • Slack / Discord / Mattermost notifications, deploy history, automatic pruning of old images
  • shipit status <app> and shipit logs <app> -f

Install on a Linux server (one command)

curl -fsSL https://raw.githubusercontent.com/desnarong/shipit/main/install.sh | sudo bash

Installs git, Python and Docker if missing, puts shipit in /opt/shipit, creates a shipit user and a systemd service that listens for webhooks on port 9000. Read the script first if you like - it is short. Options: --dry-run, --no-docker, --no-service, --from-git.

Then deploy and enable auto deploy:

sudo -u shipit SHIPIT_CONFIG=/var/lib/shipit/shipit.toml shipit up https://github.com/you/your-app.git
shipit hook your-app --url http://YOUR-SERVER-IP:9000      # registers the GitHub webhook for you (needs `gh`)

Quick start (any machine with Docker)

pip install shipit-deploy          # the command is `shipit`
# or the latest from GitHub: pip install git+https://github.com/desnarong/shipit.git
shipit up https://github.com/you/your-app.git

That's it. shipit up picks the default branch, a free port and the right Dockerfile (or writes one), builds, starts the app, health-checks it and prints the URL. No config file to write - it creates shipit.toml for you. Add --domain app.example.com for HTTPS + zero-downtime releases (needs Caddy).

Turn on auto deploy (every push redeploys): run shipit serve, then register the webhook: shipit hook myapp --url http://YOUR-SERVER:9000 (GitHub, uses the gh CLI), or add the URL and secret that shipit up printed to your repo by hand (Settings -> Webhooks). Apps added with shipit up are picked up by a running shipit serve automatically - no restart.

Other commands:

shipit list                  # apps, status, URLs
shipit hook myapp --url URL  # register the GitHub push webhook
shipit deploy myapp          # redeploy now
shipit rollback myapp        # back to the previous release
shipit logs myapp -f         # follow logs
shipit status myapp          # current release + history
shipit doctor                # check docker / git / caddy / secrets
shipit detect ./my-project   # preview the generated Dockerfile

The webhook secret is generated for you (kept in .shipit/webhook-secret); set SHIPIT_SECRET to use your own. If your Dockerfile has a single EXPOSE, shipit uses that port automatically.

Add a webhook in your repo: URL http://your-server:9000/hook/myapp, content type application/json, secret = SHIPIT_SECRET (GitLab: put it in "Secret token"). Only pushes to the configured branch deploy.

Config (shipit.toml)

key meaning
name app name (a-z 0-9 _ . -), also the container name
repo, branch git source
port / host_port container port / published port
health_path HTTP path polled after start ("" = only check it stays running)
start start command for generated Dockerfiles
dockerfile custom Dockerfile path inside the repo
pre_deploy command run once in the new image before release (e.g. python manage.py migrate); failure aborts and the live version stays
env_file host env file passed to the container
token_env env var holding a git token (private https repos)
secret_env env var with this app's webhook secret
notify_env env var holding a Slack/Discord/Mattermost webhook URL
keep_images old images to keep (default 5; current + previous always kept)
build_args table of Docker build args

Zero-downtime with Caddy

Set domain on an app and shipit switches to blue/green deploys behind Caddy:

[server]
caddy_admin = "http://127.0.0.1:2019"   # default

[[app]]
name = "myapp"
domain = "app.example.com"   # DNS must point at this server
host_port = 9000             # slots use 127.0.0.1:9000 (blue) and :9001 (green)

A release starts the idle slot, waits for its health check, flips the Caddy route, waits drain_seconds, then removes the old slot - no gap, and HTTPS certificates come from Caddy automatically. If the health check or the Caddy update fails, the live version is untouched.

Requirements: Caddy running with its admin API enabled (the default). shipit owns the Caddy config - it pushes a full config on every release and on shipit serve start, so don't hand-edit that Caddy instance. Apps without domain keep the simple mode (brief swap gap).

Run it as a service (systemd)

[Service]
Environment=SHIPIT_SECRET=change-me
WorkingDirectory=/opt/shipit
ExecStart=/usr/local/bin/shipit serve
Restart=always

Put nginx/Caddy in front for HTTPS and for routing domains to each app's host_port.

Security notes

  • The webhook endpoint rejects anything without a valid signature/token.
  • Deploying runs docker build on code from your repo – only point it at repos you trust.
  • Run shipit serve behind HTTPS; the host running it controls Docker, so keep it locked down.

Limitations (v0.1)

Single server, single container per app. Without domain there is a brief gap while the port is handed over. PRs welcome – ideas: multi-server, PR preview deploys, web UI, Traefik/nginx backends.

Develop

python -m unittest discover -s tests

End-to-end tests deploy real sample apps with Docker (needs Docker + git, takes a few minutes):

SHIPIT_E2E=1 python -m unittest tests.test_e2e -v

☕ Buy me a coffee

shipit is free and open source. If it saves you time, you can support it with a coffee - thank you!

Deposit USDT (TRC20) QR code
Coin USDT
Network TRX - Tron (TRC20)
Address TPqzFLc4VhmbSh52G68JVL6rNLWUNMc8Nx

Send USDT on the Tron (TRC20) network only. Double-check the address before sending - crypto transfers can't be reversed.

Contributions welcome - see CONTRIBUTING.md. Security issues: SECURITY.md. MIT licensed.

Metadata

Release files for shipit-deploy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shipit-deploy 0.3.0
File Size Uploaded Provenance Actions
shipit_deploy-0.3.0.tar.gz 34.3 kB With provenance Details for shipit_deploy-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shipit-deploy 0.3.0
File Interpreter ABI Platform Actions
shipit_deploy-0.3.0-py3-none-any.whl Python 3 none any Details for shipit_deploy-0.3.0-py3-none-any.whl

Total release size: 61.6 kB

Release files / shipit_deploy-0.3.0.tar.gz

Download URL shipit_deploy-0.3.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
692a13ce29decea335c514655eb3673874f1ecd036cb979d2c8c2722e022eafd
BLAKE2b-256 checksum
How to use checksums
80967617e3780e9fc41f3dc4458bebf895d37d93c33d5baded611925b6e9835b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / shipit_deploy-0.3.0-py3-none-any.whl

Download URL shipit_deploy-0.3.0-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7650954d019735cbf4bd2862f77eda37953823004b21b56e7612b6f3af84522
BLAKE2b-256 checksum
How to use checksums
2aa6c3077858603e1413666b9b2ce58c2574da95aa1d99c3ccf9362dbb9376ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for shipit-deploy 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for shipit_deploy-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page