Services
You can define services, that is, generic programs that run 24/7 without any user interaction. Unlike a command that you start manually with SSH, the system restarts these services automatically if they stop.
Warning
This feature is available on all of our paid plans.
You control these services in the Advanced > Services menu of the administration interface.

These services can use ports 8300 to 8499 and the services-[account].alwaysdata.net hostname.
Use services
- The service must stay in the foreground, and not fork and exit1.
- To listen on a port, the service must bind to
::in IPv6 and listen on a port between8300and8499. - A log is created automatically in the
/home/[account]/admin/logs/services/directory. It records the starts and stops of the service.- The administration interface shows an excerpt of these logs (Logs - 📄).
- To see the running processes, go to the Advanced > Processes > Services menu.
- A service restart sends the
SIGHUPsignal. - If a service fails several times in a short time, then it's disabled automatically.
- By default, services use the language versions set in the Environment menu of the administration interface. To select another version, use the Environment variables.
In the optional Monitoring command field, you can specify a command that checks that the service works. When this command returns an error code, the service restarts. For example, the command can check that the service is reachable on its port—here, for a service that uses port 8300:
nc -z services-[account].alwaysdata.net 8300Warning
There is no network filtering, so anyone can connect to your services. If necessary, make sure that your services have an authentication mechanism.
For Public Cloud users:
- Services run on servers that are separate from the SSH and HTTP servers.
- Resource usage must stay reasonable.
- Services aren't reachable over IPv4, only over IPv6.
For Private Cloud users:
- Ports
8300to8499are not open to the outside. You can open them with a firewall rule. - You can use other ports—for example, the default port of the application.
Troubleshooting
- Services use the default language versions of the account, set in Environment. To use other versions, set them in the Environment variables field.
Examples
For examples, see the "simple"
systemdservice.