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:


🚀 Step-by-Step Hosting Guide

1

📡 Register a Subdomain

Before deploying, you need to reserve your unique address on the .discloud.app domain.

2

📝 Configure discloud.config

Your discloud.config file tells Discloud how to handle your site. You must set TYPE=site and include your ID.

If you are using the Discord Bot's Quick Setup, you don't need to create this file manually, the bot will ask for the subdomain and other details during the process.

  • TYPE=site: Identifies the app as a web service.

  • ID: Your registered subdomain name. Do not include .discloud.app (e.g., use my-app, not my-app.discloud.app).

  • MAIN: The entry point of your application.

  • RAM: Allocated memory (min. 512MB for sites).

3

🏗️ Handling Build Processes

If your application requires a build step (like React, Next.js, or TypeScript), you have two options:

For Java applications, you must build locally and upload the .jar file. See the Java build guide.

4

🚀 Upload and Deploy

You can upload your project using any of our supported methods:

Before uploading, make sure to compress your project correctly and exclude unnecessary files using a .discloudignore file.

Last updated