This guide explains how to deploy SelfKit using Coolify resources on a server.
The deployment configuration is located in the deployment
folder:
deployment/
├── DEPLOY.md # This deployment guide
├── .env.example # Example environment variables
├── .env # Your environment configuration (created from example)
└── coolify_deploy.sh # Coolify initialization script
- A Coolify instance running on your server
- Coolify API token
- Git repository with your SelfKit code
-
Copy
.env.example
to.env
:cp deployment/.env.example deployment/.env
-
Update the environment variables in
.env
:# Coolify Configuration COOLIFY_TOKEN=your-coolify-token COOLIFY_URL=http://your-coolify-server:8000 # Database DB_NAME=selfkit-db DB_USER=selfkit # Umami UMAMI_NAME=selfkit-umami UMAMI_VERSION=latest # Plunk PLUNK_NAME=selfkit-plunk PLUNK_VERSION=latest
-
Run the initialization script:
cd deployment ./coolify_deploy.sh
This script will:
- Create a new project in Coolify
- Set up a PostgreSQL database
- Deploy Umami analytics
- Create a Plunk email service
- Save the configuration in
coolify.config.json
-
The script will output important information like database credentials and service URLs. Make sure to save this information securely.
- Access your Coolify dashboard to monitor the deployments
- Configure your services:
- Set up Umami analytics
- Configure Plunk email settings
If you encounter any issues:
- Check the Coolify logs for each service
- Verify your API token has the correct permissions
- Ensure all required ports are open on your server
- Check the
.env
file for correct configuration values
- Never commit
.env
orcoolify.config.json
to version control - Use strong passwords in configuration
- Regularly update:
- Server OS packages
- Coolify version
- Application dependencies
For issues or questions:
- Coolify Documentation: https://coolify.io/docs
- SelfKit Documentation: https://docs.selfkit.dev/docs
- Project Issues: Create an issue in the GitHub repository