Skip to main content

Environment Variables

Environment variables are the central configuration mechanism for your services on Fransys. They allow you to pass parameters to your applications without hardcoding them in your source code.

Three types of variables

Automatically injected variables

When you connect two blocks on the canvas, Fransys generates and automatically injects the necessary variables. For example, connecting a PostgreSQL block to a Laravel block injects DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD on the Laravel side.

These variables are synchronized: if the source block changes (new password, new host), the variables on the application side are updated automatically.

→ Learn more: Connections between blocks

Custom variables

You can add your own variables via the + Add a variable button in the Environment variables tab of each block. Define the name and value — the variable is immediately available to your service.

Renamed variables

When connecting blocks, Fransys offers a renaming system. Each injected variable displays its original name (on the source service side) and its new name (on the application side). You can modify this new name to exactly match what your framework expects.

For example, Soketi variables (SOKETI_DEFAULT_APP_ID) are automatically renamed to Pusher variables (PUSHER_APP_ID) for native Laravel compatibility.

Protected variables

Sensitive values — passwords, API keys, secrets — are hidden by default in the interface (displayed as ••••••••••). They are never exposed in logs or API responses.

Variable expansion

Fransys supports variable expansion: reference a variable inside another with the ${VARIABLE_NAME} syntax.

DATABASE_URL = postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}

Each value is defined once. If the password changes, you modify it in one single place — the connection URL updates automatically. No more copy-paste errors and inconsistencies between variables.

Other examples:

REDIS_URL = redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
API_BASE_URL = https://${API_HOST}:${API_PORT}/api/v1

Export

Click Export variables to download all variables for a block in .env format. Useful for synchronizing your local environment or keeping a record of your configuration.

Best practices

  • Never hardcode secrets in your code — use environment variables for anything sensitive.
  • Connect your blocks on the canvas rather than manually entering connection variables — automatic injection eliminates errors.
  • Use expansion for complex connection URLs — a single point of modification.
  • Export your variables regularly to maintain up-to-date documentation of your configuration.