If the output jack is labeled line out
it means it can be plugged into any line-level input, as those found in audio interfaces, so you should be safe.
If your interface is "pro" grade, it can have Mic inputs and "Hi-Z" (or Instrument) inputs too, so check if it's the case and make sure you plug into the line inputs.
Also, keep in mind that unless the "line out" has speaker emulation (and a good one, too!), you probably won't like the sound you'll get.
As for the speaker, it should always be connectd (expecially if it's a tube amplifier) unless you wanna risk damaging the amp. Amplifier transformers need the correct load to work properly and within safe parameters.
If the volume is too much for where you're playing (and that's why you're asking about the speaker connection), you can buy an attenuator, which gives you lower volume while keeping the right load on the amplifier transformers.
Some models have an emulated line out which is usually better than the stock one if you want to use it for recordings.