Since one of the main benefits of running a full node is privacy during transaction & address lookup, an Electrum server is needed. Otherwise you'd have to query using Bitcoin Core all the time and can't just use your mobile and desktop applications for that.
[1] Install dependencies; make sure you're logged into admin and not bitcoin.
sudo apt install clang cargo rustc tor
[2] Download and build electrs as bitcoin. This can take roughly half an hour (compared to ~10 minutes on a $50 'old laptop' node).
sudo service miner stop
su - bitcoin
git clone https://github.com/romanz/electrs
cd electrs
cargo build --locked --release --no-default-features
mkdir /media/nvme/database
ln -s /media/nvme/database database
[3] Create electrs config file
nano electrs.toml
[4] Enter the following:
cookie_file = "/media/nvme/Bitcoin/.cookie"
# The listening RPC address of bitcoind, port is usually 8332
daemon_rpc_addr = "127.0.0.1:8332"
# The listening P2P address of bitcoind, port is usually 8333
daemon_p2p_addr = "127.0.0.1:8333"
# Directory where the index should be stored. It should have at least 70GB of free space.
db_dir = "/home/bitcoin/electrs/database"
# bitcoin means mainnet. Don't set to anything else unless you're a developer.
network = "bitcoin"
# How much information about internal workings should electrs print. Increase before reporting a bug.
log_filters = "INFO"
[5] Log back out into your sudo account, and open the Tor config file.
exit
sudo nano /etc/tor/torrc
[6] Add the following contents, preferably in the right section (somewhere where there's HiddenServiceDir stuff commented out).
HiddenServiceDir /var/lib/tor/electrs_hidden_service/
HiddenServiceVersion 3
HiddenServicePort 50001 127.0.0.1:50001
ExitPolicy reject *:* # no exits allowed
[7] Start up Tor and fetch your electrs Tor hostname. The hostname can then be entered in wallets like Wasabi and BlueWallet settings.
sudo systemctl enable tor.service
sudo service tor restart
sudo cat /var/lib/tor/electrs_hidden_service/hostname
[8] Create a service so electrs starts on startup
sudo nano /usr/lib/systemd/system/electrs.service
[9] Enter this information
[Unit]
Description=Electrs
After=bitcoind.service
[Service]
WorkingDirectory=/home/bitcoin/electrs
ExecStart=/home/bitcoin/electrs/target/release/electrs
User=bitcoin
Group=bitcoin
Type=simple
KillMode=process
TimeoutSec=60
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
[10] Start the service
sudo systemctl enable electrs.service
sudo service electrs start
[11] Check that it's running. This should return the electrs version.
echo '{"jsonrpc": "2.0", "method": "server.version", "params": ["", "1.4"], "id": 0}' | netcat 127.0.0.1 50001