Quick Start
This guide will help you quickly deploy and run gocron.
Requirements
- Go: 1.23+
- Database: MySQL / PostgreSQL / SQLite (see notes below)
- Node.js: 20+ (only for frontend development)
Database Support
| Deployment Method | MySQL | PostgreSQL | SQLite |
|---|---|---|---|
| Docker Deployment | ✅ Supported | ✅ Supported | ❌ Not Supported |
| Binary Deployment | ✅ Supported | ✅ Supported | ✅ Supported |
| Development Environment | ✅ Supported | ✅ Supported | ✅ Supported |
Note
- Docker Deployment: Due to cross-platform compilation limitations, Docker images do not support SQLite. Please use MySQL or PostgreSQL
- Production Recommendation: Use MySQL or PostgreSQL for better performance and distributed deployment support
Docker Compose Deployment (Recommended)
Docker deployment is the simplest and fastest way, suitable for quick testing and evaluation.
Steps
# 1. Clone the project
git clone https://github.com/gocronx-team/gocron.git
cd gocron
# 2. Start services (automatically builds image)
docker-compose up -d
# 3. Access web interface
# http://localhost:5920Default Credentials
- Username:
admin - Password:
admin123
Tip
- Docker Compose only deploys the gocron management server
- Task nodes (gocron-node) need to be installed separately
- See Agent Auto-Registration for installing task nodes
Binary Deployment (Production Recommended)
Suitable for production environments, supports all databases (including SQLite).
Download Package
Visit GitHub Releases to download the latest version.
Choose the package for your platform:
- Linux:
gocron-linux-amd64.tar.gzorgocron-linux-arm64.tar.gz - macOS:
gocron-darwin-amd64.tar.gzorgocron-darwin-arm64.tar.gz - Windows:
gocron-windows-amd64.ziporgocron-windows-arm64.zip
Installation Steps
# 1. Extract the package
tar -xzf gocron-linux-amd64.tar.gz
cd gocron-linux-amd64
# 2. Configure database (optional)
# Edit .gocron/conf/app.ini
# Uses SQLite by default, no configuration needed
# 3. Start service
./gocron web
# 4. Access web interface
# http://localhost:5920Database Configuration
gocron supports three databases, choose according to your needs:
SQLite (Default)
No configuration needed, works out of the box. Suitable for small deployments and testing.
MySQL
Edit .gocron/conf/app.ini:
[db]
engine = mysql
host = 127.0.0.1
port = 3306
user = root
password = your_password
database = gocron
charset = utf8mb4PostgreSQL
Edit .gocron/conf/app.ini:
[db]
engine = postgres
host = 127.0.0.1
port = 5432
user = postgres
password = your_password
database = gocronDevelopment Environment
Suitable for development and debugging.
Prerequisites
- Go 1.23+
- Node.js 20+
- Yarn
Steps
# 1. Clone the project
git clone https://github.com/gocronx-team/gocron.git
cd gocron
# 2. Install Go dependencies
go mod download
# 3. Configure database
# Edit .gocron/conf/app.ini
# Or copy app.ini.sqlite.example to use SQLite
# 4. Install development tools
go install github.com/air-verse/air@latest
# 5. Start backend (with hot reload)
air
# 6. Start frontend (in another terminal)
cd web/vue
yarn install
yarn run devVisit http://localhost:8080
Install Task Nodes
gocron uses a distributed architecture where tasks execute on independent nodes.
Method 1: Auto-Registration (Recommended)
Use the web interface to generate one-click installation commands. See Agent Auto-Registration for details.
Method 2: Manual Installation
# 1. Download gocron-node package
# Visit GitHub Releases to download the package for your platform
# 2. Extract
tar -xzf gocron-node-linux-amd64.tar.gz
cd gocron-node-linux-amd64
# 3. Start node
./gocron-node
# 4. Add node in web interface
# Go to "Task Nodes" page and click "Add Node"Verify Installation
- Access web interface: http://localhost:5920
- Login with default credentials (admin / admin123)
- Go to "Task Nodes" page and confirm nodes are connected
- Create a test task and verify execution
Next Steps
- Configuration - Learn about detailed configuration options
- Scheduled Tasks - Learn how to create and manage tasks
- Agent Auto-Registration - Quickly deploy task nodes
- API Documentation - Manage tasks using API
FAQ
Cannot use SQLite with Docker deployment?
Docker images do not support SQLite due to cross-platform compilation limitations. Please use MySQL or PostgreSQL, or switch to binary deployment.
How to change the default port?
# Method 1: Command line argument
./gocron web -p 8080
# Method 2: Configuration file
# Edit .gocron/conf/app.ini
[server]
port = 8080How to enable HTTPS?
See Security - TLS Mutual Authentication chapter.
Task node cannot connect?
- Check if the node is running properly
- Check firewall settings
- Confirm node address is configured correctly
- Check node logs:
log/cron.log