Documentation
Web Services - Deploy Dynamic Web Apps
Deploy dynamic web applications with public URLs using deployra web services. Support for all major frameworks including Express, Django, Rails, Flask, and Laravel. Get automatic SSL, custom domains, and zero-downtime deployments.
Supported Frameworks & Languages
deployra web services support all major web frameworks and programming languages with automatic buildpack detection and custom Docker container support.
Express, Next.js, Nuxt.js, Fastify
Django, Flask, FastAPI, Pyramid
Rails, Sinatra, Hanami
Laravel, Symfony, CodeIgniter
Gin, Echo, Fiber, Chi
Spring Boot, Quarkus, Micronaut
Deployra helps you host web apps written in your favorite language and framework: Node.js with Express, Python with Django—you name it. Deployra builds and deploys your code with every push to your linked Git branch. You can also deploy a prebuilt Docker image.
Every Deployra web service gets a unique deployra.app subdomain, and you can add your own custom domains. Web services can also communicate with your other Deployra services over your private network.
Port binding
Every Deployra web service must bind to a port on host 0.0.0.0 to serve HTTP requests. Deployra forwards inbound requests to your web service at this port (it is not directly reachable via the public internet).
We recommend binding your HTTP server to the port defined by the PORT environment variable. Here's a basic Express example:
const express = require('express')
const app = express()
const port = process.env.PORT || 4000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
The default value of PORT is 3000 for all Deployra web services. You can override this value by setting the environment variable for your service in the Deployra Dashboard.
Connect to your web service
Connecting from the public internet
Your web service is reachable via the public internet at its deployra.app subdomain (along with any custom domains you add).
If you don't want your service to be reachable via the public internet, create aprivate serviceinstead of a web service.
Deployra's load balancer terminates SSL for inbound HTTPS requests, then forwards those requests to your web service over HTTP. If an inbound request uses HTTP, Deployra first redirects it to HTTPS and then terminates SSL for it.
Connecting from your private network
Your web service can communicate with your other Deployra services over your private network. This private network is automatically created when you add services to your Deployra account.
Within your private network, you can reach your services using their internal hostnames, which follow this format:
service-name.service
For example, if you have a web service named "api" and a database service named "db", your api service can connect to the db service using "db.service" as the hostname.
Web Service Features
Public Internet Access
Your web service is accessible via the public internet with a unique deployra.app subdomain. Add custom domains and get automatic SSL certificates for professional deployment.
Zero-Downtime Deployments
Deployments use rolling updates to ensure your application remains available during updates. New instances are health-checked before receiving traffic.
Private Network Access
Connect to other deployra services (databases, private services) over a secure private network using internal hostnames like service-name.service.
Automatic Scaling
Scale your web service horizontally with multiple instances and automatic load balancing. Handle traffic spikes with confidence and reliability.
Frequently Asked Questions
What's the difference between web services and private services?
Web services are accessible from the public internet and get a deployra.app subdomain. Private services are only accessible within your deployra private network and are perfect for internal APIs, databases, or services that shouldn't be publicly accessible.
Can I use custom domains with web services?
Yes! You can add custom domains to your web services and get automatic SSL certificates. This is perfect for production applications that need professional domain names. Multiple domains can point to the same service.
How do I configure the port my web service listens on?
Your web service should bind to the port specified by the PORT environment variable (default: 3000) on host 0.0.0.0. You can override the PORT value in your service's environment variables if needed.
Do web services support HTTPS?
Yes! All web services get automatic HTTPS with SSL certificates. deployra's load balancer terminates SSL and forwards requests to your service over HTTP. HTTP requests are automatically redirected to HTTPS.
Can web services connect to databases?
Absolutely! Web services can connect to deployra databases (PostgreSQL, MySQL, Redis) and external databases over the private network. Use internal hostnames like "database-name.service" for deployra-managed databases.
What happens during deployments?
deployra uses zero-downtime deployments. New instances are started with your updated code, health-checked, and gradually receive traffic. Old instances are terminated only after new ones are healthy and serving traffic.