Oxid is a Rust-based Infrastructure as Code engine supported natively in ops0. It uses the same HCL syntax as Terraform and OpenTofu but is backed by a PostgreSQL database rather than cloud-provider APIs — making it ideal for managing application-layer configuration, internal tooling infrastructure, and database schema state.
Oxid support in ops0 is currently in beta. A disclaimer is shown on first use. Core functionality (plan, apply, destroy, SQL console) is stable.
Click IaC in the sidebar.
Select + New Project.
In the IaC Type dropdown, choose Oxid.
A one-time disclaimer is shown explaining Oxid's beta status. Click Continue.
Name the project and click Create.
Oxid requires a PostgreSQL database connection to store state and manage resources. After creating an Oxid project, you need to enable the backend.
In the IaC editor, click Settings in the project toolbar, then select Oxid Backend.
Click the Enable Oxid button.
Provide a PostgreSQL connection string:
postgresql://user:password@host:5432/dbname?sslmode=require
Click Save. ops0 tests the connection and stores the URL encrypted.
| Component | Example | Notes |
|---|---|---|
| User | myuser | Database user |
| Password | secret | URL-encoded if it contains special characters |
| Host | db.example.com | Hostname or IP |
| Port | 5432 | Default PostgreSQL port |
| Database | mydb | Database name |
| SSL mode | sslmode=require | Recommended for production |
| Action | How |
|---|---|
| Edit | Click Edit Oxid in project settings to update the database URL |
| Disable | Click Disable Oxid — removes the backend config (does not delete the database) |
Oxid deployments follow the same plan → apply workflow as Terraform:
Oxid runs oxid init, oxid plan, and oxid apply internally. Output is streamed to the deployment log in real time.
Oxid will perform the following actions:
+ oxid_database_user.app_user
username: "app_user"
database: "mydb"
+ oxid_schema.public_ext
name: "extensions"
Plan: 2 to add, 0 to change, 0 to destroy.
Oxid projects with a configured backend include a built-in SQL console for querying the connected PostgreSQL database directly from ops0.
| Feature | Description |
|---|---|
| Schema browser | View all tables and columns in the connected database |
| Query editor | Write and execute SQL queries |
| Result table | Paginated results (up to 1,000 rows) |
| Saved queries | Save frequently used queries with a name |
| Query timeout | Queries time out after 30 seconds |
The schema browser shows all tables in information_schema for the connected database:
Tables in mydb:
├── users (id, email, created_at, updated_at)
├── teams (id, name, org_id, created_at)
├── memberships (user_id, team_id, role)
└── audit_events (id, user_id, action, resource, timestamp)
Click any table to auto-fill a SELECT * FROM <table> LIMIT 100 query.
-- Example: find all users created in the last 7 days
SELECT id, email, created_at
FROM users
WHERE created_at > NOW() - INTERVAL '7 days'
ORDER BY created_at DESC;
Click Run or press Ctrl+Enter / Cmd+Enter.
Saved queries appear in the Saved panel on the left. Click any saved query to load it into the editor.
The SQL console runs queries directly against your database with the credentials provided in the Oxid backend configuration. There is no read-only mode — destructive queries (DELETE, DROP, TRUNCATE) will execute. Use with care.
| Feature | Terraform / OpenTofu | Oxid |
|---|---|---|
| Target | Cloud provider APIs | PostgreSQL database |
| State backend | S3, GCS, Azure Blob, local | PostgreSQL (built-in) |
| Syntax | HCL | HCL (compatible) |
| SQL Console | No | Yes |
| Use case | Cloud infrastructure | DB-backed resources, app config |