{
  "manifest_version": "1.0.0",
  "template": {
    "id": "91c654b5-4e10-4201-83f0-7e32ded81615",
    "slug": "nats-server-with-jetstream-websockets-an",
    "name": "NATS Server with JetStream, WebSockets, and Flexible Authentication",
    "description": "This NATS Server is configured for production environments.",
    "url": "https://railway.com/deploy/nats-server-with-jetstream-websockets-an",
    "upstream": {
      "repo_url": "https://github.com/Tyrcode/nats-ws"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "nats-seed-ws",
      "source": {
        "repo": "https://github.com/Tyrcode/nats-ws"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": true
    },
    {
      "name": "nats-server-2",
      "source": {
        "repo": "https://github.com/Tyrcode/nats-ws"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": false
    },
    {
      "name": "nats-server-1",
      "source": {
        "repo": "https://github.com/Tyrcode/nats-ws"
      },
      "needs_volume": true,
      "volume_mount_path": "/nats",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "MS_USER",
      "service": "nats-seed-ws",
      "description": "User authentication tcp server",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "WS_USER",
      "service": "nats-seed-ws",
      "description": "Username for the WebSocket connection",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DEBUG_MODE",
      "service": "nats-seed-ws",
      "description": "Set to true to activate debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "TRACE_MODE",
      "service": "nats-seed-ws",
      "description": "Set to true to activate trace mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MS_PASSWORD",
      "service": "nats-seed-ws",
      "description": "Password authentication tcp server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SERVER_NAME",
      "service": "nats-seed-ws",
      "description": "Name server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WS_PASSWORD",
      "service": "nats-seed-ws",
      "description": "Password for the WebSocket connection",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "JETSTREAM_STORE",
      "service": "nats-seed-ws",
      "description": "Memory usage Jetstream",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MAX_CONNECTIONS",
      "service": "nats-seed-ws",
      "description": "Define the maximum number of connections",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "MAX_PAYLOAD_SIZE",
      "service": "nats-seed-ws",
      "description": "Defines the maximum size of the payload in bytes.",
      "secret": false,
      "strategy": "default",
      "default": "1048576"
    },
    {
      "key": "MAX_PENDING_SIZE",
      "service": "nats-seed-ws",
      "description": "Define maximum size of pending messages",
      "secret": false,
      "strategy": "default",
      "default": "10485760"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "nats-seed-ws",
      "description": "URL of the seed nodes for the cluster",
      "secret": false,
      "strategy": "default",
      "default": "nats://localhost:6222"
    },
    {
      "key": "MS_USER",
      "service": "nats-server-2",
      "description": "User authentication tcp server",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DEBUG_MODE",
      "service": "nats-server-2",
      "description": "Set to true to activate debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "TRACE_MODE",
      "service": "nats-server-2",
      "description": "Set to true to activate trace mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MS_PASSWORD",
      "service": "nats-server-2",
      "description": "Password authentication tcp server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SERVER_NAME",
      "service": "nats-server-2",
      "description": "Name server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JETSTREAM_STORE",
      "service": "nats-server-2",
      "description": "Memory usage Jetstream",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MAX_CONNECTIONS",
      "service": "nats-server-2",
      "description": "Define the maximum number of connections",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "MAX_PAYLOAD_SIZE",
      "service": "nats-server-2",
      "description": "Defines the maximum size of the payload in bytes.",
      "secret": false,
      "strategy": "default",
      "default": "1048576"
    },
    {
      "key": "MAX_PENDING_SIZE",
      "service": "nats-server-2",
      "description": "Define maximum size of pending messages",
      "secret": false,
      "strategy": "default",
      "default": "10485760"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "nats-server-2",
      "description": "URL of the seed nodes for the cluster",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MS_USER",
      "service": "nats-server-1",
      "description": "User authentication tcp server",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DEBUG_MODE",
      "service": "nats-server-1",
      "description": "Set to true to activate debug mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "TRACE_MODE",
      "service": "nats-server-1",
      "description": "Set to true to activate trace mode",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MS_PASSWORD",
      "service": "nats-server-1",
      "description": "Password authentication tcp server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SERVER_NAME",
      "service": "nats-server-1",
      "description": "Name server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JETSTREAM_STORE",
      "service": "nats-server-1",
      "description": "Memory usage Jetstream",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MAX_CONNECTIONS",
      "service": "nats-server-1",
      "description": "Define the maximum number of connections",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "MAX_PAYLOAD_SIZE",
      "service": "nats-server-1",
      "description": "Defines the maximum size of the payload in bytes.",
      "secret": false,
      "strategy": "default",
      "default": "1048576"
    },
    {
      "key": "MAX_PENDING_SIZE",
      "service": "nats-server-1",
      "description": "Define maximum size of pending messages",
      "secret": false,
      "strategy": "default",
      "default": "10485760"
    },
    {
      "key": "CLUSTER_ROUTES_SEED",
      "service": "nats-server-1",
      "description": "URL of the seed nodes for the cluster",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "nats-server-with-jetstream-websockets-an"
      }
    },
    "cli": "railway deploy --template nats-server-with-jetstream-websockets-an",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "91c654b5-4e10-4201-83f0-7e32ded81615",
            "serializedConfig": {
              "services": {
                "3f002d22-1f81-4921-9ae8-c395ca54bdc4": {
                  "icon": "https://nats.io/img/logos/nats-icon-white.png",
                  "name": "nats-seed-ws",
                  "source": {
                    "repo": "Tyrcode/nats-ws",
                    "branch": null,
                    "rootDirectory": "/ws"
                  },
                  "variables": {
                    "MS_USER": {
                      "isOptional": false,
                      "description": "User authentication tcp server",
                      "defaultValue": "{{MS_USER}}"
                    },
                    "WS_USER": {
                      "isOptional": false,
                      "description": "Username for the WebSocket connection",
                      "defaultValue": "{{WS_USER}}"
                    },
                    "DEBUG_MODE": {
                      "description": "Set to true to activate debug mode",
                      "defaultValue": "false"
                    },
                    "TRACE_MODE": {
                      "description": "Set to true to activate trace mode",
                      "defaultValue": "false"
                    },
                    "MS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password authentication tcp server",
                      "defaultValue": "{{MS_PASSWORD}}"
                    },
                    "SERVER_NAME": {
                      "isOptional": false,
                      "description": "Name server",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "WS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the WebSocket connection",
                      "defaultValue": "{{WS_PASSWORD}}"
                    },
                    "ALLOWED_ORIGINS": {
                      "isOptional": true,
                      "description": "Comma-separated list of WEB domains (e.g., https://app.com,https://test.com). Necessary for CORS in browsers. Only for web apps.",
                      "defaultValue": ""
                    },
                    "JETSTREAM_STORE": {
                      "description": "Memory usage Jetstream",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    },
                    "MAX_CONNECTIONS": {
                      "isOptional": true,
                      "description": "Define the maximum number of connections",
                      "defaultValue": "1000"
                    },
                    "MAX_PAYLOAD_SIZE": {
                      "isOptional": true,
                      "description": "Defines the maximum size of the payload in bytes.",
                      "defaultValue": "1048576"
                    },
                    "MAX_PENDING_SIZE": {
                      "isOptional": true,
                      "description": "Define maximum size of pending messages",
                      "defaultValue": "10485760"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "description": "URL of the seed nodes for the cluster",
                      "defaultValue": "nats://localhost:6222"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "3f002d22-1f81-4921-9ae8-c395ca54bdc4": {
                      "mountPath": "/nats"
                    }
                  }
                },
                "57e1cb0d-d962-4fc3-bf10-8fdb77898886": {
                  "icon": "https://nats.io/img/logos/nats-icon-white.png",
                  "name": "nats-server-2",
                  "source": {
                    "repo": "Tyrcode/nats-ws",
                    "branch": null,
                    "rootDirectory": "/server"
                  },
                  "variables": {
                    "MS_USER": {
                      "description": "User authentication tcp server",
                      "defaultValue": "{{MS_USER}}"
                    },
                    "DEBUG_MODE": {
                      "description": "Set to true to activate debug mode",
                      "defaultValue": "false"
                    },
                    "TRACE_MODE": {
                      "description": "Set to true to activate trace mode",
                      "defaultValue": "false"
                    },
                    "MS_PASSWORD": {
                      "description": "Password authentication tcp server",
                      "defaultValue": "{{MS_PASSWORD}}"
                    },
                    "SERVER_NAME": {
                      "description": "Name server",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "JETSTREAM_STORE": {
                      "description": "Memory usage Jetstream",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    },
                    "MAX_CONNECTIONS": {
                      "description": "Define the maximum number of connections",
                      "defaultValue": "1000"
                    },
                    "MAX_PAYLOAD_SIZE": {
                      "description": "Defines the maximum size of the payload in bytes.",
                      "defaultValue": "1048576"
                    },
                    "MAX_PENDING_SIZE": {
                      "description": "Define maximum size of pending messages",
                      "defaultValue": "10485760"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "description": "URL of the seed nodes for the cluster",
                      "defaultValue": "nats://${{nats-seed-ws.RAILWAY_PRIVATE_DOMAIN}}:6222"
                    }
                  },
                  "volumeMounts": {
                    "57e1cb0d-d962-4fc3-bf10-8fdb77898886": {
                      "mountPath": "/nats"
                    }
                  }
                },
                "aba3ded0-fc2d-4339-b2bf-5f70e69bb499": {
                  "icon": "https://nats.io/img/logos/nats-icon-white.png",
                  "name": "nats-server-1",
                  "source": {
                    "repo": "Tyrcode/nats-ws",
                    "branch": null,
                    "rootDirectory": "/server"
                  },
                  "variables": {
                    "MS_USER": {
                      "description": "User authentication tcp server",
                      "defaultValue": "{{MS_USER}}"
                    },
                    "DEBUG_MODE": {
                      "description": "Set to true to activate debug mode",
                      "defaultValue": "false"
                    },
                    "TRACE_MODE": {
                      "description": "Set to true to activate trace mode",
                      "defaultValue": "false"
                    },
                    "MS_PASSWORD": {
                      "description": "Password authentication tcp server",
                      "defaultValue": "{{MS_PASSWORD}}"
                    },
                    "SERVER_NAME": {
                      "description": "Name server",
                      "defaultValue": "${{RAILWAY_SERVICE_NAME}}"
                    },
                    "JETSTREAM_STORE": {
                      "description": "Memory usage Jetstream",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}"
                    },
                    "MAX_CONNECTIONS": {
                      "description": "Define the maximum number of connections",
                      "defaultValue": "1000"
                    },
                    "MAX_PAYLOAD_SIZE": {
                      "description": "Defines the maximum size of the payload in bytes.",
                      "defaultValue": "1048576"
                    },
                    "MAX_PENDING_SIZE": {
                      "description": "Define maximum size of pending messages",
                      "defaultValue": "10485760"
                    },
                    "CLUSTER_ROUTES_SEED": {
                      "description": "URL of the seed nodes for the cluster",
                      "defaultValue": "nats://${{nats-seed-ws.RAILWAY_PRIVATE_DOMAIN}}:6222"
                    }
                  },
                  "volumeMounts": {
                    "aba3ded0-fc2d-4339-b2bf-5f70e69bb499": {
                      "mountPath": "/nats"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0"
}
