{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e1f4a528-2cf5-40ac-beb7-0bdb5fc2c369",
    "slug": "krayin",
    "name": "Krayin CRM | Free Open Source Salesforce Alternative",
    "description": "Self-host Krayin CRM on Railway with MySQL — free, open-source Laravel CRM",
    "url": "https://railway.com/deploy/krayin",
    "upstream": {
      "image": "webkul/krayin:2.2.0"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "Krayin",
      "source": {
        "image": "webkul/krayin:2.2.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/laravel-crm/storage/app",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "MySQL internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL service port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Default MySQL root username",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Internal MySQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Database name reference variable",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "MySQL password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Default database name created",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "Public MySQL connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root user password credential",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Krayin",
      "description": "Port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "APP_ENV",
      "service": "Krayin",
      "description": "Application environment production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "APP_KEY",
      "service": "Krayin",
      "description": "Application encryption and signing key (base64 format)",
      "secret": true,
      "strategy": "default",
      "default": "base64:sLRSejYf3TAF+Aqa1Lfm0sOmgjg1BFnEJ/BMfd6SPRE="
    },
    {
      "key": "APP_URL",
      "service": "Krayin",
      "description": "Public base URL for instance",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "Krayin",
      "description": "MySQL internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Krayin",
      "description": "MySQL service port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_DEBUG",
      "service": "Krayin",
      "description": "Enable or disable debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DB_DATABASE",
      "service": "Krayin",
      "description": "MySQL database name reference",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASSWORD",
      "service": "Krayin",
      "description": "MySQL password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "Krayin",
      "description": "MySQL username reference",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CACHE_DRIVER",
      "service": "Krayin",
      "description": "Cache storage driver type",
      "secret": false,
      "strategy": "default",
      "default": "file"
    },
    {
      "key": "DB_CONNECTION",
      "service": "Krayin",
      "description": "Database connection type mysql",
      "secret": false,
      "strategy": "default",
      "default": "mysql"
    },
    {
      "key": "SESSION_DRIVER",
      "service": "Krayin",
      "description": "Session storage driver type",
      "secret": false,
      "strategy": "default",
      "default": "file"
    },
    {
      "key": "MYSQL_AUTOSTART",
      "service": "Krayin",
      "description": "Disable automatic MySQL service start",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Krayin",
      "description": "Container runtime user ID",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "TRUSTED_PROXIES",
      "service": "Krayin",
      "description": "Trusted proxy IP addresses wildcard",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "QUEUE_CONNECTION",
      "service": "Krayin",
      "description": "Queue processing mode synchronous",
      "secret": false,
      "strategy": "default",
      "default": "sync"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "krayin"
      }
    },
    "cli": "railway deploy --template krayin",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e1f4a528-2cf5-40ac-beb7-0bdb5fc2c369",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "66e37131-c3c3-46ab-837c-71e8e98e1cf5": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "MySQL internal hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL service port",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Default MySQL root username",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Internal MySQL connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Database name reference variable",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "MySQL password reference",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Default database name created",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public MySQL connection URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root user password credential",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "66e37131-c3c3-46ab-837c-71e8e98e1cf5": {
                      "mountPath": "/var/lib/mysql"
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                },
                "e71e6180-3c6a-4547-aafd-61bc8402252d": {
                  "icon": "https://avatars.githubusercontent.com/u/86250863?s=200&v=4",
                  "name": "Krayin",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'rm -f /etc/nginx/sites-enabled/default && sed -i \"/fastcgi_pass/a        fastcgi_param HTTPS on;\" /etc/nginx/conf.d/krayin.conf && /usr/local/bin/entrypoint.sh /bin/sh -c \"cd /var/www/laravel-crm && php artisan migrate --force; php artisan db:seed --force || true; exec supervisord -n -c /etc/supervisor/supervisord.conf\"'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "webkul/krayin:2.2.0"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port",
                      "defaultValue": "80"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Application environment production mode",
                      "defaultValue": "production"
                    },
                    "APP_KEY": {
                      "isOptional": false,
                      "description": "Application encryption and signing key (base64 format)",
                      "defaultValue": "base64:sLRSejYf3TAF+Aqa1Lfm0sOmgjg1BFnEJ/BMfd6SPRE="
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public base URL for instance",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "MySQL internal hostname",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "MySQL service port",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "APP_DEBUG": {
                      "isOptional": false,
                      "description": "Enable or disable debug mode",
                      "defaultValue": "false"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "MySQL database name reference",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "MySQL password reference",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "MySQL username reference",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "CACHE_DRIVER": {
                      "isOptional": false,
                      "description": "Cache storage driver type",
                      "defaultValue": "file"
                    },
                    "DB_CONNECTION": {
                      "isOptional": false,
                      "description": "Database connection type mysql",
                      "defaultValue": "mysql"
                    },
                    "SESSION_DRIVER": {
                      "isOptional": false,
                      "description": "Session storage driver type",
                      "defaultValue": "file"
                    },
                    "MYSQL_AUTOSTART": {
                      "isOptional": false,
                      "description": "Disable automatic MySQL service start",
                      "defaultValue": "false"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Container runtime user ID",
                      "defaultValue": "0"
                    },
                    "TRUSTED_PROXIES": {
                      "isOptional": false,
                      "description": "Trusted proxy IP addresses wildcard",
                      "defaultValue": "*"
                    },
                    "QUEUE_CONNECTION": {
                      "isOptional": false,
                      "description": "Queue processing mode synchronous",
                      "defaultValue": "sync"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "e71e6180-3c6a-4547-aafd-61bc8402252d": {
                      "mountPath": "/var/www/laravel-crm/storage/app"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T16:15:12.787Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T14:27:35.010Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3bf51b7c8b0946f18461",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 86,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Krayin"
  }
}
