ThunderHosting

Deploy your app: upload or Git

Get a Python, Node.js or Java app online: the PORT variable, uploads, Git deploys and the start command.

An app runs one program in Python, Node.js or Java. Its files live in the app's folder: you upload them or let Dash pull them from a Git repository.

1. Listen on the right port

Your app must listen on 0.0.0.0 and on the port in the PORT environment variable. HTTPS is handled for you: the app itself speaks plain HTTP. Paid plans also get the raw ports PORT_2 and PORT_3.

python
import os
from flask import Flask

app = Flask(__name__)

@app.get("/")
def index():
    return {"status": "ok"}

app.run(host="0.0.0.0", port=int(os.environ["PORT"]))
JavaScript
const http = require("http");

http.createServer((req, res) => {
  res.setHeader("Content-Type", "application/json");
  res.end(JSON.stringify({ status: "ok" }));
}).listen(process.env.PORT, "0.0.0.0");

2. Upload your files

  1. Open the app in Dash and go to the Files tab.
  2. Upload your files, or a zip archive and extract it there.
  3. For many files, use SFTP: the Settings tab shows the address, user name and password.

3. Or deploy from Git

  1. Open the Deploy tab.
  2. Enter the repository URL and the branch (for example main).
  3. Choose the access: public repository, deploy key (SSH) or access token (HTTPS).
  4. Click Save, then Deploy now. The history below shows the commit and the log.

Files that are not in the repository, such as .env or uploads, stay on every deploy. Keep secrets like bot tokens in .env, never in Git.

4. Start command and dependencies

The Start & environment tab holds the start command and the automatic install. With it on, requirements.txt or package.json is installed before each start.

RuntimeDefault start commandDependencies
Pythonpython main.pyrequirements.txt (pip)
Node.jsnpm startpackage.json (npm)
Javajava -jar app.jarbuild the jar beforehand

If something does not work

  • The Console tab shows your app's output and errors.
  • The page "This app is not running": the app is stopped or does not listen on PORT.
  • A failed deploy: open it in the history on the Deploy tab to read the log.