Skip to content

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 MethodMySQLPostgreSQLSQLite
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 deployment is the simplest and fastest way, suitable for quick testing and evaluation.

Steps

bash
# 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:5920

Default 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

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.gz or gocron-linux-arm64.tar.gz
  • macOS: gocron-darwin-amd64.tar.gz or gocron-darwin-arm64.tar.gz
  • Windows: gocron-windows-amd64.zip or gocron-windows-arm64.zip

Installation Steps

bash
# 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:5920

Database 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:

ini
[db]
engine = mysql
host = 127.0.0.1
port = 3306
user = root
password = your_password
database = gocron
charset = utf8mb4

PostgreSQL

Edit .gocron/conf/app.ini:

ini
[db]
engine = postgres
host = 127.0.0.1
port = 5432
user = postgres
password = your_password
database = gocron

Development Environment

Suitable for development and debugging.

Prerequisites

  • Go 1.23+
  • Node.js 20+
  • Yarn

Steps

bash
# 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 dev

Visit http://localhost:8080

Install Task Nodes

gocron uses a distributed architecture where tasks execute on independent nodes.

Use the web interface to generate one-click installation commands. See Agent Auto-Registration for details.

Method 2: Manual Installation

bash
# 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

  1. Access web interface: http://localhost:5920
  2. Login with default credentials (admin / admin123)
  3. Go to "Task Nodes" page and confirm nodes are connected
  4. Create a test task and verify execution

Next Steps

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?

bash
# Method 1: Command line argument
./gocron web -p 8080

# Method 2: Configuration file
# Edit .gocron/conf/app.ini
[server]
port = 8080

How to enable HTTPS?

See Security - TLS Mutual Authentication chapter.

Task node cannot connect?

  1. Check if the node is running properly
  2. Check firewall settings
  3. Confirm node address is configured correctly
  4. Check node logs: log/cron.log