ExtraHosting documentation
What a Discord.js project needs to run on ExtraHosting.
Project requirements
Commit a package.json and a lockfile. The start command must keep one Node.js process running in the foreground, so do not background it. Store generated files, SQLite databases, and durable cache in /app/data.
Every other path inside the container is temporary and is replaced on each deployment.
Environment Variables
Add DISCORD_TOKEN on the project Environment tab, or through Files → .env. ExtraHosting encrypts values at rest and injects them only when a new container is created, so an edit needs a redeploy to take effect.
Hosting access
Plans are granted to your account by an administrator. Open a project's Hosting tab, choose an available plan, and activate it on that project. Each project uses one slot, so a plan with two slots can host two projects. When hosting access expires or is suspended, its projects are stopped, Auto Deploy is turned off, and new commits are not deployed.
Runtime
Projects run as a non-root user with CPU, memory, process, and storage limits set by the plan. Inbound ports are not published, so a bot connects outbound to the Discord Gateway and APIs over HTTPS and WebSocket.
Deployments
A deployment runs the install command, then the build command, then starts a new container and validates it. The previous version keeps serving traffic until the new container passes startup validation, so a failed deployment does not take your project offline. Auto Deploy checks the production branch for new commits every minute.
Backups
Backups are snapshots of the project's own /app/data directory, not the worker disk. The number kept depends on the plan, and the oldest snapshot is pruned when a new one is created. Stop the project before restoring, so the running project cannot write over the restored data.