Orta8 minYenilənib: 2026-09-13

Running Go, Rust, .NET and Java Applications 24/7 in the Panel

Move a service written in a compiled language into the panel, get the startup command right, bind the port, and restart automatically after a crash.

Yoxlanıldığı versiya

Go
1.22+
Rust
stable
.NET
8
Java
17 / 21
Son yoxlama
2026-09-13
Bu səhifədə
Bütün bələdçilər
Oxuma irəliləyişi

When moving a compiled language into the panel there are two decisions: where to build, and what address your app listens on. Getting both right up front removes hours of later 'it runs but I cannot reach it' debugging.

Build on the server or locally?#

Build on the serverBuild locally and upload
Memory neededHigh -- Rust and .NET builds can want 1-2 GB RAMNone
Upload sizeSmall (source only)Large (binary)
SpeedBuild time on every startStarts immediately
Best forSmall projects, quick experimentsProduction, low-RAM plans

Port binding: the most common mistake#

Every service gets an IP and a port in the panel, passed in as the SERVER_IP and SERVER_PORT environment variables. If your app listens on 127.0.0.1 it is unreachable from outside the container, and if it hardcodes a port it may not match the one assigned. The right move is to read the address from the environment.

Binding the port correctly

main.go
addr := os.Getenv("SERVER_IP") + ":" + os.Getenv("SERVER_PORT")
if addr == ":" {
    addr = "0.0.0.0:8080" // yerel gelistirme
}
log.Fatal(http.ListenAndServe(addr, nil))

Crashes, logs and restarts#

  • The panel marks the service as stopped when the process exits; enable auto-restart in the service settings.
  • Write logs to standard output rather than a file; the panel console only shows stdout.
  • Exit code 137 means the process ran out of memory (OOM); raise the plan's RAM or reduce the app's memory use.
  • In Java, cap -Xmx at roughly 75% of the plan's RAM; the rest is JVM overhead and the operating system.

Problemlərin həlli

Əlamət

App runs but is unreachable from outside

Səbəb

It listens on 127.0.0.1 or localhost.

Həll

Bind to 0.0.0.0 and to SERVER_PORT.

Əlamət

address already in use

Səbəb

A hardcoded port clashes with the assigned one, or a previous process is still alive.

Həll

Read the port from the environment, then fully stop and start the service from the panel.

Əlamət

Exit code 137

Səbəb

The memory limit was exceeded and the kernel killed the process.

Həll

Build locally or raise the plan's RAM; in Java, lower -Xmx.

Bu bələdçi faydalı oldu?

Rəy birbaşa bu bələdçini yeniləyən komandaya gedir.

Əlaqəli bələdçilər