This article explains how to set up Raspbian OS (Variant of Debian Linux) on a Raspberry Pi, how to install Bitcoin Core, Electrum Personal Server (EPS), and Electrum Desktop Wallet, and then privately connect the Wallet to Bitcoin Core via EPS.
It would be nice if your Electrum Wallet could just get blockchain data from your own Bitcoin Core, but it can’t. It needs an Electrum Server to be the middle man. The server does not copy the Blockchain data, it is not a node — Bitcoin Core is.
Note the Electrum Personal Server (EPS) is one of several server options. Others include Electrum Server in Rust (Electrs), the no-longer-supported ElectrumX, and ElectrumX/Spesmilo which is an ElectrumX variant that is supported. There are others too, each with different trade offs. I will make guides for these later.
One thing to note about EPS is that it really is “personal” — it only connects to one Electrum Wallet at a time. So if your desktop wallet is connected, don’t spend hours tinkering with your mobile Electrum Wallet trying to figure out why it doesn’t connect (true story). You also can’t be the “Uncle Jim” of your social circle with EPS, by providing a trusted node for them to connect to. I suggest getting EPS working first, then I’ll show you how to install the more powerful servers next time, after I figure it out. I’ll go through more hours of pain and suffering, so you all won’t have to.
This is slightly more technical than running a bundled node like MyNode (link) or RaspiBlitz (link) ; these have many other applications you can run with a relatively straightforward install — but because there are more moving parts, when something goes wrong it’s harder to troubleshoot. By all means, use those easy-to-install nodes, but I would do that IN ADDITION to this. When something goes wrong and you end up needing to re-sync the blockchain on your bundled node, at least you have this simple setup up which will not let you down. The MyNode setup (and Ronin Dojo) are inside docker containers — you need to be a computer scientist to have any hope of accessing the files manually.
This article will guide you with some command line. Most important tip from here on is PAY ATTENTION TO DETAIL, a small typo can leave send you down a frustrating search for “why does this not work?” I promise, it will be easy if you follow the instructions, ask me if you get stuck. This does require you to know how to navigate around the file system in Linux. If you don’t, then watch this 11 minute video to learn some SSS (super simple stuff). Link If it’s mildly interesting, watch this one as well, it’s a bit longer Link
This is the equipment I recommend:
- Raspberry Pi 4 (any model of 4 is fine)
- Official Raspberry Pi 4 power supply (make sure it is the 5.1V version). Cheaper knock offs (typically are 5.0 V) can cause issues. Personal experience. Not worth it.
- Get the FLIRC case. Link. Don’t mess around with a cheaper cases with fans. The FLIRC case cools quite well, and is silent because it cools via conduction through the aluminium case, rather than relying on a fan. (Don’t place it in your external hard drive, they’ll both get warm)
- Have a few micro SD cards. They’re cheap. Link. You’ll need them for more than this project, and sometimes they go corrupt and waiting for a week for a new one to be delivered is suboptimal.
- USB keyboard and mouse (you probably have these lying around). Get non-bluetooth varieties, so you can re-use them if you choose to try my bespoke Air-Gapped Raspberry Pi Wallet. Link.
- A cheap monitor with a mini HDMI output cable (or regular HDMI output and buy a mini HDMI adaptor. Link.)
- An SSD. Link. Don’t get very the cheap ones, and don’t get “portable” external hard drives. They are not necessarily SSD. These drives fail and are slow, and then you’ll have to download the blockchain again (painful!)
Create an SD card image using any internet connected computer.
Go to the Raspberry Pi website and download the Raspberry Pi OS (32-bit) with desktop. It is a “.img” file, not an “.iso” file. You could use a different Linux flavour, but each has their own quirks and I can’t guarantee my instructions here will work perfectly. Just use this one, and if you want to experiment with operating systems, do that on another Pi.
Next, verify the digital signature. (This makes sure the software you have downloaded has not been tampered with).
The digital signature I copied from the website looks like this:
It will be different when there is a new version.
Open the terminal, and navigate to the directory containing the downloaded file.
Type “shasum -a 256 NameOfTheFile”. There should be a digital signature output. Compare it is the same as the published signature. In case you are experimenting with another operating system, on a Mac, it also works, but on a Windows machine, type this,
C:\> certUtil -hashfile C:\file.img SHA256
C:\file.img must be the exact path of the file you are checking
Next, download and install Balan Etcher. Link
I was unable to find the digital signature for this. If you know how, please let me know and I’ll update this article.
Etcher is self-explanatory to use. Insert your micro SD card and flash the Raspberry Pi software (.img file) onto the SD card.
For those interested in running a virtual Raspberry Pi on an emulator like Virtual Box, be aware that you need a “.iso” file for an optical drive. Don’t download the “.img” file for this purpose.
Run The Pi
Connect up the peripherals to the Pi, insert the micro SD card, and power it up. Select you first-time-run options like keyboard layout and location.
The Default user is “pi” — I suggest you leave it for ease of following this article. The default password is “raspberry” — I suggest you change that when prompted.
If your monitor shows a bit of a black border around the desktop, check the box “this screen shows a black border around the desktop” — next log in, it will be fixed.
Enter the details of your home network. I have WiFi and selected that and entered the password. You could also connect an ethernet cable.
You will be asked to check for operating system updates with an update wizard. Do that and update. A couple of times during my testing, this failed and I had to restart the operating system. The wizard did not start itself again.
If this happens, do it manually by opening terminal, and type
sudo apt-get update which asks the cloud what updates are available, then
sudo apt-get upgrade to actually upgrade to new software. This takes several minutes.
Download Bitcoin Core
While the Pi is upgrading, use the browser to navigate to
Download the ARM Linux option. Raspberry Pi uses ARM chip architecture so you can’t use a regular Linux installation. (Side note: You also might notice some applications, including Electrum Desktop Wallet, have an Appimage for Linux which works like an executable Windows file. Sadly, that doesn’t work for ARM chips either.)
Also click “Verify release signatures” to download a file containing the SHA 256 hashes of each Bitcoin Core OS version, for reference.
Next, using terminal, navigate to where Bitcoin Core was downloaded (usually
~/Downloads/) and type:
shasum -a 256 NameOfDownloadedFile
This will give you a hash output. Compare the output with the listed hash you downloaded, to make sure the file has not been tampered with.
Extract the downloaded file using the graphical interface, right click, select “extract here”, and delete the zipped file. I suggest moving the extracted directory to the desktop, and rename it “Bitcoin”
Don’t run it yet.
By now the Pi should have completed upgrading. Restart the operating system.
Preparing the external hard drive
If the drive doesn’t plug and play, you can do it manually. I used an old external hard drive (to test. Do use the recommended one, please). This old drive had previously been formatted on a Mac. The OS could read it, but it was not writable. That won’t do, I had to re-format to a Linux file system.
Here is a web page showing good instructions and sufficient detail if you want to learn about it. There are other resources available. Unfortunately, it’s harder than it has to be.
You can either read and follow the advice on that link, or follow along here. Pay attention to detail.
Using fdisk, we will delete existing partitions, create 1 new partition, and format to ext4. Then log out and log back in. It should auto-mount.
In terminal, type
sudo fdisk -l to find the name of the drive.
External hard drives are likely to be
These are Linux files describing the drives you have attached.
I can tell from the size column that my drive is
/dev/sda. Under “device” there is
/dev/sda2. These are two partitions created by my Mac Computer previously for this drive.
I’m going to delete the partitions, create a single new Linux partition, and format to the ext4 filesystem.
But first, my drive (which has been mounted automatically), needs to be unmounted. I had to type
sudo umount /media/pi/Untitled — notice it is
unmount. (30 minutes wasted)
Another way to unmount is
sudo umount /dev/sda1 — this didn’t work for my Mac Drive. Not sure why. It works for other linux drives.
What is mounting? Linux has a root file system that starts at
/ and in this case is located on the SD Card. Any drive you attach gets attached to this file system, which is what “mounting” refers to. Without mounting the drive, there is not access to the files. The mount point on the SD card file system, eg
/media/pi becomes the “root” directory of the attached drive.
Now we use fdisk:
sudo fdisk /dev/sda. Typing
m shows you the options. Do that. Try
i and see the partition printout, just for interest. Then type
m when prompted to go back to the menu.
d — to delete partitions. Then do it again if there are other partitions.
g — it will create a new empty GPT partition table.
n— to create a new partition. Keep hitting
<enter> and accept the defaults. This will use all the space and create one partition.
Lastly in fdisk, type
w to actually write these changes to disk.
The drive still needs to be formatted.
sudo mkfs.ext4 -F /dev/sda1
When you see
creating journal (xxxxx blocks):
Remove the drive and insert it back in, it should auto-mount.
When you’re logged back in, you’ll see the drive on the desktop. It has been automatically mounted.
You’ll see a drive icon on the desktop. That’s an illusion. The drive is not actually mounted to the desktop (ie not
/home/pi/Desktop/UntitledDrive). We need to find the mount point and actual name of the drive, not the label the the GUI gives us. Open terminal, navigate to
/media/pi/, and type
ls . You’ll probably find your drive there.
My output was
a2dca9ab-63b9-428c-819a-dd5c8a79122f which is the name of the drive, the UUID, universally unique identifier, and it’s quite ridiculous to use as a directory name. I wanted to change it to something manageable. I explored for a couple of hours and tried different things. It was fine until I came to the obstacle of making Linux auto-mount the drive to exactly the same location and drive name each time. I had to edit a dangerous-to-edit file which froze my system and I had to re-flash the SD card and start over. I think it’s safer to recommend to you to just stick to this ugly directory name.
Change permission of drive. THIS IS CRUCIAL.
The drive partition just create (located in
root permissions not user
pi permissions. We need to give it
pi permissions, otherwise we can’t access it when logged in as
sudo chown pi: /media/pi/a2dca9ab-63b9–428c-819a-dd5c8a79122f
— of course type in your drive’s UUID not mine.
Run Bitcoin Core
Go to terminal, navigate to where you placed the unzipped Bitcoin directory, navigate to the
bin subdirectory, and from there type
./bitcoin-qt — pay attention that it starts with a
. which means “this directory”
The GUI (graphical user interface) should load.
It will ask you where to store the bitcoin directory — custom or default. Do not select default, we want to use the external hard drive, not the smaller SD card. Select a custom location, click
… to open a drive explorer window, navigate to
/media/pi, and then double click the long string which is the drive’s name. Before clicking
OK, make sure
discard blocks after verification is not selected.
It should now start downloading the blockchain and will take several days. HOWEVER, before you get too far, go to the menu
settings and click
options… and make sure that
prune block storage option is not checked — assuming you want your node to be a full un-pruned node. If you changed this now, close the program and run it again. It will delete the blockchain data it has downloaded and will start again.
Meanwhile, we need to edit the bitcoin configuration file. There is the easy way and the hard way and I’ll explain both.
Easy way: An easier way to access bitcoin.conf file is through the graphical user interface. Go to menu
settings and select
options… and click
open configuration file. Edit and save and close. You’ll need to shut down Bitcoin Core and restart it for the config file changes to take effect, but don’t worry, this time you won’t lose any blockchain data that you’ve already downloaded.
Hard Way: This way is good to know, for potential troubleshooting skills. In terminal, navigate to where you decided to put the blockchain data when you first ran Bitcoin Core. I put mine at
/media/pi/a2dca9ab-63b9–428c-819a-dd5c8a79122f. Then type
ls and you’ll see
bitcoin.conf is there.
nano bitcoin.conf and the nano editor opens up.
The document is blank. Add a line
txindex=1 — this allows any transaction to be looked up by Bitcoin Core, not just your own wallet. On the next line, add
server=1. This allows Electrum Personal Server to talk to Bitcoin Core.
Save by pressing
<control> o, then
<enter> and don’t change the file name. Then hit
<control> x, to exit. You’ll need to shut down Bitcoin Core and restart it for the config file changes to take effect, but don’t worry, this time you won’t lose any blockchain data that you’ve already downloaded.
At some point you will have the option to create a new wallet. Do that, but remember, do not encrypt the wallet. Also, don’t use this wallet for any funds – it’s a hot wallet and that’s not safe. Your bitcoin should be stored off line.
Download Electrum Personal Server
You can do this while Bitcoin blockchain is downloading.
Go to the Github release page. Link
There are two files you need to download. The source code (don’t worry, we aren’t compiling) and the signature.
Download one of the source codes (either the
.zip compression, or the
.tar.gz compression). Also download the corresponding
.asc file. Eg, download
Next, download Chris Belcher’s public key; there is a link on the page, and it’s also here: Link
raw and then save the data to your computer. Note it’s location. Open the terminal, and navigate to the location of the the public key.
gpg --import NameOfPublicKey
In Linux/Mac, the double dash precedes options to commands that are longer than one letter. A single dash means that if more than one letter follows, each letter is an individual option. Eg
-abcd is four separate options,
--abcdis one option that’s called “abcd”.
With the above command, Chris’s public key should be now stored in your computer.
Next, in the terminal, navigate to where the source code and signature file is. Type
gpg --verify NameOfSignatureFile NameOfZipFile
Note the space between the two file names, and, the order matters. The signature file must be first.
If the signature file and the zip file only differed by an
.asc at the end of the signature file (eg
abcdefg.zip.asc), then in the gpg command you don’t need to type
NameOfZipFile. Gpg will know what you want.
The output should say something like this:
gpg: assuming signed data in ‘eps-v0.2.1.1.zip’gpg: Signature made Tue 9 Jun 23:30:42 2020 AESTgpg: using RSA key EF734EA677F31129gpg: Good signature from “Chris Belcher <email@example.com>” [unknown]gpg: WARNING: This key is not certified with a trusted signature!gpg: There is no indication that the signature belongs to the owner.Primary key fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
Good signature from is the crucial part. The warning is not relevant; safe to ignore.
Next, unzip the source code and put the directory where you want it. I put it on the Desktop. Then rename it to something easy to type, eg
Install Electrum Personal Server
Next is the bit that I seriously tripped up on, and I want it to go smoothly for you.
Make sure you have the latest version of pip. Type this in the terminal:
sudo pip3 install --upgrade pip
Navigate in terminal to the unzipped directory which you wisely placed on the Desktop and renamed
~/Desktop/eps/. Inside, there should be several files (and directories) including a file called
Within this directory, type
pip3 install --user . (<——- Notice the dot!)
Pay attention… there is a
user. I have tripped up, trying on various operating systems and computers, and always failed at this point, until I realised I wasn’t typing that pesky
user is typed as is, it’s not your
username. Don’t replace bit with
Also note, I accidentally typed the command with
sudo at the start due to habit. It installed EPS as the
root which is not what we want. We want to install it to
After this command, EPS should be installed. You should see an output that ends in something similar to
Successfully installed electrum-personal-server-0.2.0.dev0
The output also may tell you
The script electrum-personal-server is installed in ‘/home/pi/.local/bin’ which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use — no-warn-script-location
PATH is a special variable that contains all the directories that are in the “memory” so when in terminal, you can access files in these directories without navigating to them.
Don’t worry about this warning. Log out, and log in, and it will be added to the PATH automatically anyway.
Don’t run EPS yet
Before running EPS, you should:
- Wait for Bitcoin Core to fully synchronise
- Have Electrum Wallet setup up.
- Have ready a public key (xpub, ypub, or zpub), or multiple public keys (Xpub’s Ypub’s or Zpub’s) for a multisignature wallet.
Set up an Electrum Wallet
To set up an Electrum Wallet, you can find my instructions in the article, “How to set up a Raspberry Pi Zero (air-gapped) running latest version of Electrum Desktop Wallet”, under the heading “Running a virtual machine” Link.
Here is a skeleton of the instructions:
- Go to electrum.org and download the Python
*.tar.gzfile and the
signature. Also download and import ThomasV’s public key to your key ring.
- Verify the download
- Install dependencies (copy the command next to “Install dependencies” on the website, and run in terminal). Use copy and paste. As of version 4.0.3 the command is:
sudo apt-get install python3-pyqt5 libsecp256k1-0 python3-cryptography
- Install Electrum (The instructions in my linked article skipped this and just ran Electrum without installing. You can do this too or, install as follows: First navigate to where the
.tar.gzdownloaded file is, usually the Downloads directory. Don’t unzip it. From there, in terminal, type:
python3 -m pip install --user ElectrumFileName.tar.gz
Because of upgrades the ElectrumFileName will regularly change, just type out what you’ve downloaded. By installing Electrum, it’s a bit easier to run it. You can just type
electrum , case sensitive, from any directory in the terminal and it runs. You never need to unzip the file, and it can be deleted even.
Gather your public keys
Copy your public keys from your Electrum wallet, or your hardware wallet(s) and keep them handy in a text file on your desktop.
In your Electrum Wallet, go to the menu
information and you’ll see this…
This is a multisignature wallet with five Zpubs. You can select each one and copy the text that appears below as needed. If you have a single signature wallet, you’ll see just one “keystore”.
Edit EPS config file
Go to the unzipped
eps directory again and rename the file
The config file needs to be edited properly for the program to work.
Open this text file and begin editing as I will explain. Note, anything that starts with a
# is just a comment and will be ignored by EPS. Also note that for some lines, it may appear not to start with a
#, but in fact it might just be wrapped around from the line above that didn’t fit in the narrow window.
This is a screenshot of part of the config.ini file:
Notice (it’s hard to see at first glance) the config file is divided up by headings in square brackets. EPS looks for specific instructions under these headings.
Also notice the line that says
#multisig wallet = 2 followed by three lines of xpubs. This is an example of text wrapping around that is all actually on one line.
[master public keys]
Under this first heading, add your public keys that you’ll find in Electrum Wallet. I couldn’t get EPS running without first doing this.
For a multisig wallet, for example a 3 of 5 wallet, in the EPS
config.ini file, add (all in one line, separating each Zpub with a space) :
AnyNameForYourWallet = 3 Zpub1 Zpub2 Zpub3 Zpub4 Zpub5
The number after the equals sign indicates the minimum number of private keys to spend from the wallet, and the number of Zpubs you list defines the number of public keys in the wallet.
This is just like the example given in the config file, except, don’t type a
# at the start.
For a single signature wallet, it’s much easier, under the same heading in the
config.ini file, add the line
AnyNameForWallet2 = zPub
— or use an xPub or yPub
This is the next heading in the
config.ini file. Your Bitcoin Core Node will be running on the same computer as your EPS (I do recommend this, because I have not yet succeed in running EPS and Bitcoin Core on different computers while talking to each other), so leave this address as is:
host = 127.0.0.1 port = 8332
The IP address
127.0.0.1 is code for “this computer” and is universal.
If your EPS really needs to connect to a Bitcoin Core on a different computer on the same home network, then you add the bitcoin core computer’s IP address. I believe you also need to add a line in the Bitcoin Core config file,
rpcallow=ip_address_of_EPS_computer. I haven’t tried hard enough to make this work, so I have no tested instructions for you. It might not even be developed for that, and so it may not be possible yet. If you want to try yourself, don’t let me stop you.
The next part is a bit tricky and non-intuitive:
Note the following lines in the config.ini file:
#add the bitcoin datadir to search for the .cookie file created by the
# node, which avoids the need to configure rpc_user/pass
#leave this option empty to have it look in the default location
#if you dont want to use the .cookie method with datadir, uncomment to config u/p here
Basically, you have a choice
- uncomment the
2. uncomment the
The default is using the
datadir= line and commenting out the 2nd option. Do this.
If during your bitcoin installation, you didn’t move the data directory (where the blockchain is stored), you can leave the line
datadir= as is, BUT, we did. We moved it to the external hard drive. So you need to enter the path to the mount point of your drive after
datadir= Here we need to use that long UUID. This is what I put:
Notice this is a directory where .cookie will be found. You shouldn’t actually enter the file as well, just the directory.
Bitcoin Core’s config file starts empty, however, if you have been playing around with Bitcoin Core prior to this, you may have these lines (below) already in there:
If these lines exist in
bitcoin.conf, Bitcoin Core does not create a
.cookie file. Electrum Personal Server will look for that file, and because it doesn’t exist, it will create an error. This pesky trap blocked me from getting this project done for months. I eventually found this solution from an obscure online forum post in the depths of internet history, among many many non-solutions. Comment out these lines with a
# or delete them, and it will create the elusive .cookie file.
An alternative is to comment out the
datadir= line in EPS
config.ini, add include
to that file, and only THEN, you can leave
rpcpassword in the
bitcoin.conf file. During my many weeks of failure, this option still created an error though. Theoretically it should work. Many people posted this issue in forums, and the solution was to go with the
datadir= option. Which didn’t work for me because of the missing
Just in case you want to know:
How to find where the DEFAULT data directory for bitcoin core is?
On a Mac, the default location is:
~/Library/Application\ Support/Bitcoin/ (Note: the “\” is an escape character, telling the OS that the following space is part of the directory name)
For Linux, it’s a hidden file. Located here
~/.bitcoin/. To navigate there, you type
cd ~ and then
cd .bitcoin — you must type that
bitcoin which indicates the directory is hidden.
In the EPS config file, you’d enter
datadir = ~/.bitcoin or leave it blank after
= because that’s the default anyway.
You have to enter at least an address or a public key in the appropriate location of the config file for EPS to run.
If you are not ready with your public keys, you can enter one of your (or anyone else’s) random bitcoin address here, just to get EPS working.
A_Name = bc1qGivEmE6poINt15BitcOINplez
Other config.ini headings
There are other headings, but this is basically all you need to do. The rest of the config.ini file you can read, and probably leave as is, unless you find a good reason to change something.
Run Electrum Personal Server
Once the EPS config file is edited, and once Bitcoin Core is fully synchronised, and also running, we can run Electrum Personal Server. Do remember Bitcoin Core needs to be running.
If by some chance the directory
~/.local/bin is not in our
PATH, then you manually have to type the file electrum-personal-server’s exact location.
There are ways to add it so it’s always there, but if you edit the
.profile file incorrectly, you can damage you installation and have to reflash the SD card and start over — or so I’m told 🙂 Safest is to type the location manually in the command
Go to the eps directory
cd ~/Desktop/eps/, while Bitcoin Core is running, and type
This command is just 2 filenames seperated by a space.
If you are not in the directory where
config.ini is, you have to type its full path in the command. If electrum-personal-server file is not in your PATH you need to type its full path as well. OR just move the file and put it in the same directory as the config.ini file
Once you run this for the first time, you’ll get a message about re-scanning, and it will exit. This is normal. It says:
If recovering a wallet which already has existing transactions, then run the rescan script. If you’re confident that the wallets are new and empty then there’s no need to rescan, just restart this script
EPS does some magic I don’t understand, but I think of it as having its own address list to look for. It needs to be told how far back in the blockchain to look. For this it needs to scan the blockchain. You only need to scan as far back as your first bitcoin UTXO was received in the wallet you are going to watch, but I would scan the whole blockchain to remain maximally flexible. It takes a bit longer of course. This is how to do it:
Navigate to your EPS directory. Make sure Bitcoin Core is running, and from there, type
./electrum-personal-server --rescan config.ini
It will ask for the earliest wallet creation date. Enter
1 to start from
block height 1, and
y to confirm.
Now wait a while, possibly a day or two.
Once it is done, run EPS again,
Connect your Electrum Desktop Wallet
When you run Electrum Desktop Wallet for the first time, and load your real addresses or public keys, be disconnected from the internet so you don’t accidentally leak private information before you have the settings sorted out correctly. It’s difficult to get the settings right without first running Electrum. So here are the steps:
- Stop Bitcoin Core. Stop EPS. Disconnect the internet (double check by failing to load a webpage)
- If Electrum is installed, you can type
electrumfrom any directory in the terminal, case sensitive. If it is not installed, go to where you unzipped the electrum download and from within that directory, type
Select server manually
4. Make sure
Select server automatically is not ticked, and type in your local host with
port 50002 (it’s always
127.0.0.1:50002), then click
5. Proceed to making or loading up a wallet, or a watching address. Whichever you choose, make sure it is the same as what you entered in Electrum Personal Server’s
6. Go to the menu
Preference, then change the Base unit from
BTC, then shut down Electrum.
7. In terminal type
cd ~/.electrum (this directory is only created once Electrum is run for the first time)
nano config and make some changes as follows:
auto_connect should be
check_updates should be
false, but change it to
true — this is really important to prevent your server leaking private information.
server should be
9. Connect to the internet. Make sure Bitcoin Core is running. Make sure EPS is running.
10. Load Electrum Wallet. It should be working and showing your balance, verified by your own Node!
Make sure you have only one wallet open at a time.
Make sure any wallet you open is also specified in the
config.ini file of EPS.
Make sure Bitcoin Core is fully synced and running.
Make sure EPS is running.
If you created a wallet with Bitcoin Core and encrypted it, I have no idea why, but EPS fails. The solution is to back up your wallet, and remove it or delete it from the data directory. Then restart bitcoin core and create a new wallet. This time, don’t encrypt it.
In case you are feeling generous: