Quick Installation
This guide will help you get Wecode installed and running quickly. For detailed installation instructions, see the Installation Guide.Prerequisites
Before you begin, ensure your Linux server has:Check PHP Version
Wecode requires PHP 8.0.2 or higher. Verify your PHP version:PHP must have permission to run shell commands using
shell_exec(). Verify this is enabled:Verify Docker Installation
Docker is required for secure code execution. Check if Docker is installed:If not installed, follow the Docker installation guide.
Installation Steps
Run the Install Script
Execute the automated installation script with your database credentials:Script Options:
-u: Database username (required)-d: Database name (defaults to username if not specified)-p: Database password (required)-s: Site URL with http:// or https:// (required)-a: Admin username (optional, defaults to “abc”)-e: Admin email (optional, defaults to “[email protected]”)
The install script will automatically:
- Download and install Composer
- Install PHP dependencies
- Copy and configure
.envfile - Generate application key
- Run database migrations
- Create an admin user
First Login
Login as Admin
Use the credentials you specified during installation:
- Username: The value you provided with
-aflag (default: “abc”) - Password: The value you provided with
-pflag - Email: The value you provided with
-eflag (default: “[email protected]”)
Create Your First Assignment
Configure Assignment Details
Fill in:
- Assignment name: e.g., “Hello World”
- Description: Upload a PDF or write in Markdown/HTML
- Start/End dates: When students can submit
- Allowed languages: C, C++, Java, Python, etc.
Set Up Test Cases
Choose your grading method:Output Comparison:
- Provide input and expected output pairs
- Wecode will run the code and compare output
- Upload custom test code
- More flexible for complex validation
Configure Limits
Set resource limits:
- Time limit: Maximum execution time (e.g., 1 second)
- Memory limit: Maximum memory usage (e.g., 256 MB)
Submit Your First Code
Next Steps
Installation Guide
Learn about advanced installation options and troubleshooting
Security Guide
Secure your Wecode installation
For production environments, make sure to:
- Use HTTPS with a valid SSL certificate
- Set
APP_ENV=productionin.env - Set
APP_DEBUG=falsein.env - Configure proper firewall rules
- Regular backups of database and assignment files

