Skip to content
This repository was archived by the owner on Mar 8, 2026. It is now read-only.

Commit 9127efc

Browse files
committed
read
1 parent 724b0b3 commit 9127efc

File tree

1 file changed

+51
-18
lines changed

1 file changed

+51
-18
lines changed

README.md

Lines changed: 51 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@ Set `EXTERNAL_URL` in your `.env` if you are self-hosting under a different doma
3434

3535
# Installation
3636

37-
## Docker (Untested 23/02/2026)
37+
Choose one setup path below.
38+
39+
## Option 1: Docker Compose
40+
41+
Uses the provided `docker-compose.yml` with Redis and persistent volumes.
3842

3943
```sh
40-
docker network create crafatar
41-
docker run --net crafatar -d --name redis redis
42-
docker run --net crafatar -v crafatar-images:/home/app/crafatar/images -e REDIS_URL=redis://redis -p 3000:3000 docker.io/repgraphics/crafatar:latest
44+
cp .env.example .env
45+
docker compose up -d
4346
```
4447

48+
Then open `http://localhost:3000`.
49+
4550
### Windows (Docker Desktop)
4651

4752
- Use Docker Desktop with **Linux containers** enabled (WSL2 backend recommended).
@@ -54,9 +59,44 @@ Copy-Item .env.example .env
5459
docker compose up -d
5560
```
5661

57-
Then open `http://localhost:3000`.
62+
## Option 2: Docker (single commands)
63+
64+
```sh
65+
docker network create crafatar
66+
docker run --net crafatar -d --name redis redis:7-alpine
67+
docker run --net crafatar -v crafatar-images:/home/app/crafatar/images -e REDIS_URL=redis://redis:6379 -e CACHE_BACKEND=redis -p 3000:3000 docker.io/repgraphics/crafatar:latest
68+
```
69+
70+
If you do not want Redis, use memory cache:
5871

59-
By default, Docker builds now skip tests for faster production builds. To run tests during build:
72+
```sh
73+
docker run -v crafatar-images:/home/app/crafatar/images -e CACHE_BACKEND=memory -p 3000:3000 docker.io/repgraphics/crafatar:latest
74+
```
75+
76+
## Option 3: Source (Node.js)
77+
78+
- Install [nodejs](https://nodejs.org/) 24 (LTS).
79+
- Install `redis-server` (optional if using `CACHE_BACKEND=memory`).
80+
- Run `npm ci`.
81+
If that fails, it is usually due to `node-canvas` dependencies. Follow [this guide](https://github.com/Automattic/node-canvas/wiki#installation-guides).
82+
- Copy `.env.example` to `.env` and adjust values.
83+
- Run `npm start`.
84+
85+
Crafatar is now available at http://0.0.0.0:3000.
86+
87+
## Option 4: Pterodactyl Egg
88+
89+
- Import [`pterodactyl egg/egg-crafatar.json`](pterodactyl%20egg/egg-crafatar.json) into your panel.
90+
- In the egg Docker Images field use either:
91+
- `docker.io/repgraphics/crafatar:latest`
92+
- `Docker Hub Crafatar|docker.io/repgraphics/crafatar:latest`
93+
- Configure the install variables:
94+
- `SOURCE_REPO` (default `EuphoriaTheme/crafatar`)
95+
- `SOURCE_REF` (default `master`, can also be a tag like `v2.3.2`)
96+
- Reinstall the server after importing/updating the egg so install scripts run and source files are placed in `/home/container`.
97+
- Set `REDIS_URL` to an external Redis endpoint if using `CACHE_BACKEND=redis`.
98+
99+
By default, Docker builds skip tests for faster production builds. To run tests during build:
60100

61101
```sh
62102
docker build --build-arg RUN_TESTS=true -t crafatar .
@@ -85,17 +125,6 @@ Run full integration tests manually from GitHub Actions (workflow_dispatch) or l
85125
npm run test:integration
86126
```
87127

88-
## Manual
89-
90-
- Install [nodejs](https://nodejs.org/) 24 (LTS)
91-
- Install `redis-server`
92-
- Run `npm install`
93-
If that fails, it's likely because because of `node-canvas` dependencies. Follow [this guide](https://github.com/Automattic/node-canvas/wiki#installation-guides) to install them.
94-
- Copy `.env.example` to `.env` and adjust values if needed
95-
- Run `npm start`
96-
97-
Crafatar is now available at http://0.0.0.0:3000.
98-
99128
## Configuration / Environment variables
100129

101130
Configuration is loaded from `.env` automatically (via `dotenv`) and falls back to defaults from `config.js`.
@@ -129,6 +158,8 @@ cp .env.example .env
129158
- `DEBUG`: when `true`, enables debug behavior and extra error details.
130159
- `LOG_TIME`: whether log timestamps are enabled.
131160
- `SESSIONS_RATE_LIMIT`: outgoing Mojang session requests allowed per second; empty disables this limiter.
161+
- `SOURCE_REPO`: GitHub repo path used by the Pterodactyl egg installer when bootstrapping source files (format `owner/repo`).
162+
- `SOURCE_REF`: branch or tag used by the Pterodactyl egg installer (for example `master` or `v2.3.2`).
132163
- `FACE_DIR`, `HELM_DIR`, `SKIN_DIR`, `RENDER_DIR`, `CAPE_DIR`: optional custom storage directories (must end with `/`).
133164

134165
### Cache backend notes
@@ -146,8 +177,10 @@ cp .env.example .env
146177
## Pterodactyl notes
147178

148179
- Set `BIND=0.0.0.0` when running behind panel/reverse proxies.
149-
- Use an external Redis service or separate Redis node and point `REDIS_URL` to it.
180+
- Use an external Redis service or separate Redis node and point `REDIS_URL` to it (avoid `localhost` unless Redis is in the same container).
150181
- `CLOUDFLARE=true` is appropriate when traffic is proxied through Cloudflare.
182+
- `SOURCE_REPO` and `SOURCE_REF` control which source tree the egg installer downloads to `/home/container`.
183+
- After egg import/changes, run a server reinstall so the installation script is applied.
151184

152185
## Security maintenance
153186

0 commit comments

Comments
 (0)