Cloud deployment
You can deploy Neverkin to a cloud provider of your choice. Some common providers are:
- DigitalOcean
- That’s the one Neverkin is running on!
- AWS
- Google Cloud
- Azure
- Cloudflare
The pricing will differ depending on the provider, but for a small 24/7 cluster you can expect to pay around $10/month.
For full functionality, you will need the following:
- A virtual machine (called a droplet, an EC2 instance, etc.) with support for Docker Swarm and Node.js.
- Two managed storage volumes:
- A larger one (5+ GB) holds the main database
- The smallest one you can provision holds the secrets and SSL certificates
- (Optional) A domain name
- Depending on your cloud provider, you may get a working link without a domain name
- (Optional) An S3 bucket for asset and backup storage
Volumes
Section titled “Volumes”- Create and mount the following volumes onto the manager-1 node:
/mnt/volume_rhea_postgres/mnt/volume_secrets- Mount them under different names and create symlinks to those locations
- Set up a new Spaces bucket through the UI and grab a new access token.
- Set up the CORS policy in the UI.
- Install AWS CLI on the manager-1 node:
apt install awscli
- Set up credentials:
aws configure:
AWS Access Key ID [None]: [...]AWS Secret Access Key [None]: [...]Default region name [None]: fra1Default output format [None]: jsonSecrets
Section titled “Secrets”Specify the environment secret
- All deployments are considered to be “production”
echo "production" | docker secret create environment -
Generate a JWT auth key, place it into
/mnt/volume_secrets/keys/jwt-secret.txt- Just the key without formatting or anything
Register the key as a secret
docker secret create jwt-secret /mnt/volume_secrets/keys/jwt-secret.txt
Configure S3 storage using the access key from the previous step
echo "BUCKET_ID" | docker secret create s3-bucket-id -echo "https://fra1.digitaloceanspaces.com" | docker secret create s3-endpoint -echo "..." | docker secret create s3-access-key-id -echo "..." | docker secret create s3-access-key-secret -
(Optional) Create a contact form webhook url secret
echo "your-webhook" | docker secret create webhook-contact-form-url -
(Optional) Create a Gemini image generation API key secret
echo "your-api-key" | docker secret create imagen-google-api-key -
Set up the app
Section titled “Set up the app”- Clone the Neverkin repository
cd ~git clone git@github.com:Tenebrie/neverkin.gitcd neverkin
- Switch to desired branch
git checkout dev- The deployed app version is not dependent on the selected branch, but the migrations are pulled from Git. Attempting to deploy a version with mismatched migrations will probably break things.
- Init Swarm cluster
docker swarm init
- Deploy the app
VERSION=v1.2.3 ./scripts/stack-update.sh
- Run migrations
./scripts/stack-migrate.sh
- Create Chronos storage folders
mkdir -p /mnt/volume_rhea_postgres/backrest/{data,config,cache}
Log in to the app
Section titled “Log in to the app”- Open the app in your browser
- Log in as administrator
- Username:
admin@localhost - Password:
q
- Username:
- I recommend changing the default password or deleting the default user after giving your own user account admin privileges through the Admin section.