Database Providers
Database is an integral part of any application. DOM Cloud provides a free, opt-in OS-Wide MariaDB 10.11, PostgreSQL 17.4 and Valkey 8.0 databases available for every website in every tier.
Initializing Databases
Databases are opt-in, disabled by default. To enable it, go to deploy tab and execute one of these:
features:
- mysql
features:
- postgresql
features:
- redis
See the section in MariaDB or PostgreSQL or Valkey for more information.
To view and edit the database using online tools, use PhpMyAdmin, PhpPgAdmin or PhpRedisAdmin. All of them are available from the manage tab.
Managing Databases
You can manage databases in Setup -> Database. The entries below is the list of databases name that has been created.


Note that you cannot create or drop database with PhpMyAdmin, PhpPgAdmin, phpRedisAdmin or with any external database client. You can only to do it either from here, the Webmin UI or in the deployment script.
MariaDB
MariaDB is the fork of MySQL database. Here's how you connect it from the application in the server:
MARIADB_HOST=localhost
MARIADB_PORT=3306
MARIADB_NAME=<database name>
MARIADB_USER=<username login>
MARIADB_PASS=<password login>
The username and password login can be seen from manage tab. The database name is tipically username + _db
but you check the database name from managing database.
To connect the database with remote client, set the MARIADB_HOST
as the server name, which also can be seen from manage tab. You can also use PhpMyAdmin or mariadb
CLI from SSH to manage it.
Username and password is always different from the default. Don't assume root
username with empty password will work for you.
Notable Differences of MariaDB and MySQL
Here's non exhaustive list of the differences:
- MariaDB have UUID while MySQL not. In Laravel 11, setting the database engine to
mariadb
will pick up theUUID
as the native type for UUID. - MariaDB doesn't support lateral join at this moment.
PostgreSQL
PostgreSQL is the most complete RDBMS. Here's how you connect it from the application in the server:
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_NAME=<database name>
POSTGRES_USER=<username login>
POSTGRES_PASS=<password login>
The username and password login can be seen from manage tab. The database name is tipically username + _db
but you check the database name from managing database.
To connect the database with remote client, set the POSTGRES_HOST
as the server name, which also can be seen from manage tab. You can also use PhpPgAdmin or psql
CLI from SSH to manage it.
Supported PostgreSQL Extensions
These optional PostgreSQL extensions can be activated using CREATE EXTENSION
clause on a given database:
Extension Name | Description | Link |
---|---|---|
btree_gin | Provides support for GIN (Generalized Inverted Index) indexing for B-tree data types. | Documentation |
btree_gist | Provides support for GiST (Generalized Search Tree) indexing for B-tree data types. | Documentation |
citext | A case-insensitive text data type extension. | Documentation |
cube | Provides data types and functions to support multidimensional cubes. | Documentation |
dict_int | Provides an example dictionary template for integers. | Documentation |
earthdistance | Provides functions for calculating great-circle distances between points on the Earth's surface. | Documentation |
fuzzystrmatch | Provides functions to perform "fuzzy" string matching, including soundex and levenshtein distance. | Documentation |
hstore | A key-value store within PostgreSQL, allowing you to store sets of key/value pairs within a single PostgreSQL value. | Documentation |
intarray | Provides support for indexed arrays of integers. | Documentation |
isn | Provides data types for various international standard numbers, such as ISBN, ISMN, and ISSN. | Documentation |
lo | Provides support for large objects within PostgreSQL. | Documentation |
ltree | Provides a data type for representing labels of data stored in a hierarchical tree-like structure. | Documentation |
pgcrypto | Provides cryptographic functions for PostgreSQL, including encryption, decryption, hashing, and more. | Documentation |
pg_trgm | Provides functions and operators for determining the similarity of text based on trigram matching. | Documentation |
plpgsql | PostgreSQL's procedural language for SQL, allowing for control structures, complex calculations, and error handling in SQL scripts. | Documentation |
seg | Provides a "seg" data type for representing line segments in two-dimensional space. | Documentation |
tablefunc | Provides functions for manipulating tables, such as crosstab functions. | Documentation |
tcn | Provides support for Triggered Change Notification, allowing for notification of changes in the database. | Documentation |
tsm_system_rows | A table sampling method that returns a specified number of rows. | Documentation |
tsm_system_time | A table sampling method that returns rows from a table based on the system time. | Documentation |
unaccent | Provides a dictionary and function to remove accents (diacritics) from strings. | Documentation |
uuid-ossp | Provides functions to generate universally unique identifiers (UUIDs). | Documentation |
pg_uuidv7 | Provides support for UUID version 7, a new type of universally unique identifier. | Documentation |
postgis | A spatial database extender for PostgreSQL, providing support for geographic objects. | Documentation |
postgis_raster | Extends PostGIS with raster data support, allowing the storage, query, and analysis of raster data types. | Documentation |
postgis_sfcgal | Extends PostGIS with advanced 3D capabilities provided by the SFCGAL library. | Documentation |
postgis_tiger_geocoders | Provides geocoding functions using the U.S. Census TIGER/Line data. | Documentation |
postgis_topology | Extends PostGIS with topology support, allowing the representation of topological structures. | Documentation |
address_standardizer | Standardizes address data for geocoding purposes. | Documentation |
address_standardizer_data_us | Provides US address data for the address standardizer extension. | Documentation |
pgrouting | Extends PostGIS with geospatial routing functionality. | Documentation |
timescaledb | An extension that provides scalable time-series data management built on PostgreSQL. | Documentation |
vector | A vector data type extension, useful for implementing machine learning models and similar functionalities. | Documentation |
Valkey
Valkey is a fork of Redis. Here's how you connect it from the application in the server:
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_KEY_PREFIX=<database name>:
REDIS_USER=<database name>
REDIS_PASS=<database password>
The REDIS_KEY_PREFIX
and REDIS_USER
is the ACL rules that your application must follow, as the Redis server is shared for whole server. Get the <database name>
and <database password>
from manage databases.
Here's how to connect to Valkey for applications who do not support Redis ACL username and prefixed keys:
REDIS_HOST=localhost
REDIS_PORT=6479
REDIS_PASS=<database name>:::<database password>
The port 6479 signifies that you're connecting to ACL Proxy for Valkey.
We do not support remote connection to Redis at this moment. Please use PhpRedisAdmin or valkey-cli
to manage it.
Valkey ACL Rules
The Valkey instance set up at port 6379
is shared across the server. To protect user data, we set up an ACL authentication to each "database" instance. Given a "database" name is user_db
, the ACL rules applied are:
user_db on >${password} ~user_db:* &user_db:* sanitize-payload
-@all +@connection +@read +@write +@scripting +@keyspace -KEYS
+@transaction +@geo +@hash +@set +@sortedset +@bitmap +@pubsub
+config|get +info +acl|whoami +acl|cat +acl|genpass
Most software or framework should work with this ACL rules, however not application would support key prefixing as implied in ~user_db:* &user_db:*
. To avoid code changes we recommend you to use port 6479
which is another daemon that can aid with automatic key prefixing to the master valkey instance.
ACL Proxy for Valkey
DOM Cloud set up an ACL proxy for valkey that listening on port 6479
. It's mirrorring connections to 6379
with these enhancements:
- Automatically prefixes keys or read/write operations such as
SCAN
,GET
,SET
and so much more, to allow access any keys without having to prefix it withuser_db:
(whereuser_db
is the ACL username). - Automatically removes prefix of
user_db:
with results fromSCAN
so the clients doesn't need to adjust with automatic key prefixing. - Support old
requirepass
login model withusername:::password
syntax in the password. This is meant for frameworks that doesn't handle Redis 6.0 ACL yet.
Note that the proxy is experimental. Some modern features (like HELLO 3
) won't work and some Lua scripting may not work if it written badly. See the repository for details.
To connect to this proxy with redis-cli
, use redis-cli -u username_db:::password -p 6479
. PhpRedisAdmin is also configured to work on 6479
rather than directly with the master valkey instance at 6379
. Note that the redis-cli
is a symlink to valkey-cli
.
Timestamp
Our server always sets the clock in UTC
.
A good idea to handle timezone is done by client processing (Javascript), both after getting the data from database/AJAX and before sending data/Posts to server.
If you don't care about timezone and you think it's safe to assume that your website is only accessed in one timezone, you can set the timezone in the backend using date_default_timezone_set for PHP or TZ
env for non-PHP (set it to passenger's env_var_list
).
Other Database System
Only four database system is supported: MariaDB
, PostgreSQL
, Valkey
, SQLite
. For caching we recommend you to leverage Valkey or the filesystem.
You can also use third party databases that's also cheap (or even free) such as Firebase Firestore or MongoDB Atlas, just make sure the cluster is close enough within our server.
If you wish to spin up a custom database server, you might be better deploy your website using docker.