# Set a server resource pack

> Offer players a resource pack when they join your Minecraft Java server, and make it required if you want.

Source: https://docs.coritan.com/managed-containers/software/resource-pack/

In the dashboard:

- /dashboard/servers/…/software: https://www.coritan.com/dashboard/servers

A *server resource pack* changes how the game looks and sounds for everyone on your server. The pack does not go onto the server. The server gives each player a link when they join, and their game downloads the pack from that link. The **Resource pack** panel on a server's **Software** tab writes that link, and the settings that go with it, into the server's `server.properties`.

## Before you begin

- Put the pack's `.zip` file where players can download it, such as your own website. A pack published on Modrinth already has a download link. The link must download the file itself: a page that shows the file, as many file-sharing sites do, does not work.
- The panel is there for Minecraft Java servers. A proxy passes players on to other servers, so set the pack on those servers instead. A Bedrock server keeps its packs in its own folders: see [Manage Bedrock packs](/managed-containers/software/bedrock-packs/).
- On a server someone shared with you, the Install software permission lets you set the pack. Removing it needs `software.delete`, which the dashboard's permission list does not offer, so the owner can grant it only [through the API](/managed-containers/users/#with-the-api).

## Set the pack

1. In the [dashboard](https://www.coritan.com/dashboard/servers), go to **Container Apps** and open the server, then the **Software** tab.
2. Select **Resource pack**.
3. In **Pack URL**, paste the link to the pack's `.zip` file, such as `https://example.com/pack.zip`. It must start with `http://` or `https://`.
4. Optionally, fill in **SHA-1** with the pack file's SHA-1 checksum, 40 characters from `0` to `9` and `a` to `f`. With it, a player's game skips the download when it already has this pack, and checks the file it downloads.
5. Optionally, type a message in **Prompt**. Players see it when the game asks them to accept the pack.
6. To turn away players who decline the pack, tick **Required**.
7. Select **Save resource pack**.
8. Restart the server from the [console](/managed-containers/console/), so it reads the new settings.

To get the SHA-1 of the file on your computer, run `sha1sum pack.zip` on Linux, `shasum -a 1 pack.zip` on macOS or `certutil -hashfile pack.zip SHA1` on Windows. Every time you change the pack, its SHA-1 changes too, so update it here.

> [!NOTE]
> Players already online keep the pack they have. They get the new one the next time they join.

## Change or remove the pack

To change the pack, edit the fields and select **Save resource pack** again, then restart the server.

To stop offering a pack:

1. On the **Resource pack** panel, select **Remove pack…**.
2. Select **Remove resource pack**.

We clear the pack's settings in `server.properties` and delete nothing else. Restart the server to stop offering the pack.

## What we write

The panel writes these keys in `server.properties`:

| Key | Value |
| --- | --- |
| `resource-pack` | The pack's link. |
| `resource-pack-sha1` | The SHA-1, or empty. |
| `require-resource-pack` | `true` when you ticked **Required**, otherwise `false`. |
| `resource-pack-prompt` | Your prompt, written as a Minecraft text component such as `{"text": "This server uses a custom pack"}`. |
| `resource-pack-id` | An id we make from the link. It stays the same while the link does, so games that have the pack do not download it again. |

You can edit these keys yourself in the [Files tab](/managed-containers/files/), and the panel reads them back.

## Result

A message says `Resource pack set. Players get it on their next join. A running server must restart to reread server.properties.` The badge on the **Server resource pack** card changes to **Set**. After a restart, players who join see the game's prompt to download the pack.

After a removal, the message says `Resource pack removed.` and the badge shows **Not set**.

## Troubleshooting

**No server resource pack here**
: The server's software cannot offer a pack this way. The panel gives the reason, such as `A proxy has no world; set the resource pack on the backend servers.`

`Could not read server.properties.`
: We could not read the server's files. Check that the server is installed and not suspended, then open the panel again.

`There is no server.properties yet. We create it, with the pack, the first time you save.`
: The server has not started yet. Save the pack, and the game adds its other settings to the file when it first starts.

`Players download the pack from their own computers, so the URL has to be public`
: The link points at a private address, such as `localhost` or an address on your home network. Host the pack somewhere players can reach over the internet.

`The SHA-1 must be 40 hexadecimal characters`
: Copy the full checksum, or leave **SHA-1** empty.

Players see missing or wrong textures
: The pack was made for another Minecraft version. Use a build of the pack made for your server's version.

Players download the pack every time they join
: Add the pack's **SHA-1**.

Players get an error when the game downloads the pack
: The link does not lead straight to the `.zip` file, or the **SHA-1** does not match the file. Open the link in a browser: it should download the file. Then check the checksum again.

The old prompt stays after you clear **Prompt**
: When the field is empty, the dashboard leaves the prompt already in `server.properties`. Select **Remove pack…**, then set the pack again without a prompt. Or send `"prompt": ""` through the API.

`This server has no server.properties yet; start it once first`
: There is no pack to remove. Nothing needs doing.

`Too many requests for this action. Please wait and try again.`
: A server accepts 8 software actions from one account in 10 minutes, and saving a pack counts. The response says how many seconds to wait.

## Related

- [Install plugins, mods and modpacks](/managed-containers/software/plugins-and-mods/)
- [Manage server files](/managed-containers/files/)
- [Use the console and power controls](/managed-containers/console/)

## With the API

`GET /api/v1/client/servers/{uuid}/software/resource-pack` returns the pack as `server.properties` declares it: `configured`, `url`, `sha1`, `required`, `prompt` (as plain text), `pack_id` and `host`. `supported` is `false` on software that cannot offer a pack, with the reason in `unsupported_reason`, and `properties_present` says whether `server.properties` exists.

Set a pack from a link:

```bash
curl -X PUT https://api.coritan.com/api/v1/client/servers/$SERVER/software/resource-pack \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/pack.zip", "sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", "required": true, "prompt": "This server uses a custom pack"}'
```

Or name a resource pack from the [Marketplace](/managed-containers/software/plugins-and-mods/#with-the-api) instead of a link: send `source_uuid`, `identifier` and optionally `version`, a `version_id`. We fill in the link and the SHA-1 that the source publishes. The default, `latest`, takes the newest build made for your server's Minecraft version, and a build made for another version is refused.

| Field | What it does |
| --- | --- |
| `url` | The pack's link, `http://` or `https://`, up to 2048 characters. Required unless you send `source_uuid` and `identifier`. |
| `sha1` | The file's SHA-1. Leave it out to clear it. |
| `required` | `true` turns away players who decline. Leave it out to keep the current setting. |
| `prompt` | The message players see, up to 1000 characters. Plain text, or a Minecraft text component in JSON. Leave it out to keep the current prompt, or send `""` to clear it. |
| `source_uuid`, `identifier`, `version` | A marketplace resource pack to use instead of `url`. |

The response is the new state with `restart_required` set to `true` and a `warnings` list, which says so when no SHA-1 was set. For a marketplace pack, `pick` gives the `url`, `sha1`, `filename`, `size_bytes` and `version` we used.

`DELETE` the same path to stop offering the pack. It answers with the cleared state and `restart_required`.

A request we refuse answers `400` with the reason, such as `Provide a url, or a source_uuid and identifier of a marketplace resource pack`, `The resource pack URL must start with http:// or https://`, `That URL is too long for server.properties`, `The prompt is too long` or `No version of this pack is published for Minecraft 1.21.4.`

Reading needs `software.read`, setting needs `software.install` and removing needs `software.delete`.

## API

- `GET /api/v1/client/servers/{uuid}/software/resource-pack`: The server resource pack as server.properties declares it (https://docs.coritan.com/api/reference/client/container-apps/servers-software/#op-get-api-v1-client-servers-uuid-software-resource-pack)
- `PUT /api/v1/client/servers/{uuid}/software/resource-pack`: Point players at a pack, from a URL or a marketplace resource pack version (https://docs.coritan.com/api/reference/client/container-apps/servers-software/#op-put-api-v1-client-servers-uuid-software-resource-pack)
- `DELETE /api/v1/client/servers/{uuid}/software/resource-pack`: Stop offering a server resource pack (https://docs.coritan.com/api/reference/client/container-apps/servers-software/#op-delete-api-v1-client-servers-uuid-software-resource-pack)
