Deploy your first database
Deploying your first database in Coolify helps you validate database creation, credentials, port mapping, and terminal access in a simple flow.
In this guide, you will deploy Redis from the one-click database resources list.
A one-click database is a standalone database resource that Coolify creates from its New Resource > Databases list. Coolify supplies the Redis image, generated credentials, persistent storage, network, and connection details so you can deploy it without writing a Docker Compose file.
Before you start
Make sure these things are ready before you deploy the database.
Dashboard access
You can sign in to Coolify and see the main dashboard.
- You can access Coolify in your browser
- Dashboard loads without errors
Server is connected
Coolify has at least one server listed on the Servers page.
- Open Servers from the sidebar
- For self-hosted installs, localhost is fine
Terminal ready
You can run a command from your computer to test Redis.
- Use redis-cli if installed
- Use Docker if redis-cli is not installed
If Coolify is not ready yet, first follow Start with Self-hosted or Start with Coolify Cloud.
Deployment overview
Deploy your first Redis database
Choose the deployment method you want to use. Each tab reaches the same first-deployment outcome.
Create your first project
On the Coolify dashboard:
- click New Project
- enter a project name, for example
my-first-project - click Continue
If you already have a project, skip this step and continue to Step 2.
Create a new resource
Open your project and click Create New Resource.
A resource is something Coolify will run for you, such as an app, database, or service. In this guide, the resource will be a Redis database.
Choose Redis from the database list
In the resource list:
- search for Redis
- click Redis
Coolify will create a Redis database resource with generated settings and credentials.
Configure port mapping
Set a temporary port mapping so you can connect from your terminal.
Example:
6380:6379Open the mapped host port on your firewall
Port mapping publishes Redis on the server, but your firewall or cloud provider may still block incoming traffic.
Open the mapped host port, for example TCP 6380, wherever you manage firewall rules for the server running Redis. This is different for each provider and server setup, so check your provider firewall, security group, or server firewall configuration.
For safer testing, allow the port only from your own IP address and close it again when you are done. For general guidance, see Firewall.
Start Redis
Click Start.
After deployment, keep these values ready:
- server IP address
- mapped host port, for example
6380 - Redis password from the Coolify dashboard
Connect to Redis from terminal
Use redis-cli from your terminal:
redis-cli --user default -h <server-ip> -p <host-port> -a "<redis-password>"Example:
redis-cli --user default -h 203.0.113.10 -p 6380 -a "your-password"Then run:
PINGIf everything is working, Redis returns:
PONGRun redis-cli from a temporary Redis container instead:
docker run --rm -it redis:alpine redis-cli --user default -h <server-ip> -p <host-port> -a "<redis-password>" PINGIf the connection works, it returns PONG.
Common first-deploy issues
Use these checks when Redis deploys but the terminal test does not behave as expected.
Usually means Redis is not reachable on the host port you are using.
Check:
- Redis deployment is in running state
- Ports Mappings uses the host port you are connecting to
- your server firewall allows the mapped host port
- you are using the server IP address, not the Redis container IP
What to do next
Your first database confirms that Coolify can create a database, generate credentials, expose a test port, and accept a connection.
