> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aikeedo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Initial Setup

> Configure cron jobs, set your site domain, and enable SSL for your Aikeedo installation to ensure proper functionality and security.

After successfully installing Aikeedo, complete these crucial technical setup steps to ensure your application runs smoothly and securely.

## Setting Up the Cron Job

A cron job is essential for automating recurring tasks in Aikeedo, particularly for renewing subscription usages.

### Frequency and Interval

* **Renewal Period:** Subscription usages are renewed every 30 days.
* **Recommended Interval:** The cron task should run once per minute for optimal performance.

<Note>
  Some servers may limit cron tasks to a minimum interval of 15 minutes. In such cases, subscriptions will still renew, but there might be a slight delay of up to 15 minutes.
</Note>

### Configuring the Cron Task

It is important that the cron job runs as the same user that your web server uses to serve your Aikeedo application. On many Linux systems, this user is typically `www-data` (for servers running Apache or Nginx), but it may differ depending on your server setup (for example, `apache`, `nginx`, or another user). Running the cron job as the correct user ensures that file permissions and environment variables are consistent with your web server, preventing potential permission issues.

#### How to Set Up the Cron Job for the Web Server User

1. **Determine the Web Server User:**
   * On most systems, the user is `www-data`.
   * You can check the running user with:
     ```shell theme={null}
     ps aux | egrep '(apache|nginx|httpd)'
     ```
   * Look for the user column in the output.

2. **Edit the Crontab for the Web Server User:**\
   Use the following command, replacing `www-data` with your web server user if different:
   ```shell theme={null}
   sudo crontab -u www-data -e
   ```
   This opens the crontab editor for the specified user.

3. **Add the Cron Entry:**\
   Add the following line to the crontab:
   ```shell theme={null}
   * * * * * /usr/bin/php /path/to/app/root/cron.php
   ```
   Replace `/path/to/app/root/` with the actual path to your Aikeedo application's root directory.

<Note>
  If your server uses a different user for the web server (such as `apache` or `nginx`), substitute `www-data` with the appropriate username in the `sudo crontab -u USERNAME -e` command.
</Note>

#### Important: File Permissions and Cache Issues

While it is technically possible to run the cron job as `root` or another user, this is **not recommended**. If the cron job runs as a different user than your web server (for example, as `root`), the application may create new files in the app cache with incorrect ownership. This can cause issues when you try to clear the cache from the Aikeedo admin panel (Status page).

* **How to Detect the Issue:**\
  When you clear the cache from the Status page, you should see a success message in the toast notification. If you do **not** see a success message, it likely means the app is unable to clear the cache due to file permission issues.

* **How to Fix:**\
  To resolve this, reset the ownership of your app files to the web server user (e.g., `www-data`) by running:

  ```shell theme={null}
  sudo chown -R www-data:www-data /path/to/app/root
  ```

  Replace `/path/to/app/root` with the actual path to your Aikeedo application's root directory.

  After fixing the permissions, ensure the cron job is running as the correct user to prevent this issue from recurring.

<Warning>
  Always run the cron job as the same user that your web server uses (typically `www-data`, `apache`, or `nginx`). This ensures proper file permissions and smooth operation of your Aikeedo installation.
</Warning>

### Troubleshooting Cron Issues

If you encounter problems with subscription renewals:

1. Verify the cron task configuration is correct
2. Check your server logs for error messages related to the cron job
3. Ensure the PHP path (`/usr/bin/php`) is correct for your server
4. Verify file permissions are correct for the web server user

Consult with your server administrator for server-specific issues. For additional help, see the [Troubleshooting & FAQ](/setup/troubleshooting) page.

## Configuring Your Site Domain

Properly setting your site domain is crucial for system functionality.

### Steps to Set Your Site Domain

1. **Access the Admin Panel:** Log in to your Aikeedo admin dashboard.
2. **Navigate to Settings:** Click on **Settings** in the sidebar, then select **General**.
3. **Locate the "Site Domain" Field:** You'll find this in the Website section.
4. **Enter Your Domain:** Input your domain name without the protocol (http\:// or https\://) and without any paths.

<Frame>
  <img src="https://cdn.aikeedo.com/site-domain.png" alt="Site Domain Configuration" />
</Frame>

<Note>
  Include only the domain, subdomain (if any), and port number (if non-standard). Do not include protocols or paths. Omit the port number if it's 80 (HTTP) or 443 (HTTPS).
</Note>

### SSL Configuration

Enabling SSL is highly recommended for security and is required for certain features.

1. Find the "Is SSL Enabled?" toggle in the General Settings.
2. If you have an SSL certificate installed on your server, switch this to "Yes."

<Warning>
  Only enable SSL if you have properly installed an SSL certificate on your server. SSL is required for features like secure payment gateways.
</Warning>

<Tip>
  If you haven't set up SSL yet, consider using a service like Let's Encrypt for a free SSL certificate. Many hosting providers also offer one-click SSL setup.
</Tip>

## Completing the "Getting Started" Section

After configuring your cron job and site domain, you'll want to complete the "Getting Started" section in your admin dashboard.

<Note>
  Completing the "Getting Started" section is crucial for ensuring all aspects of your Aikeedo installation are properly configured. Don't skip this step!
</Note>

## Next Steps

After completing these initial setup steps, proceed to configure your application:

<Card title="Application Configuration" icon="gear" href="/setup/configuration">
  Complete guide to configuring all your Aikeedo settings
</Card>

Or jump directly to specific configuration areas:

* [Email Settings](/email/mailer) - Configure email delivery
* [Billing Setup](/billing/overview) - Set up subscriptions and pricing
* [Integrations](/integrations/openai) - Connect AI providers and services
* [Branding](/website-basics/branding) - Customize your platform's appearance

## Need Help?

If you need assistance with Aikeedo:

<CardGroup cols={2}>
  <Card title="Professional Support" icon="headset" href="https://aikeedo.com/support/">
    Get expert help from our team with a paid support subscription
  </Card>

  <Card title="Troubleshooting Guide" icon="wrench" href="/setup/troubleshooting">
    Check common issues and solutions
  </Card>
</CardGroup>
