Container Environment Variables

Each container you build will have a set of Cycle specific environment variables as well as any base and custom environment variables you've included.

Cycle Environment Variables

Cycle automatically populates environment variables defined on the container image, but allows you to change the values or add completely new variables. These can be accessed within the container in your code.

Some environment variables are always created by Cycle, regardless of the image. Below is a full list of those values.

CYCLE_API_TOKENA token thats used by instances to authenticate against the compute service.
CYCLE_AUTO_STARTIf the platform decided that this instance needs to be (re)started and is the cause of the start this value will be yes, otherwise no.
CYCLE_CONTAINER_IDENTIFIERAn identifier used for this container.
CYCLE_CONTAINER_IDThe ID of the container.
CYCLE_COMPUTE_PROXYThe Cycle compute proxy url.
CYCLE_ENVIRONMENT_IDThe ID of the environment this container is deployed in.
CYCLE_FIRST_STARTIf this is the first time an instance starts this value will be yes, after that it will be no.
CYCLE_INSTANCE_IDThe ID of the instance.
CYCLE_INSTANCE_IPV6_IPThe IPv6 address of this specific instance.
CYCLE_INSTANCE_IPV6_SUBNETThe subnet of the instance itself. If there are 5 instances this will be 1-5 depending on the instance.
CYCLE_INSTANCE_IPV6_CIDRThe IPv6 address range this instance can be assigned to.
CYCLE_LOCATION_IDThe location of the server that this container is deployed to.
CYCLE_PROVIDER_IDENTIFIERAn identifier that indicates the provider of the server.
CYCLE_PROVIDER_LOCATIONThe physical location of the server displayed as an abbreviation.
CYCLE_SERVER_IDThe ID of the server this container is deployed to.

Environment variables defined on the image cannot be removed. Cycle interprets these as critical to the way your program works. However, their values can be changed, which may be useful for things such as specific development-only settings. You are free to create and remove environment variables outside of those defined on the image.

Need Help?

If you've got questions about the platform or need some help getting started, our team is more than happy to assist. Whether you're new to containers or just new to Cycle, reach out to us via livechat by clicking the blue circle in the bottom right corner. Join our Slack channel, and get help from the dev team or other members of the community, and check out our Roadmap to see what's planned for the future!