Skip to content

Directory Layout

Understanding where things live on the server helps with debugging and advanced usage.

Your App's Files

When you deploy, Plitho creates a directory for your app:

/home/plitho-{app}/
├── app/                 # Your git checkout (reset on every deploy)
├── data/                # Persistent storage (survives deploys)
├── env/                 # Dependencies (node_modules, virtualenv)
└── logs/                # Process output
    ├── web.log          # Main process logs
    └── worker.log       # Background process logs

app/

Your code lives here. On each deploy, this directory is reset to a fresh checkout of your git repo. Don't store anything here that you need to persist.

data/

Persistent storage that survives deploys. Use this for:

  • Uploaded files
  • SQLite databases
  • Any data that shouldn't be lost on deploy

This directory is yours — Plitho never touches it.

env/

Dependencies are installed here:

  • Node.js: node_modules/
  • Python: virtualenv/

This directory is recreated on each deploy.

logs/

Process output from your app. Accessible via:

  • The dashboard (Apps → your app → Logs)
  • SSH: ssh -p 2222 plitho@your-server log myapp

Logs survive redeployments.

Server-Level Paths

These are managed by the server administrator:

Path Purpose
~/.plitho/plitho.db State database (apps, users, sessions)
~/.plitho/repos/{app}/ Bare git repositories
~/.plitho/acme/ SSL certificates
~/.plitho/ssh_host_ed25519_key SSH host key
~/.ssh/authorized_keys Your authorized deploy keys

Agent-Managed Paths

These are managed by the root agent:

Path Purpose
/etc/systemd/system/plitho-{app}-{kind}.{ordinal}.service App process units
/etc/systemd/system/plitho-{app}.slice Resource limits slice
/etc/nginx/sites-available/plitho-{app}.conf Nginx config
/etc/plitho/ds/{type}/{name}.conf Data service configs
/var/lib/plitho/ds/{type}/{name}/ Data service data
/var/lib/plitho/backups/{type}/{name}/ Backup archives

Data Service Paths

Path Purpose
/etc/plitho/ds/{type}/{name}.conf Service configuration
/var/lib/plitho/ds/{type}/{name}/ Data directory (XFS quota applied)
/var/lib/plitho/backups/{type}/{name}/ Backup archives
/usr/local/lib/plitho/ds/{type}-{name}-backup.sh Backup script
/var/log/plitho/ds/{type}-{name}.log Service log

Naming Conventions

All Plitho-managed resources use identifiable prefixes:

Resource Pattern Example
OS user (app) plitho-{app} plitho-myapp
Systemd unit (app) plitho-{app}-{kind}.{ordinal}.service plitho-myapp-web.1.service
Systemd slice (app) plitho-{app}.slice plitho-myapp.slice
Systemd unit (cache) plitho-cache-{name}.service plitho-cache-redis.service
Systemd unit (data service) plitho-ds-{type}-{name}.service plitho-ds-nats-my-nats.service
Systemd slice (data service) plitho-ds-{type}-{name}.slice plitho-ds-nats-my-nats.slice
Nginx config plitho-{app}.conf plitho-myapp.conf
PostgreSQL DB plitho_{name} plitho_myapp
PostgreSQL role plitho_{name} plitho_myapp

All generated files contain # Managed by Plitho as the first line.

Environment Variables

Variable Default Purpose
PLITHO_SSH_ADDR 0.0.0.0:2222 SSH server address
PLITHO_HTTP_ADDR 0.0.0.0:8080 Dashboard address