{
  "manifest_version": "1.0.0",
  "template": {
    "id": "78b59de8-2b49-4e8f-8c4a-e5c7915267e9",
    "slug": "outline-self-hosted-notion-alternative",
    "name": "Outline (Self-Hosted Notion Alternative)",
    "description": "Self-hosted team wiki & knowledge base — a Notion alternative",
    "url": "https://railway.com/deploy/outline-self-hosted-notion-alternative",
    "upstream": {
      "image": "outlinewiki/outline:1.9.2"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:16-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:7-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "outline",
      "source": {
        "image": "outlinewiki/outline:1.9.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/outline/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Postgres data subdirectory (keeps data off the volume root to avoid lost+found init errors)",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Name of the database Outline connects to",
      "secret": false,
      "strategy": "default",
      "default": "outline"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Postgres username Outline connects as",
      "secret": false,
      "strategy": "default",
      "default": "outline"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Auto-generated Postgres password (referenced by Outline's DATABASE_URL)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Auto-generated Redis password (referenced by Outline's REDIS_URL)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "URL",
      "service": "outline",
      "description": "Public URL of this Outline instance (auto-set to the generated Railway domain)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "outline",
      "description": "HTTP port Outline listens on (Railway routes the public domain here)",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NODE_ENV",
      "service": "outline",
      "description": "Runtime environment; keep as production",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "PGSSLMODE",
      "service": "outline",
      "description": "Disable Postgres SSL over the private network (required for Railway internal networking)",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "REDIS_URL",
      "service": "outline",
      "description": "Redis connection string for the job queue and websockets (references the redis service)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SECRET_KEY",
      "service": "outline",
      "description": "Auto-generated 64-char hex key used to sign sessions and encrypt data (do not change after first deploy)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "FORCE_HTTPS",
      "service": "outline",
      "description": "Railway terminates TLS at its edge, so Outline should not force HTTPS itself",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DATABASE_URL",
      "service": "outline",
      "description": "Postgres connection string (references the postgres service)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "FILE_STORAGE",
      "service": "outline",
      "description": "Store uploaded files on the mounted volume instead of external S3",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "UTILS_SECRET",
      "service": "outline",
      "description": "Auto-generated 64-char hex secret for internal utilities and API token signing",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "FILE_STORAGE_LOCAL_ROOT_DIR",
      "service": "outline",
      "description": "Directory on the persistent volume where uploads are stored",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/outline/data"
    },
    {
      "key": "FILE_STORAGE_UPLOAD_MAX_SIZE",
      "service": "outline",
      "description": "Maximum upload size in bytes (default 250 MB)",
      "secret": false,
      "strategy": "default",
      "default": "262144000"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "outline-self-hosted-notion-alternative"
      }
    },
    "cli": "railway deploy --template outline-self-hosted-notion-alternative",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "78b59de8-2b49-4e8f-8c4a-e5c7915267e9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "7c0aeefc-d061-4b5a-bf89-19f9b44ebde3": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:16-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data subdirectory (keeps data off the volume root to avoid lost+found init errors)",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database Outline connects to",
                      "defaultValue": "outline"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres username Outline connects as",
                      "defaultValue": "outline"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Postgres password (referenced by Outline's DATABASE_URL)",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "7c0aeefc-d061-4b5a-bf89-19f9b44ebde3": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "eab62724-de78-476c-bfd2-29c9d22c833f": {
                  "icon": null,
                  "name": "redis",
                  "deploy": {
                    "startCommand": "sh -c 'redis-server --requirepass \"$REDIS_PASSWORD\" --maxmemory-policy noeviction'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7-alpine"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Redis password (referenced by Outline's REDIS_URL)",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "eab62724-de78-476c-bfd2-29c9d22c833f": {
                      "mountPath": "/data"
                    }
                  }
                },
                "faa05d2f-4460-4cde-9077-b16408bb32c5": {
                  "icon": null,
                  "name": "outline",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "outlinewiki/outline:1.9.2"
                  },
                  "variables": {
                    "URL": {
                      "isOptional": false,
                      "description": "Public URL of this Outline instance (auto-set to the generated Railway domain)",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Outline listens on (Railway routes the public domain here)",
                      "defaultValue": "3000"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Runtime environment; keep as production",
                      "defaultValue": "production"
                    },
                    "PGSSLMODE": {
                      "isOptional": false,
                      "description": "Disable Postgres SSL over the private network (required for Railway internal networking)",
                      "defaultValue": "disable"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string for the job queue and websockets (references the redis service)",
                      "defaultValue": "redis://default:${{redis.REDIS_PASSWORD}}@${{redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated 64-char hex key used to sign sessions and encrypt data (do not change after first deploy)",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "FORCE_HTTPS": {
                      "isOptional": false,
                      "description": "Railway terminates TLS at its edge, so Outline should not force HTTPS itself",
                      "defaultValue": "false"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string (references the postgres service)",
                      "defaultValue": "postgresql://outline:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/outline"
                    },
                    "FILE_STORAGE": {
                      "isOptional": false,
                      "description": "Store uploaded files on the mounted volume instead of external S3",
                      "defaultValue": "local"
                    },
                    "UTILS_SECRET": {
                      "isOptional": false,
                      "description": "Auto-generated 64-char hex secret for internal utilities and API token signing",
                      "defaultValue": "{{UTILS_SECRET}}"
                    },
                    "FILE_STORAGE_LOCAL_ROOT_DIR": {
                      "isOptional": false,
                      "description": "Directory on the persistent volume where uploads are stored",
                      "defaultValue": "/var/lib/outline/data"
                    },
                    "FILE_STORAGE_UPLOAD_MAX_SIZE": {
                      "isOptional": false,
                      "description": "Maximum upload size in bytes (default 250 MB)",
                      "defaultValue": "262144000"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "faa05d2f-4460-4cde-9077-b16408bb32c5": {
                      "mountPath": "/var/lib/outline/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T16:11:37.376Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_037fc373158f41248d7d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 38,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "outline"
  }
}
