Why register a service?
You can always start a process by hand in a terminal, but your Zo restarts periodically to pick up updates and snapshots, and that happens even on paid plans. A process you started yourself won’t come back after a restart. When you register a service, Zo brings it back up automatically with the same config every time your Zo starts. That’s the difference between something that runs and something that stays running.What people run as services
A few examples of what fits well as a service:- A custom backend in Node, Python, Go, Ruby, Rust, or anything else that runs on Linux
- A database like Postgres or Redis that another service on your Zo talks to
- A Discord or Telegram bot
- A scheduled worker or background sync loop
- A WebSocket server
The three modes
Every service runs in one of three modes. The mode determines whether the service has a public endpoint and how traffic reaches it. http
A web service. Public by default at *.zocomputer.io with no built-in auth. Use this for any HTTP server, API, or website.
You can also set an HTTP service to private, in which case it lives at *.zo.computer and requires you to sign in.
tcp
A non-HTTP service exposed at a public host and port. Use this for things that don’t speak HTTP, like a custom socket protocol, a game server, or an MQTT broker.
process
A managed background process with no public endpoint. Zo starts it, keeps it running, and restarts it if you change its config. Use this for anything that doesn’t need to be reached from outside your Zo: a worker, a scheduler, a bot, a sync loop, or an internal-only service bound to localhost (like a Postgres on 127.0.0.1 that your HTTP service connects to).
Settings
When you set up a service, Zo only needs a handful of settings:
A handful of port numbers are reserved for system use; if you pick one, Zo will let you know.
URLs
When you create a public HTTP service, you get two URLs:- The HTTP Proxy URL is the right pick for most web services like APIs and websites.
- The Direct Tunnel URL is for non-web traffic, or as a fallback if the HTTP Proxy URL doesn’t behave as expected.
Custom domains
You can attach a custom domain to any public service, so your URL looks likeapp.example.com instead of myapp-yourhandle.zocomputer.io. Custom domains are available on paid plans.