Open source alternative to AWS. Elastic compute, block storage (non replicated), firewall and load balancer, managed Postgres, K8s, AI inference, and IAM services. https://ubicloud.com
Find a file
Hadi Moshayedi 172222cdc6 Adjust sshd MaxStartups and LoginGraceTime.
Recent short-lived host unavailability events were traced to MaxStartups
throttling. This change updates our configs to reduce the likelihood of
connection drops while limiting how long pre-auth sessions can consume
resources:

- MaxStartups is updated from 10:30:100 to 50:1:150 to allow more
  simultaneous pre-auth connections with minimal drop probability.
- LoginGraceTime is reduced from 120s to 20s to ensure stalled
  authentication attempts release resources quickly.

This change applies only to newly provisioned hosts. Existing hosts will
require a manual update to adopt the new sshd configuration.
2025-11-26 10:19:17 -08:00
.github Fix CI setup failure caused by PostgreSQL default version change 2025-11-23 20:37:31 +00:00
assets Support creating a VM using a registered SSH public key in the web UI 2025-10-04 01:36:33 +09:00
bin Remove nil stack filter from the monitor for LoadBalancerVmPort 2025-11-10 15:20:15 +01:00
cache Add migration to drop the unencrypted vm_init_script.script column 2025-11-26 12:48:22 +09:00
cli Fix stdin when using cli/ubi to run external commands 2025-08-06 03:55:16 +09:00
cli-commands Allow Postgres configuration in create API to support failover slots 2025-11-26 12:48:54 +01:00
config Upgrade default runner label's Ubuntu version from 22.04 to 24.04 2025-11-23 21:34:47 +03:00
demo Switch to Postgres 17.6 in Docker image creation 2025-11-05 12:16:28 -08:00
helpers Allow Postgres configuration in create API to support failover slots 2025-11-26 12:48:54 +01:00
kubernetes/csi Apply Layout/EmptyLineAfterGuardClause cop 2025-10-15 20:46:13 +03:00
lib Allow Postgres configuration in create API to support failover slots 2025-11-26 12:48:54 +01:00
migrate Add migration to drop the unencrypted vm_init_script.script column 2025-11-26 12:48:22 +09:00
model Add missing incr_sync_worker_mesh calls for CSI 2025-11-26 14:29:28 +01:00
openapi Allow Postgres configuration in create API to support failover slots 2025-11-26 12:48:54 +01:00
prog Adjust sshd MaxStartups and LoginGraceTime. 2025-11-26 10:19:17 -08:00
public Place inputs for object actions vertically in admin panel 2025-11-18 10:34:49 +03:00
rhizome Support custom QEMU binary, drop legacy GPU flags, add empty ROMs 2025-11-24 09:16:04 +01:00
rodauth/features Remove old login-based API authentication 2025-04-10 13:10:23 -07:00
routes Add PostgresResource list by tag endpoint 2025-11-26 10:09:05 +01:00
scheduling Extend allocator to assign gpu partitions 2025-11-12 11:33:08 +01:00
sdk/ruby Allow Postgres configuration in create API to support failover slots 2025-11-26 12:48:54 +01:00
serializers Set due date to 30 days for invoices with bank transfer info 2025-11-08 10:29:01 +03:00
spec Adjust sshd MaxStartups and LoginGraceTime. 2025-11-26 10:19:17 -08:00
vendor Ensure OIDC nonce does not repeat 2025-07-09 00:42:54 +09:00
views Encrypt the vm_init_script.init_script column, and start setting values in it 2025-11-26 12:48:22 +09:00
.by-session-setup.rb Update by dependencies 2025-05-02 08:25:05 +09:00
.dockerignore Add cloudify_server script for demo quick start 2023-08-01 10:10:22 +03:00
.editorconfig Add EditorConfig 2023-04-10 19:49:54 -07:00
.gitignore Fix nondeterministic failure in monitor smoke test 2025-10-18 02:26:24 +09:00
.rspec rspec --init 2023-01-17 12:16:56 -08:00
.rubocop.yml For load balancers, do one free retry on a stale connection 2025-07-31 10:46:58 +02:00
.tool-versions Switch to Postgres 17 in mise, oblige use mise.local.toml to get it 2025-11-05 12:16:28 -08:00
clover.rb Move ips-v4 under api.ubicloud.com 2025-11-12 17:05:33 +00:00
clover_admin.rb Show info pages at the bottom of the admin page 2025-11-19 12:32:33 +01:00
config.rb Support AWS IAM authentication for internal RDS Postgres databases 2025-11-26 12:33:23 +01:00
config.ru Use the pg_auto_parameterize_duplicate_query_detection Sequel extension 2025-10-18 03:24:36 +09:00
db.rb Support AWS IAM authentication for internal RDS Postgres databases 2025-11-26 12:33:23 +01:00
DEVELOPERS.md Switch to Postgres 17 in mise, oblige use mise.local.toml to get it 2025-11-05 12:16:28 -08:00
Dockerfile Update to Ruby 3.4.7 2025-10-11 03:55:41 +09:00
Gemfile Support AWS IAM authentication for internal RDS Postgres databases 2025-11-26 12:33:23 +01:00
Gemfile.lock Support AWS IAM authentication for internal RDS Postgres databases 2025-11-26 12:33:23 +01:00
LICENSE Update LICENSE 2024-01-29 18:02:07 -08:00
loader.rb Individualize nexus progs according to AWS or Metal usage 2025-11-24 11:08:36 +01:00
mise.local.toml.template Switch to Postgres 17 in mise, oblige use mise.local.toml to get it 2025-11-05 12:16:28 -08:00
model.rb Eager load tunnel/nic information in PrivateSubnet#disconnect_subnet 2025-06-25 04:47:48 +09:00
package-lock.json Bump glob 2025-11-19 11:40:05 +03:00
package.json Bump the js-dependencies group with 3 updates 2025-11-11 15:02:58 +00:00
Procfile Make partitioned respirate automatically rebalance based on number of workers 2025-06-14 01:46:43 +09:00
puma_config.rb Update to Puma 7 2025-09-09 02:10:31 +09:00
Rakefile Add allow_unescaped web helper method 2025-11-18 09:33:33 +09:00
README.md fix broken ABAC README link 2025-10-13 12:18:05 +02:00
tailwind.config.js Add PG Configuration UI 2025-07-24 15:03:27 +05:30
ubid.rb Remove PostgresFirewallRule model 2025-10-30 02:30:25 +09:00

Ubicloud CI Build Learn this repo using Greptile

Ubicloud is an open source cloud that can run anywhere. Think of it as an open alternative to cloud providers, like what Linux is to proprietary operating systems.

Ubicloud provides IaaS cloud features on bare metal providers, such as Hetzner, Leaseweb, and AWS Bare Metal. You can set it up yourself on these providers or you can use our managed service.

Quick start

Managed platform

You can use Ubicloud without installing anything. When you do this, we pass along the underlying provider's benefits to you, such as price or location.

https://console.ubicloud.com

Build your own cloud

You can also build your own cloud. To do this, start up Ubicloud's control plane and connect to its cloud console.

git clone git@github.com:ubicloud/ubicloud.git

# Generate secrets for demo
./demo/generate_env

# Run containers: db-migrator, app (web & respirate), postgresql
docker-compose -f demo/docker-compose.yml up

# Visit localhost:3000

The control plane is responsible for cloudifying bare metal Linux machines. The easiest way to build your own cloud is to lease instances from one of those providers. For example: https://www.hetzner.com/sb

Once you lease instance(s), update the .env file with the following environment variables:

  • HETZNER_USER
  • HETZNER_PASSWORD
  • HETZNER_SSH_PUBLIC_KEY
  • HETZNER_SSH_PRIVATE_KEY

Then, run the following script for each instance to cloudify it. Currently, the script cloudifies bare metal instances leased from Hetzner. After you cloudify your instances, you can provision and manage cloud resources on these machines.

# Enter hostname/IP and provider
docker exec -it ubicloud-app ./demo/cloudify_server

Later when you create VMs, Ubicloud will assign them IPv6 addresses. If your ISP doesn't support IPv6, please use a VPN or tunnel broker such as Mullvad or Hurricane Electric's https://tunnelbroker.net/ to connect. Alternatively, you could lease IPv4 addresses from your provider and add them to your control plane.

Why use it

Public cloud providers like AWS, Azure, and Google Cloud have made life easier for start-ups and enterprises. But they are closed source, have you rent computers at a huge premium, and lock you in. Ubicloud offers an open source alternative, reduces your costs, and returns control of your infrastructure back to you. All without sacrificing the cloud's convenience.

Today, AWS offers about two hundred cloud services. Ultimately, we will implement 10% of the cloud services that make up 80% of that consumption.

Example workloads and reasons to use Ubicloud today include:

  • You have an ephemeral workload like a CI/CD pipeline (we're integrating with GitHub Actions), or you'd like to run compute/memory heavy tests. Our managed cloud is ~3x cheaper than AWS, so you save on costs.

  • You want a portable and simple app deployment service like Kamal. We're moving Ubicloud's control plane from Heroku to Kamal; and we want to provide open and portable services for Kamal's dependencies in the process.

  • You have bare metal machines sitting somewhere. You'd like to build your own cloud for portability, security, or compliance reasons.

Status

You can provide us your feedback, get help, or ask us questions regarding your Ubicloud installations in the Community Forum.

We follow an established architectural pattern in building public cloud services. A control plane manages a data plane, where the data plane leverages open source software. You can find our current cloud components / services below.

  • Elastic Compute: Our control plane communicates with Linux bare metal servers using SSH. We use Cloud Hypervisor as our virtual machine monitor (VMM); and each instance of the VMM is contained within Linux namespaces for further isolation / security.

  • Networking: We use IPsec tunneling to establish an encrypted and private network environment. We support IPv4 and IPv6 in a dual-stack setup and provide both public and private networking. For security, each customers VMs operate in their own networking namespace. For firewalls and load balancers, we use Linux nftables.

  • Block Storage, non replicated: We use Storage Performance Development Toolkit (SPDK) to provide virtualized block storage to VMs. SPDK enables us to add enterprise features such as snapshot and replication in the future. We follow security best practices and encrypt the data encryption key itself.

  • Attribute-Based Access Control (ABAC): With ABAC, you can define attributes, roles, and permissions for users and give them fine-grained access to resources. You can read more about our ABAC design here.

  • What's Next?: We're planning to work on a managed K8s or metrics/monitoring service next. If you have a workload that would benefit from a specific cloud service, please get in touch with us through our Community Forum.

  • Control plane: Manages data plane services and resources. This is a Ruby program that stores its data in Postgres. We use the Roda framework to serve HTTP requests and Sequel to access the database. We manage web authentication with Rodauth. We communicate with data plane servers using SSH, via the library net-ssh. For our tests, we use RSpec.

  • Cloud console: Server-side web app served by the Roda framework. For the visual design, we use Tailwind CSS with components from Tailwind UI. We also use jQuery for interactivity.

If youd like to start hacking with Ubicloud, any method of obtaining Ruby and Postgres versions is acceptable. If you have no opinion on this, our development team uses mise as documented here in detail.

Greptile provides an AI/LLM that indexes Ubicloud's source code can answer questions about it.

FAQ

Do you have any experience with building this sort of thing?

Our founding team comes from Azure; and worked at Amazon and Heroku before that. We also have start-up experience. We were co-founders and founding team members at Citus Data, which got acquired by Microsoft.

How is this different than OpenStack?

We see three differences. First, Ubicloud is available as a managed service (vs boxed software). This way, you can get started in minutes rather than weeks. Since Ubicloud is designed for multi-tenancy, it comes with built-in features such as encryption at rest and in transit, virtual networking, secrets rotation, etc.

Second, we're initially targeting developers. This -we hope- will give us fast feedback cycles and enable us to have 6 key services in GA form in the next two years. OpenStack is still primarily used for 3 cloud services.

Last, we're designing for simplicity. With OpenStack, you pick between 10 hypervisors, 10 S3 implementations, and 5 block storage implementations. The software needs to work in a way where all of these implementations are compatible with each other. That leads to consultant-ware. We'll take a more opinionated approach with Ubicloud.