From c30b6adb8e90f3fb8a393189ed7dd5256235fc18 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 23 Jul 2023 23:42:36 +0800 Subject: [PATCH] docs: add install guide --- docs/install.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/install.md diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..47a9a49 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,39 @@ +# Self-hosting Slash with Docker + +Slash is designed for self-hosting through Docker. No Docker expertise is required to launch your own instance. Just basic understanding of command line and networking. + +## Requirements + +The only requirement is a server with Docker installed. + +## Docker Run + +To deploy Slash using docker run, just one command is needed: + +```bash +docker run -d --name slash --publish 5231:5231 --volume ~/.slash/:/var/opt/slash stevenlgtm/slash:latest +``` + +This will start Slash in the background and expose it on port `5231`. Data is stored in `~/.slash/`. You can customize the port and data directory. + +## Upgrade + +To upgrade Slash to latest version, stop and remove the old container first: + +```bash +docker stop slash && docker rm slash +``` + +It's recommended but optional to backup database: + +```bash +cp -r ~/.slash/slash_prod.db ~/.slash/slash_prod.db.bak +``` + +Then pull the latest image: + +```bash +docker pull stevenlgtm/slash:latest +``` + +Finally, restart Slash by following the steps in [Docker Run](#docker-run).