2023-08-14 00:58:41 +09:00
# Installing Iceshrimp with Docker
2023-08-16 05:35:22 +09:00
This guide is based on `docker compose` /Docker Compose v2, but `docker-compose` /Docker Compose v1 should work as well. Docker 20.10+ is required for building your own images because of BuildKit usage, and Docker 20.10 users need to [enable BuildKit first ](https://docs.docker.com/build/buildkit/#getting-started ), or [upgrade to latest Docker ](https://docs.docker.com/engine/install/#server ).
2023-08-14 00:58:41 +09:00
## Preparations
### Getting needed files
2023-11-08 23:59:52 +09:00
If you want to use the prebuilt images:
```sh
GIT_LFS_SKIP_SMUDGE=1 git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git --depth=1
```
If you want to build your own images (make sure to install `git-lfs` before running the command):
```sh
git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git --depth=1
```
2023-08-14 00:58:41 +09:00
### docker-compose.yml
2023-09-07 01:23:41 +09:00
First, run `cp docs/examples/docker-compose.yml docker-compose.yml` , and edit `docker-compose.yml` if
2023-08-14 00:58:41 +09:00
- you want to build the image yourself or choose a [different tag ](https://iceshrimp.dev/iceshrimp/-/packages/container/iceshrimp/versions ), and/or
2023-11-05 23:00:19 +09:00
- you want a search engine for better search performance.
2023-08-14 00:58:41 +09:00
### .config
Run `cp .config/docker_example.env .config/docker.env` , and edit `.config/docker.env` and fill it with the database credentials you want.
Run `cp .config/example-docker.yml .config/default.yml` , and edit `.config/default.yml`
- Replace example database credentials with the ones you entered in `.config/docker.env`
- Change other configuration
2023-11-05 23:00:19 +09:00
- Optionally, set up the search backend, if you have chosen to set one up.
2023-08-14 00:58:41 +09:00
## Installation and first start
Choose a method, whether you chose to build the image yourself or not.
Note: Ctrl-C will shut down Iceshrimp gracefully.
### Pulling the image
```sh
docker compose pull
docker compose up
```
### Building the image
Depending on your machine specs, this can take well over 30 minutes
2023-08-16 05:35:22 +09:00
2023-08-14 00:58:41 +09:00
```sh
docker compose build
docker compose up
```
## Starting Iceshrimp automatically
Run `docker compose up -d` and Iceshrimp will start automatically on boot.
## Updating Iceshrimp
### Pulling the image
```sh
docker compose pull
docker compose down
docker compose up -d
```
### Building the image
```sh
## Run git stash commands only if you have uncommitted changes
git stash
git pull
git stash pop
docker compose build
docker compose down
docker compose up -d
```
## Post-install
See [post-install ](post-install.md ).