Deploy Your First Container
This guide walks you through deploying an application on Bahriya from scratch. By the end, you will have a running container accessible over HTTPS.
1. Create an organisation
After signing in, create an organisation. This is the top-level grouping for all your resources. You need a name, a handle (permanent identifier), and a contact email.
2. Create a project
Inside your organisation, create a project. Projects group related containers, registries, and secrets together. A project called "my-app" is a good starting point.
3. Add a registry (if using a private image)
If your container image is in a private registry (Docker Hub private repo, GitHub Container Registry, your own registry), add the registry credentials to your project:
- Server — The registry URL (e.g.
registry.hub.docker.com, ghcr.io).
- Username and password — Your registry credentials.
- Regions — Where to deploy the credentials (should match the regions you plan to use for your container).
If your image is public, skip this step.
4. Add secrets (if needed)
If your application needs environment variables with sensitive values (database passwords, API keys), add them as secrets:
- Handle — A name for the secret (e.g.
db-credentials).
- Key-value pairs — The environment variables and their values.
- Regions — Where to deploy the secret.
Secrets are encrypted at rest and injected into your container at runtime.
5. Create a container
Now create your container with these settings:
- Handle — A permanent identifier (e.g.
api, web, worker).
- Image — The full image reference including tag (e.g.
ghcr.io/myorg/api:1.0.0).
- Registry — Select the registry you added in step 3 (or leave empty for public images).
- Port — The port your application listens on (e.g.
8080).
- Health check path — An endpoint that returns 200 when healthy (e.g.
/health).
- Regions — Choose one or more regions to deploy to.
- Resources — Set minimum CPU and memory.
- Secrets — Attach any secrets you created in step 4.
- Environment variables — Add any non-sensitive configuration.
6. Wait for deployment
Bahriya provisions your container across your chosen regions. You can track the status on the container detail page. The typical deployment takes one to three minutes.
7. Access your application
Once running, your container is accessible at its default hostname:
https://<handle>.<region>.x.on.bahriya.app
For example, if your container handle is api and you deployed to helsinki-1:
https://api.helsinki-1.x.on.bahriya.app
What to do next
- Add more regions to serve users globally.
- Configure a custom domain to use your own hostname.
- Enable autoscaling to handle traffic spikes automatically.
- Set up the Reis CLI for command-line deployments and CI/CD integration.