Update INSTALL.md for FoundKey

This commit is contained in:
Norm 2022-07-29 02:09:26 -04:00
parent e28606e859
commit 2261958670
Signed by: norm
GPG key ID: 7123E30E441E80DE

View file

@ -1,23 +1,23 @@
Misskey Setup and Installation Guide
FoundKey Setup and Installation Guide
================================================================
We thank you for your interest in setting up your Misskey server!
This guide describes how to install and setup Misskey.
We thank you for your interest in setting up your FoundKey server!
This guide describes how to install and setup FoundKey.
----------------------------------------------------------------
*1.* Create Misskey user
*1.* Create FoundKey user
----------------------------------------------------------------
Running misskey as root is not a good idea so we create a user for that.
Running FoundKey as root is not a good idea. Create a separate user to run FoundKey.
In debian for exemple :
```sh
adduser --disabled-password --disabled-login misskey
adduser --disabled-password --disabled-login foundkey
```
*2.* Install dependencies
----------------------------------------------------------------
Please install and setup these softwares:
FoundKey requires the following packages to run:
#### Dependencies :package:
* **[Node.js](https://nodejs.org/en/)** (16.x)
@ -25,32 +25,28 @@ Please install and setup these softwares:
* **[Redis](https://redis.io/)**
##### Optional
* [Yarn](https://yarnpkg.com/) *Optional but recommended for security reason. If you won't install it, use `npx yarn` instead of `yarn`.*
* [Yarn](https://yarnpkg.com/) - *Optional but recommended for security reasons. If you won't install it, use `npx yarn` instead of `yarn`.*
* [FFmpeg](https://www.ffmpeg.org/)
*3.* Install Misskey
*3.* Install FoundKey
----------------------------------------------------------------
1. Connect to the `misskey` user
1. Connect to the `foundkey` user
`su - misskey`
`su - foundkey`
2. Clone the Misskey repository
2. Clone the FoundKey repository
`git clone --recursive https://github.com/misskey-dev/misskey.git`
`git clone --recursive https://akkoma.dev/FoundKeyGang/FoundKey`
3. Navigate to the repository
`cd misskey`
`cd foundkey`
4. Check out the [latest release](https://github.com/misskey-dev/misskey/releases/latest)
`git checkout master`
5. Install Misskey's dependencies
4. Install FoundKey's dependencies
`yarn install`
*4.* Configure Misskey
*4.* Configure FoundKey
----------------------------------------------------------------
1. Copy the `.config/example.yml` and rename it to `default.yml`.
@ -58,10 +54,10 @@ Please install and setup these softwares:
2. Edit `default.yml`
*5.* Build Misskey
*5.* Build FoundKey
----------------------------------------------------------------
Build misskey with the following:
Build foundkey with the following:
`NODE_ENV=production yarn build`
@ -78,14 +74,17 @@ If you're still encountering errors about some modules, use node-gyp:
1. Create the appropriate PostgreSQL users with respective passwords,
and empty database as named in the configuration file.
Make sure the database connection also works correctly when run from the
user that will later run Misskey, or it could cause problems later.
user that will later run FoundKey, or it could cause problems later.
The encoding of the database should be UTF-8.
```
```sh
sudo -u postgres psql
create database misskey with encoding = 'UTF8';
create user misskey with encrypted password '{YOUR_PASSWORD}';
grant all privileges on database misskey to misskey;
```
```sql
create database foundkey with encoding = 'UTF8';
create user foundkey with encrypted password '{YOUR_PASSWORD}';
grant all privileges on database foundkey to foundkey;
\q
```
@ -94,7 +93,7 @@ If you're still encountering errors about some modules, use node-gyp:
*7.* That is it.
----------------------------------------------------------------
Well done! Now, you have an environment that run to Misskey.
Well done! Now, you can begin using FoundKey.
### Launch normally
Just `NODE_ENV=production npm start`. GLHF!
@ -103,59 +102,58 @@ Just `NODE_ENV=production npm start`. GLHF!
1. Create a systemd service here
`/etc/systemd/system/misskey.service`
`/etc/systemd/system/foundkey.service`
2. Edit it, and paste this and save:
::: details
```
```ini
[Unit]
Description=Misskey daemon
Description=FoundKey daemon
[Service]
Type=simple
User=misskey
User=foundkey
ExecStart=/usr/bin/npm start
WorkingDirectory=/home/misskey/misskey
WorkingDirectory=/home/foundkey/foundkey
Environment="NODE_ENV=production"
TimeoutSec=60
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=misskey
SyslogIdentifier=foundkey
Restart=always
[Install]
WantedBy=multi-user.target
```
:::
3. Reload systemd and enable the misskey service.
3. Reload systemd and enable the foundkey service.
`systemctl daemon-reload ; systemctl enable misskey`
`systemctl daemon-reload ; systemctl enable foundkey`
4. Start the misskey service.
4. Start the foundkey service.
`systemctl start misskey`
`systemctl start foundkey`
You can check if the service is running with `systemctl status misskey`.
You can check if the service is running with `systemctl status foundkey`.
### Launch with OpenRC
1. Copy the following text to `/etc/init.d/misskey`:
1. Copy the following text to `/etc/init.d/foundkey`:
::: details
```sh
#!/sbin/openrc-run
name=misskey
description="Misskey daemon"
name=foundkey
description="FoundKey daemon"
command="/usr/bin/npm"
command_args="start"
command_user="misskey"
command_user="foundkey"
supervisor="supervise-daemon"
supervise_daemon_args=" -d /home/misskey/misskey -e NODE_ENV=\"production\""
supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\""
pidfile="/run/${RC_SVCNAME}.pid"
@ -167,32 +165,30 @@ You can check if the service is running with `systemctl status misskey`.
#use logger nginx
}
```
:::
2. Set the service to start on boot
`rc-update add misskey`
`rc-update add foundkey`
3. Start the Misskey service
3. Start the FoundKey service
`rc-service misskey start`
`rc-service foundkey start`
You can check if the service is running with `rc-service misskey status`.
You can check if the service is running with `rc-service foundkey status`.
### How to update your Misskey server to the latest version
1. `git checkout master`
2. `git pull`
3. `git submodule update --init`
4. `yarn install`
5. `NODE_ENV=production yarn build`
6. `yarn migrate`
7. Restart your Misskey process to apply changes
8. Enjoy
### How to update your FoundKey server to the latest version
1. `git pull`
2. `git submodule update --init`
3. `yarn install`
4. `NODE_ENV=production yarn build`
5. `yarn migrate`
6. Restart your FoundKey process to apply changes
7. Enjoy
If you encounter any problems with updating, please try the following:
1. `yarn clean` or `yarn cleanall`
2. Retry update (Don't forget `yarn install`
2. Retry update (Don't forget `yarn install`)
----------------------------------------------------------------
If you have any questions or troubles, feel free to contact us!
If you have any questions or troubles, feel free to contact us on [IRC](ircs://irc.akkoma.dev:6697/#foundkey) (`#foundkey` on `irc.akkoma.dev`, port `6697` with SSL)!