# Iceshrimp.NET Installation ## Introduction: There is a much longer and more detailed version of these instructions at: [http://?/installing-iceshrimp-net/] Consider this the 'abridged' version. ### Update everything sudo apt update && sudo apt upgrade ### Install PostgreSQL if needed sudo apt install postgresql ### Install the .net SDK wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh chmod +x ./dotnet-install.sh ./dotnet-install.sh --version latest ### Add the .net variables nano $HOME/.bashrc #### Add at the bottom: export DOTNET_ROOT=$HOME/.dotnet export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools ### Optional: Install the Web Assembly tools dotnet workload install wasm-tools ### Clone Iceshrimp.NET from git git clone https://iceshrimp.dev/iceshrimp/iceshrimp.net cd iceshrimp.net/Iceshrimp.Backend ### Build the project in release configuration dotnet build -c Release ### Optional: Build with wasm-tools dotnet build -c Release -p:EnableAOT=true ### Create a Iceshrimp.Storage directory mkdir /home/foo/iceshrimp.net/Iceshrimp.Storage/ ### Configure nano iceshrimp.net/Iceshrimp.Backend/configuration.ini #### Change: WebDomain = shrimp.example.org AccountDomain = example.org Database = iceshrimp Username = iceshrimp Password = iceshrimp Path = /path/to/media/location ### Set up certbot sudo certbot certonly ### Set up nginx [Example iceshrimp.nginx.conf](https://iceshrimp.dev/iceshrimp/iceshrimp/src/branch/dev/docs/examples/iceshrimp.nginx.conf) #### Change: server_name example.com; ssl_certificate ssl_certificate_key ### Create the symlink: sudo ln -s /etc/nginx/sites-available/iceshrimp.nginx.conf /etc/nginx/sites-enabled/ ### Check and Reload: sudo nginx -t && sudo systemctl reload nginx ### Create an Iceshrimp PostgreSQL user (if needed): CREATE USER "iceshrimp" WITH ENCRYPTED PASSWORD 'super-long-password'; ### To create a new Iceshrimp.NET database: CREATE DATABASE "iceshrimp" WITH ENCODING = 'UTF8'; ALTER DATABASE "iceshrimp" OWNER TO "iceshrimp"; ### To migrate an existing Iceshrimp database: sudo systemctl stop iceshrimp.service sudo -u postgres psql \c iceshrimp **NOTE: Extremely Important !** SET role iceshrimp; Apply the [migrations](https://kb.iceshrimp.dev/s/docs/doc/migration-guide-XRdCqvbu31): ### Perform a 'VACUUM FULL ANALYZE' on the migrated database SET ROLE postgres; VACUUM FULL ANALYZE; ### Running Iceshrimp.NET using systemd: [Example iceshrimp.net.service] sudo nano /etc/systemd/system/iceshrimp.net.service sudo systemctl daemon-reload sudo systemctl start iceshrimp.net.service