Application hosting
Deploy Pyramid with Phusion Passenger
Run a Pyramid application on HostRight with HostRight Control Panel, Passenger, WSGI configuration, SSH deployments, database setup, and production checks.
Pyramid on HostRight
Pyramid supports small focused applications and larger modular systems. HostRight runs Pyramid through its WSGI callable with Phusion Passenger.
Follow the shared Python deployment guide first.
Project layout and transfer
Keep the repository private:
apps/example-pyramid/
├── passenger_wsgi.py
├── requirements.txt
├── production.ini
└── example_pyramid/
├── __init__.py
└── views.py
Clone with Git or transfer the files using SFTP. FTP is available for file transfer, but it cannot install packages or reload Passenger.
cd ~/apps
git clone git@github.com:example/example-pyramid.git example-pyramid
Configure HostRight Control Panel
Open Extra Features → Setup Python App → Create Application:
Application root: apps/example-pyramid
Application startup file: passenger_wsgi.py
Application entry point: application

Create the WSGI file
If the project exposes a factory, create a startup file that builds the WSGI application:
from pyramid.paster import get_app
application = get_app("production.ini", "main")
If the project already exports a WSGI object, import it directly instead. The callable name must match HostRight Control Panel.
Add database, Redis, and SSL
Create the database and user under Account Manager → Databases, then configure the exact connection values through environment variables. See Create and manage a database.
Enable Redis under Advanced Features → Redis and use its account-specific Unix socket for cache or sessions. Give this application its own Redis database ID. See Enable and use Redis.
After DNS points to HostRight, request the certificate under Account Manager → SSL Certificates and test the Pyramid application over HTTPS. See the SSL setup instructions.
Install and release
cd ~/apps/example-pyramid
source ~/virtualenvs/example-pyramid/bin/activate
python -m pip install -r requirements.txt
Use production settings and environment variables for database URLs, session secrets, email, and external services. Run the project's database migration command from SSH, then reload the application in HostRight Control Panel.
For a release:
git pull --ff-only origin main
python -m pip install -r requirements.txt
# run the project's migration command
# reload Passenger in HostRight Control Panel
Test the home page, authentication, database operations, static files, and error responses. Keep a backup before schema changes.