# Install CloudFrost Dev

### Web Server

You will need to setup a web server using Nginx or Apache if you don't already have one.

{% content-ref url="setup-web-server" %}
[setup-web-server](https://docs.fluxpoint.dev/cloudfrost-dev/guides/website-guides/setup-web-server)
{% endcontent-ref %}

### Docker Compose

You can launch CloudFrost Dev website using either of these configs below.\
Choose without database if you already have a mongodb database container.

<details>

<summary>Website with Database (Recommended)</summary>

```yaml
services:
  cloudfrost-dev:
    container_name: "cloudfrost-dev"
    image: ghcr.io/fluxpointdev/cloudfrost-dev/website:latest
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - LogMode=Error
      - LimitMode=false
    volumes:
      - cloudfrost-dev_data:/Data:rw
    networks:
      - cloudfrost-dev_network
    ports:
      - "127.0.0.1:5556:8080"
    depends_on:
      - cloudfrost-mongodb
    working_dir: /app
    restart: on-failure:3
    healthcheck:
      test: curl -s --fail-with-body http://localhost:8080/api/health || exit 1
      interval: 60s
      timeout: 30s
      retries: 2
      start_period: 15s
  cloudfrost-mongodb:
    container_name: "cloudfrost-mongodb"
    image: mongo:8-noble
    command: --port 5557
    volumes:
      - cloudfrost-mongodb_data:/data/db
    networks:
      - cloudfrost-dev_network
networks:
  cloudfrost-dev_network:
    name: cloudfrost-dev_network
    driver: bridge
volumes:
  cloudfrost-dev_data:
    name: cloudfrost-dev_data
  cloudfrost-mongodb_data:
    name: cloudfrost-mongodb_data
```

</details>

<details>

<summary>Website without Database</summary>

Use this if you already have mongodb running in a container.

```yaml
services:
  cloudfrost-dev:
    container_name: "cloudfrost-dev"
    image: ghcr.io/fluxpointdev/cloudfrost-dev/website:latest
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - LogMode=Error
      - LimitMode=false
    volumes:
      - cloudfrost-dev_data:/Data:rw
    networks:
      - cloudfrost-dev_network
    ports:
      - "127.0.0.1:5556:8080"
    working_dir: /app
    restart: on-failure:3
    healthcheck:
      test: curl -s --fail-with-body http://localhost:8080/api/health || exit 1
      interval: 60s
      timeout: 30s
      retries: 2
      start_period: 15s
networks:
  cloudfrost-dev_network:
    name: cloudfrost-dev_network
    driver: bridge
volumes:
  cloudfrost-dev_data:
    name: cloudfrost-dev_data
```

</details>

### Install CloudFrost Dev Website

1. Setup a web server using Nginx or Apache.
2. <mark style="color:green;">Download</mark> or use the nginx/apache config from that page.
3. Edit the config file with your domain `server_name dev.example.com` and your ssl certificate `ssl_certificate` and `ssl_certificate_key`\ <mark style="color:blue;">If you use Cloudflare you can use the Origin certificate for this.</mark>
4. Go to `/etc/nginx` folder and <mark style="color:yellow;">upload</mark> the `cloudfrost.conf` config file to your `sites-enabled` folder.\ <mark style="color:blue;">/etc/apache2 if you use Apache</mark>
5. Reload nginx using `sudo service nginx reload`
6. Open a terminal for the server.
7. Create a folder for the compose config `mkdir cloudfrost_dev`
8. Navigate to the folder using `cd cloudfrost_dev`
9. <mark style="color:yellow;">Upload</mark> the docker compose file to your server in the `cloudfrost_dev folder` \
   and the file as `docker-compose.yml`
10. Run `docker compose up -d` to start the website.
11. You should see `Container cloudfrost-dev Started` this confirms that it's working.
12. Open up your browser and visit your `dev.example.com` domain.

### Update CloudFrost Dev Website

You can easily update the website with a small package which will show up in the info menu if available.

<figure><img src="https://476319768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTk02nT1MG8myAiyOi9h9%2Fuploads%2FLJRkzxgMIofXutejY2GJ%2Fimage.png?alt=media&#x26;token=704edc8d-7e70-4115-9315-03aed632f4c8" alt="" width="300"><figcaption></figcaption></figure>

1. Open up a terminal and navigate to the folder that has docker-compose.yml `using cd cloudfrost_dev`
2. Run docker `compose down` to stop the website.
3. Run docker `compose pull` to get the latest version.
4. Run docker `compose up -d` to start the website again.

### Admin Setup

You will need to setup your instance of CloudFrost Dev with certain information and also create an administrator account for your instance.

{% hint style="info" %}
You will need to contact builderb on Discord to get access to a Fluxpoint Managed email key or you can setup your own email service to send from, some third party services may have limits.
{% endhint %}

<figure><img src="https://476319768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTk02nT1MG8myAiyOi9h9%2Fuploads%2Famo3D0oCVFw9yIN8SQcF%2Fimage.png?alt=media&#x26;token=a4af04b0-6e04-4738-8fb1-d4e4bc138a0a" alt="" width="563"><figcaption></figcaption></figure>
