Skip to the page

getting started / services

Services

A project is made of services, as many as it needs of every kind: several sites, APIs, workers, databases, cron jobs and containers. Each runs in its own microVM with its own logs, variables and limits, and has its address reserved.

The six kinds

servicewhat it runsaddress and default
siteA static or server rendered websitemy-site.00b5e2.app, or docs.my-site.00b5e2.app for a second site; open
apiAn HTTP service on a portapi.my-site.00b5e2.app; open
workerA background process, like a queue reader or a botreminders.my-site.00b5e2.app; closed, nothing to open without a port
databasePostgres. MySQL and Valkey coming nextdb.my-site.00b5e2.app; closed, opens on its own port
cron jobA command on a schedule, in UTCreserved; nothing to open, it calls the others by name
containerAny container with a portsearch.my-site.00b5e2.app; closed

Addresses, open or closed

Every service has its address reserved: the main site at my-site.00b5e2.app, every other service at <name>.my-site.00b5e2.app, so one project holds several sites, APIs and containers. Development and previews use the same names on 00b5e2.dev. Only what needs to be open is open by default: sites and APIs. Databases, caches, workers, cron jobs and containers are closed, reachable only by the services of the project, and any service that listens on a port can be opened.

addresses of my-site
my-site.00b5e2.app                    web, open
docs.my-site.00b5e2.app               docs, open
api.my-site.00b5e2.app                api, open
api.my-site-git-fix-login.00b5e2.dev  api, preview of the fix-login branch
db.my-site.00b5e2.app                 db, closed
reminders.my-site.00b5e2.app          worker, nothing to open

HTTPS is automatic: every project gets one certificate for *.my-site.00b5e2.app, so a new address works the moment the service is live.

Add a service

init proposes services from what it finds in the repo. Add more at any time; open or close them whenever you need:

terminal
$ 00b5e2 services add api --dir ./api
■ added api  https://api.my-site.00b5e2.dev, open
$ 00b5e2 services add site --name docs --dir ./docs
■ added docs  https://docs.my-site.00b5e2.dev, open
$ 00b5e2 services add database --engine postgres --name db
■ added db  postgres 17, closed, db:5432 inside my-site
$ 00b5e2 services open db --allow 203.0.113.0/24
■ open at postgres://db_user:•••@db.my-site.00b5e2.app:31842/db?sslmode=require
$ 00b5e2 services close db
■ closed  db:5432 inside my-site only

List them

terminal
$ 00b5e2 services ls --json
[ { "name": "web", "kind": "site", "address": "my-site.00b5e2.app", "open": true },
  { "name": "api", "kind": "api", "address": "api.my-site.00b5e2.app", "open": true },
  { "name": "db", "kind": "database", "address": "db.my-site.00b5e2.app", "open": false } ]

How services talk

Services of the same project reach each other by name on a private network: api reaches the database at db:5432 and the worker reads its queue at cache:6379. Connecting services explains the network, the variables each database adds, opening a database to the outside and letting two projects talk.

Nothing outside the project can reach a private service, not even another project of yours, until you allow it. That wall is the point of 00b5e2.

From an agent

toolwhat it does
list_servicesServices of a project, with kind, status, address and open or closed
add_serviceAdd a site, API, worker, database, cron job or container (optional address name)
remove_serviceRemove a service and its development data
open_serviceOpen a service at its address (a database on its own port, with TLS and defences)
close_serviceClose a service again
link_serviceGive a service the variables of another