.amika/config.toml so that rigs automatically publish the right ports and generate URLs when they start.
Defining services in config.toml
Add[services.<name>] sections alongside the existing [lifecycle] section. Each section declares a named service with optional port bindings and URL scheme.
Fields
port and ports are mutually exclusive. A service may omit both to act as a metadata-only entry with no port bindings.
Port format
Each port value is either:- Integer: interpreted as
containerPort/tcp(TCP is the default protocol). - String
"containerPort/protocol": sets the protocol explicitly, such as"4982/udp".
url_scheme
url_scheme controls whether Amika generates a URL for a port after resolution. Allowed scheme values are "http" and "https".
Single-port services accept a string or a list:
url_scheme is omitted, no URLs are generated for the service.
Start service processes
A service declaration publishes ports and records URLs. It does not start the process. Start services through the repository’s lifecycle scripts or process manager. Systemd is available for long-running processes that need supervision and logs. Keep the unit file in the repository, then install and enable it from the setup script:Validation rules
Amika validates service definitions when parsing.amika/config.toml:
- Port range: port numbers must be 1–65535.
- Protocol: must be
tcporudp. - Mutual exclusivity: specifying both
portandportson the same service is an error. - url_scheme entries must reference a port declared in the same service. Duplicate port entries within
url_schemeare rejected.
[lifecycle] section is still applied normally.
Port resolution
When you runamika rig create and the repository contains service
declarations, the hosted provider publishes each declared port. Amika records
the provider’s published port and generates a public URL for TCP ports that
declare a url_scheme.
Resolved ports and URLs are visible through amika service list, rig details,
and API responses.
URL generation only applies to TCP ports. UDP ports with a
url_scheme do not produce runtime URLs.Listing services
Useamika service list to inspect published bindings and URLs:
Output columns:
SERVICE, SANDBOX, PORTS, URL.
amika service list reports configuration and published endpoints. It does not
connect to the process or check service health. Test the local port or health
endpoint inside the rig.
Services on the hosted platform
On the hosted Amika platform, service definitions can also be managed through the web UI or the platform API. Resolution precedence: when creating a rig for a repository, the platform resolves service definitions in this order:- Database: if any service definitions have been saved via the UI or API, use those exclusively.
- Repository config: if no database definitions exist, parse
[services.*]sections from.amika/config.toml. - Default: if neither source defines services, proceed with no service definitions.
Related docs
- Rig configuration: lifecycle scripts, Git cloning, reserved ports
- CLI reference: full command and flag index