Publish an app on a free subdomain

Every VPS account includes free subdomains under vps.nasiadka.pl. At the end of this guide, your web app is available over HTTPS at an address such as https://myapp.vps.nasiadka.pl, and you have set up no DNS records or certificates.

What you need

Example: a minimal test server on port 3000 (needs Node.js)
node -e "require('http').createServer((q,r)=>r.end('hello')).listen(3000,'0.0.0.0')"

Publish it in three steps

  1. Start your app inside the container

    Run it on any port and make it listen on 0.0.0.0. To keep it running after you close SSH, use a process manager, a tool that restarts your app after a crash and starts it on boot. See Keep your apps running with PM2.

  2. Open Domain Routing in the dashboard

    Click "Use Free Subdomain". It fills in a full name such as myapp.vps.nasiadka.pl. Change myapp to the name you want, so that the field holds the full name. The part before .vps.nasiadka.pl must be a single word (no dots), not already taken, and not a reserved name such as app, api, admin, www or dev.

  3. Set the target port and add the route

    Enter the port your app listens on (for example 3000) in "Target Port" and click "Add Route". The dashboard rejects reserved names at this point. Your app is then available at https://myapp.vps.nasiadka.pl, with your own name in place of myapp.

The Domain Routing page of the dashboard with a route mapping demo-app.vps.nasiadka.pl to port 3000
Domain Routing: the route list shows the subdomain and the port it points to.

Troubleshooting

  • A 502 or 504 error usually means nothing is listening on the target port, or the app listens only on 127.0.0.1.
  • To see which programs are listening on which ports, run sudo ss -ltnp in your container.
  • Your app must serve plain HTTP on the target port. HTTPS is handled before traffic reaches your container, so an app that accepts only HTTPS does not work.

Follow along on your own container

Already have an account? Sign in to try this guide on your container. Accounts are created by invitation.

Sign in