Websites & APIs
Learn how to host websites, APIs, and dashboards on Discloud using subdomains and custom domains.
🌐 What is a "Site" on Discloud?
On Discloud, any application that uses a network port and requires external access is considered a Site. This includes:
🖥️ Websites (Static or Dynamic)
🔌 APIs (REST, GraphQL, etc.)
📊 Dashboards (for Bots or standalone)
🤖 Bots with Web Interfaces
To allow external access, Discloud routes traffic through a proxy to port 8080 and host 0.0.0.0 of your application using a subdomain (e.g., myapp.discloud.app).
✅ Requirements
To host a website or API, you must meet these criteria:
Platinum Plan or Higher – Required for all TYPE=site applications.
Port 8080 & Host 0.0.0.0 – Your application must listen on port 8080 and host 0.0.0.0 to be accessible externally.
Subdomain – You must register a unique subdomain on Discloud.
discloud.config – Required for most deployment methods. If using the Discord Bot's Quick Setup, the bot will guide you through the configuration.
RAM – A minimum of 512MB is recommended for web applications.
🚀 Step-by-Step Hosting Guide
📝 Configure discloud.config
discloud.configYour discloud.config file tells Discloud how to handle your site. You must set TYPE=site and include your ID.
TYPE=site: Identifies the app as a web service.ID: Your registered subdomain name. Do not include.discloud.app(e.g., usemy-app, notmy-app.discloud.app).MAIN: The entry point of your application.RAM: Allocated memory (min. 512MB for sites).
🏗️ Handling Build Processes
If your application requires a build step (like React, Next.js, or TypeScript), you have two options:
Let Discloud handle the build process during deployment. Add the BUILD command to your discloud.config.
Build your project locally and upload the resulting files.
Do not use a folder named dist for your local build output. Discloud reserves the dist directory for its internal build process. Use a different name like build, out, or output.
In this case, ensure your MAIN or START points to the correct entry point within your build folder.
🚀 Upload and Deploy
You can upload your project using any of our supported methods:
Last updated